test(FN-4164): complete Step 3 — guard mobile enable button touch target
Fusion-Task-Id: FN-4164 Fusion-Task-Lineage: 7e3ea70f-c2e7-40c5-9de8-d8d3ab67c513
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
Restore the mobile touch-target size on the compact GitHub tracking "Enable" button in the task detail header.
|
||||
@@ -2,15 +2,20 @@ import { describe, expect, it } from "vitest";
|
||||
import { loadAllAppCss, loadAllAppCssBaseOnly } from "../../test/cssFixture";
|
||||
|
||||
describe("TaskDetailModal GitHub tracking enable button CSS contract", () => {
|
||||
it("FN-4163 keeps the desktop Enable button compact while preserving the mobile touch target", async () => {
|
||||
it("FN-4164 keeps desktop compact while restoring token-based mobile touch-target sizing", async () => {
|
||||
const baseCss = await loadAllAppCssBaseOnly();
|
||||
const css = await loadAllAppCss();
|
||||
|
||||
expect(baseCss).toMatch(
|
||||
/\.detail-github-tracking-enable\s*\{[^}]*min-width\s*:\s*0\s*;[^}]*min-height\s*:\s*0\s*;/,
|
||||
/\.detail-github-tracking-enable\s*\{[^}]*min-width\s*:\s*0\s*;[^}]*min-height\s*:\s*0\s*;[^}]*padding-block\s*:\s*calc\(var\(--space-xs\)\s*\/\s*2\)\s*;/,
|
||||
);
|
||||
expect(css).toMatch(
|
||||
/@media\s*\(max-width:\s*768px\)\s*\{[\s\S]*?\.detail-github-tracking-section\s+\.detail-github-tracking-enable\s*\{[^}]*min-width\s*:\s*44px\s*;[^}]*min-height\s*:\s*44px\s*;/,
|
||||
|
||||
const mobileMediaStart = css.indexOf("@media (max-width: 768px)");
|
||||
expect(mobileMediaStart).toBeGreaterThanOrEqual(0);
|
||||
const mobileCss = css.slice(mobileMediaStart);
|
||||
|
||||
expect(mobileCss).toMatch(
|
||||
/\.detail-github-tracking-section\s+\.detail-github-tracking-enable\s*\{[^}]*min-height\s*:\s*calc\(var\(--space-lg\)\s*\+\s*var\(--space-xl\)\s*-\s*var\(--space-xs\)\)\s*;[^}]*padding-block\s*:\s*var\(--space-xs\)\s*;/,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user