mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 15:23:29 +00:00
Merge the final display polish into release/v1.42.0
This commit is contained in:
commit
dcfec1f35d
144 files changed
+4866
-2817
No files matched your search
@@ -336,8 +336,8 @@ describe("<DashboardLayoutSection> — native-only widget group (issue #581)", (
|
||||
const html = render(<DashboardLayoutSection id="dashboard-layout" />);
|
||||
|
||||
expect(html).toContain('data-widget-id="bmi"');
|
||||
expect(html).toContain('aria-label="BMI — Tile"');
|
||||
expect(html).toContain('aria-label="BMI — Chart"');
|
||||
expect(html).toContain('aria-label="BMI: Tile"');
|
||||
expect(html).toContain('aria-label="BMI: Chart"');
|
||||
// Reflects the stored flags rather than inventing a default.
|
||||
const row = html.match(
|
||||
/data-widget-id="bmi"[\s\S]*?(?=data-slot="native-widget-row"|$)/,
|
||||
@@ -448,7 +448,7 @@ describe("<DashboardLayoutSection> — iOS-pin-only ids hidden from web (v1.11.2
|
||||
html.indexOf('data-slot="native-only-widgets"'),
|
||||
);
|
||||
for (const id of IOS_PIN_ONLY_WIDGET_IDS) {
|
||||
expect(sortableList).not.toContain(`${pinOnlyLabels[id]} — `);
|
||||
expect(sortableList).not.toContain(`${pinOnlyLabels[id]}: `);
|
||||
// ...and each is reachable exactly once, in the native-only group.
|
||||
expect(html).toContain(`data-widget-id="${id}"`);
|
||||
}
|
||||
@@ -465,11 +465,11 @@ describe("<DashboardLayoutSection> — iOS-pin-only ids hidden from web (v1.11.2
|
||||
describe("<DashboardLayoutSection> — disabled-module widget toggles", () => {
|
||||
// The achievements widget label drives its switch aria-label; it is the
|
||||
// canonical disabled-module probe (label resolves to "Achievements").
|
||||
const ACHIEVEMENTS_ARIA = "Achievements — ";
|
||||
const ACHIEVEMENTS_ARIA = "Achievements: ";
|
||||
// Mood is a module-owned widget too; weight is a core widget with NO module
|
||||
// entry, so it must survive any module-off state.
|
||||
const MOOD_ARIA = "Mood — ";
|
||||
const WEIGHT_ARIA = "Weight — ";
|
||||
const MOOD_ARIA = "Mood: ";
|
||||
const WEIGHT_ARIA = "Weight: ";
|
||||
|
||||
it("hides a widget toggle whose owning module is disabled", () => {
|
||||
authState.modules = { achievements: false };
|
||||
|
||||
@@ -105,7 +105,7 @@ describe("IntegrationStatusPill", () => {
|
||||
<IntegrationStatusPill state="parked" lastSyncAt={null} />,
|
||||
);
|
||||
expect(html).toContain("Paused");
|
||||
expect(html).toContain("Paused — reconnect");
|
||||
expect(html).toContain("Paused: reconnect");
|
||||
expect(html).toContain('data-state="parked"');
|
||||
});
|
||||
|
||||
@@ -115,7 +115,7 @@ describe("IntegrationStatusPill", () => {
|
||||
"de",
|
||||
);
|
||||
expect(html).toContain("Pausiert");
|
||||
expect(html).toContain("Pausiert — neu verbinden");
|
||||
expect(html).toContain("Pausiert: neu verbinden");
|
||||
});
|
||||
|
||||
// The three states the server verdict added. `stale` and `stalled` both
|
||||
|
||||
@@ -233,7 +233,7 @@ describe("IntegrationsSection — single-status-display contract (A5)", () => {
|
||||
// The pill flips to `data-state="parked"` and the resume banner
|
||||
// renders with the reconnect CTA. The legacy `error` reconnect text
|
||||
// (red) must NOT appear because the user-facing copy is the lighter
|
||||
// "Paused — reconnect" string, not "Error — reconnect".
|
||||
// "Paused: reconnect" string, not "Error — reconnect".
|
||||
it("Withings parked state surfaces the parked pill + resume CTA", () => {
|
||||
setIntegrationStatus({
|
||||
threshold: 3,
|
||||
@@ -256,7 +256,7 @@ describe("IntegrationsSection — single-status-display contract (A5)", () => {
|
||||
const html = render();
|
||||
expect(html).toContain('data-state="parked"');
|
||||
expect(html).toContain("Paused");
|
||||
expect(html).toContain("Paused — reconnect");
|
||||
expect(html).toContain("Paused: reconnect");
|
||||
expect(html).toContain('data-testid="withings-parked-banner"');
|
||||
expect(html).toContain('data-testid="withings-resume-button"');
|
||||
// The lastError is surfaced under the pill so the operator sees
|
||||
|
||||
@@ -190,9 +190,9 @@ describe("<MoodSection> — SSR smoke", () => {
|
||||
const groupRows = html.match(/data-slot="mood-group-row"/g);
|
||||
expect(groupRows?.length ?? 0).toBe(2);
|
||||
// One kebab per CUSTOM group row; the seeded row carries none.
|
||||
const kebabs = html.match(/More options — Garten/g);
|
||||
const kebabs = html.match(/More options: Garten/g);
|
||||
expect(kebabs?.length ?? 0).toBeGreaterThanOrEqual(1);
|
||||
expect(html).not.toContain("More options — Feelings");
|
||||
expect(html).not.toContain("More options: Feelings");
|
||||
});
|
||||
|
||||
it("renders custom tags by decrypted label, never the raw key", () => {
|
||||
@@ -206,7 +206,7 @@ describe("<MoodSection> — SSR smoke", () => {
|
||||
expect(html).toMatch(
|
||||
/data-slot="mood-tag-manage-row"[^>]*data-hidden="true"/,
|
||||
);
|
||||
expect(html).toContain("Show tag — stressed");
|
||||
expect(html).toContain("Show tag: stressed");
|
||||
});
|
||||
|
||||
it("surfaces the usage count badge", () => {
|
||||
@@ -219,7 +219,7 @@ describe("<MoodSection> — SSR smoke", () => {
|
||||
expect(html).toContain('data-slot="mood-archived-row"');
|
||||
expect(html).toContain("Altes Tag");
|
||||
expect(html).toContain("Restore");
|
||||
expect(html).toContain("Delete permanently — Altes Tag");
|
||||
expect(html).toContain("Delete permanently: Altes Tag");
|
||||
// The active custom tag must NOT appear in the archived card.
|
||||
const archivedCard = html.slice(
|
||||
html.indexOf('data-slot="mood-archived-tags-card"'),
|
||||
|
||||
Reference in new issue
Block a user