mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Style Skip this one as a small accent button and outline confirm and recap yes buttons
AI Assisted
This commit is contained in:
1 parent
2ab57d9a7e
commit
765e374584
3 files changed
+27
-4
No files matched your search
@@ -569,3 +569,17 @@ test("a redraw keeps the place of whatever scrolls: question card, finished scre
|
||||
assert.match(place, /scrollerKey\(inner\) === place\.key/, "a card comes back only while it shows the same thing");
|
||||
assert.match(place, /:scope > \.git-board/, "the git board keeps its own per-tab place");
|
||||
});
|
||||
|
||||
test("Skip this one is a small accent button, like a comment box's quick answer", () => {
|
||||
const app = fs.readFileSync(path.join(ROOT, "src", "web-console", "public", "app.js"), "utf8");
|
||||
assert.match(app, /const skip = el\("button", "btn tiny", skipped \? "Do not skip" : "Skip this one"\);/, "the skip button is btn tiny");
|
||||
assert.match(app, /quick = el\("button", "btn tiny"/, "the quick answer it matches is btn tiny");
|
||||
});
|
||||
|
||||
test("a confirm's yes and a recap's yes are outlined in the accent, a dangerous yes stays red", () => {
|
||||
const app = fs.readFileSync(path.join(ROOT, "src", "web-console", "public", "app.js"), "utf8");
|
||||
const confirm = app.slice(app.indexOf("function buildConfirm("), app.indexOf("row.appendChild(mk(noLabel"));
|
||||
assert.match(confirm, /\(yes && !danger && !on \? " is-approve" : ""\)/, "an unpicked, safe yes gets is-approve");
|
||||
assert.match(confirm, /\(danger && !on \? " danger" : ""\)/, "a dangerous yes stays red");
|
||||
assert.match(app, /const ok = el\("button", "btn" \+ \(okOn \? " primary" : " is-approve"\)/, "the recap's yes gets is-approve");
|
||||
});
|
||||
Reference in new issue
Block a user