mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
test(e2e): expect three integration pills on mobile after WHOOP card
The WHOOP integration card adds a third status pill on /settings/integrations. Update the Pixel-5 layout spec to expect three pills and assert the two connected ones (Withings + moodLog) order- independently, since WHOOP stays a dormant BYO-keys card until an operator adds credentials.
This commit is contained in:
1 parent
37cec93d28
commit
98693cda6a
1 file changed
+10
-5
@@ -127,12 +127,17 @@ test.describe("/settings/integrations Pixel-5 layout", () => {
|
||||
|
||||
// Wait for the pills to mount (queries resolve after first paint).
|
||||
const pills = page.locator('[data-testid="integration-status-pill"]');
|
||||
await expect(pills).toHaveCount(2, { timeout: 10_000 });
|
||||
// Three integration cards now (Withings, moodLog, WHOOP) → three pills.
|
||||
await expect(pills).toHaveCount(3, { timeout: 10_000 });
|
||||
|
||||
// Each pill carries the data-state marker so we know the
|
||||
// pill rendered the connected branch with relative time.
|
||||
await expect(pills.nth(0)).toHaveAttribute("data-state", "connected");
|
||||
await expect(pills.nth(1)).toHaveAttribute("data-state", "connected");
|
||||
// Withings + moodLog are connected in this fixture; WHOOP is a BYO-keys
|
||||
// card that stays dormant until an operator adds credentials, so assert
|
||||
// the two connected pills order-independently.
|
||||
await expect(
|
||||
page.locator(
|
||||
'[data-testid="integration-status-pill"][data-state="connected"]',
|
||||
),
|
||||
).toHaveCount(2);
|
||||
|
||||
// The redundant v1.4.18 banner must be gone.
|
||||
await expect(
|
||||
|
||||
Reference in new issue
Block a user