mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 13:52:20 +00:00
fix(settings): pair date-of-birth with language in one grid row
Moves the language select into the same `grid sm:grid-cols-2` row as date of birth and drops the standalone language wrapper plus its `sm:max-w-xs` clamp. The profile form now carries a uniform two-cell rhythm from top to bottom instead of alternating between paired and single-cell rows. Updates the mobile-consistency e2e assertion to match the new contract: dob + language MUST share a grid row.
This commit is contained in:
1 parent
0f5369131e
commit
a04e119cac
2 files changed
+31
-32
No files matched your search
@@ -115,15 +115,16 @@ test.describe("Settings mobile consistency (Pixel 5)", () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("/settings/account: Sprache select is in its own row, not paired with date-of-birth", async ({
|
||||
test("/settings/account: Sprache select shares one grid row with date-of-birth", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/settings/account", { waitUntil: "networkidle" });
|
||||
await page.waitForLoadState("networkidle");
|
||||
|
||||
// The Sprache native select must NOT live inside the same `grid`
|
||||
// ancestor as the date-of-birth input. Pre-fix they shared
|
||||
// `<div class="grid sm:grid-cols-2"> dob | language </div>`.
|
||||
// The v1.4.27 R1 settings audit pairs date-of-birth with language
|
||||
// in a single `grid sm:grid-cols-2` row so the profile form keeps
|
||||
// a uniform two-column rhythm and the language field no longer
|
||||
// sits alone at the bottom with a `sm:max-w-xs` clamp.
|
||||
const sharedGrid = await page.evaluate(() => {
|
||||
const lang = document.getElementById("language-select");
|
||||
const dob = document.getElementById("dob");
|
||||
@@ -137,8 +138,8 @@ test.describe("Settings mobile consistency (Pixel 5)", () => {
|
||||
});
|
||||
|
||||
expect(sharedGrid.found, "language + dob fields must exist").toBe(true);
|
||||
expect(sharedGrid.sharedGrid, "language + dob must NOT share a grid").toBe(
|
||||
false,
|
||||
expect(sharedGrid.sharedGrid, "language + dob must share a grid").toBe(
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user