l0qp1n5qr: Give the disabled sparkle button a solid readable face
This commit is contained in:
@@ -27,6 +27,18 @@ function rule(selector: string): string {
|
||||
return m[1];
|
||||
}
|
||||
|
||||
describe("SparkleButton disabled", () => {
|
||||
it("keeps full opacity and a solid readable face", () => {
|
||||
const body = rule(".btn-spark:disabled");
|
||||
expect(body).toMatch(/opacity:\s*1\b/);
|
||||
expect(body).toContain("var(--tile-3)");
|
||||
expect(body).toContain("var(--ink-2)");
|
||||
expect(body).toContain("not-allowed");
|
||||
expect(readFileSync(path.resolve(__dirname, "../src/styles/legacy.css"), "utf8")).not.toMatch(/button:disabled\s*\{[^}]*opacity/);
|
||||
expect(html(createElement(SparkleButton, { label: "Sign in", disabled: true }))).toContain("disabled");
|
||||
});
|
||||
});
|
||||
|
||||
describe("FlipButton states", () => {
|
||||
it("ready: POST plus send icon, flips to PUBLISH with the icon", () => {
|
||||
expect(flipLabels("ready")).toEqual({ front: "Post", back: "Publish", icon: true });
|
||||
|
||||
Reference in New Issue
Block a user