Fix CI build/deploy/smoke pipeline for the self-hosted qa runner #3

Merged
wamplerj merged 21 commits from build-runner-fix into main 2026-07-04 18:53:05 -07:00
Showing only changes of commit 5f3fe81758 - Show all commits

View File

@@ -29,13 +29,17 @@ test('creating a feature adds it to the table and its toggle can be flipped', as
const toggle = row.locator('input[type="checkbox"]');
const wasChecked = await toggle.isChecked();
// Assert on the real PATCH landing, not just the switch's transient DOM state: if the
// feature-state map hasn't loaded for this row yet, the click handler no-ops silently and
// the switch briefly flashes the native checkbox state before Vue snaps it back - which
// reads as "toggled" for an instant even though nothing was ever sent to the API.
const patchResponse = page.waitForResponse(
(res) => res.request().method() === 'PATCH' && res.url().includes('/featurestate/') && res.ok(),
);
await toggle.click({ force: true });
await patchResponse;
await expect(toggle).toBeChecked({ checked: !wasChecked });
// The click's own toggle-state PUT is async; wait for it to land before reloading,
// otherwise the reload can race it and read back the pre-toggle value.
await page.waitForLoadState('networkidle');
// Reload to confirm the toggle was persisted to the real API/DB, not just local state.
await page.reload();
const reloadedRow = page.getByRole('row', { name: new RegExp(featureName) });