This commit is contained in:
czz
2026-05-09 18:13:53 +08:00
parent 42fde98037
commit 26a7411504
15 changed files with 63 additions and 15 deletions

View File

@@ -35,6 +35,16 @@ run("AppBar back icon uses a fixed mini-program sized constraint", () => {
assert.match(appBarStyles, /\.app-bar__back-icon\s*\{[\s\S]*height:\s*32rpx;/);
});
run("AppBar props stay focused on title and back navigation only", () => {
run("AppBar exposes fixed layout modes instead of scattered slot props", () => {
assert.match(appBarSource, /type AppBarMode = "spacer" \| "back-title" \| "back-title-actions-below" \| "title-actions-below"/);
assert.match(appBarSource, /mode\?: AppBarMode/);
assert.match(appBarSource, /actions\?: ReactNode/);
assert.doesNotMatch(appBarSource, /subtitle\?:|eyebrow\?:|align\?:|rightText\?:|onRightAction\?:|leftSlot\?:|rightSlot\?:|bottomSlot\?:/);
});
run("AppBar includes dedicated rows for title and below-line actions", () => {
assert.match(appBarSource, /app-bar__title-row/);
assert.match(appBarSource, /app-bar__actions-row/);
assert.match(appBarStyles, /\.app-bar__actions-row\s*\{/);
assert.match(appBarStyles, /\.app-bar__title-row\s*\{/);
});