26 lines
938 B
JavaScript
26 lines
938 B
JavaScript
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import { dirname, join } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const css = readFileSync(join(__dirname, "..", "styles.css"), "utf8");
|
|
|
|
assert.match(
|
|
css,
|
|
/\.line-button\.is-practiced\s*\{[\s\S]*background:\s*#ecfdf3;[\s\S]*border-color:\s*#86efac;[\s\S]*box-shadow:\s*inset 3px 0 0 #16a34a;/,
|
|
"practiced transcript rows should use a clear green row highlight",
|
|
);
|
|
|
|
assert.match(
|
|
css,
|
|
/\.line-button\.is-difficult\s*\{[\s\S]*background:\s*#fffaf0;[\s\S]*box-shadow:\s*inset 3px 0 0 var\(--gold\);/,
|
|
"difficult transcript rows should keep the existing gold row highlight",
|
|
);
|
|
|
|
assert.doesNotMatch(
|
|
css,
|
|
/\.line-status-button\.practiced\.active\s*\{[\s\S]*#16a34a/,
|
|
"the stronger practiced color should belong to the transcript row, not the status button",
|
|
);
|