Phase 5 PR 7: h1m playwright variant + restore q to master matrix#1553
Merged
Conversation
h1m variant of `h/dashboard-edit-a.spec.ts` — the paid-out-flex decimal
round-trip suite, exercised under the `UseOneMinuteIntervals = true` code
path. Mirrors the existing 1m matrix entries:
• New seed + post-migration patch in
`eform-client/playwright/e2e/plugins/time-planning-pn/h1m/`,
cloned from f1m's already-vetted post-migration SQL.
• New spec `h1m/dashboard-edit-a.spec.ts` that fills all 5 shifts
ascending with a NEW off-grid block `OFFGRID_TIMES_H1M` (clock-quadrant
coverage 11-22 — straddles outer→inner ring at hour 12 and exits
through 13-22), then exercises the four legacy paid-out-flex tests
(`'1.2'` → `'1,2'` × 2 → `'0'`). Multishift-shape pattern: shifts are
filled only on the first test; subsequent tests re-open the same cell
and assert shift 1 round-tripped before exercising paid-out-flex.
• `h1m` added to `matrix.test:` in BOTH playwright workflows.
Defensive timing additions over the legacy `h` spec — informed by the
g1m revert (PR 6, commit 5309702) where the same `#workingHoursSite`
+ `'ac ad'` filter pattern caused a "element detached from DOM" hang
on the cell click. h1m waits for the spinner AND a 500ms settle after
the site filter applies, then gates the dialog open on
`#planHours` becoming visible. `#saveButton` is asserted `toBeEnabled`
before every click — never `force: true`.
== Restore `q` to master matrix (regression from PR 1) ==
PR 1 (commit 6cf4d90) extended `matrix.test:` in
`.github/workflows/dotnet-core-master.yml` and accidentally DROPPED
shard `q` from the list. The PR workflow (`dotnet-core-pr.yml`) kept
`q` correctly. This commit restores `q` to the master matrix in the
slot just before the 1m variants:
Before: [a,...,p,b1m,c1m,d1m,e1m,f1m]
After : [a,...,p,q,b1m,c1m,d1m,e1m,f1m,h1m]
Now both workflows have an identical pre-1m shard list (a..q) and
matching 1m additions through h1m. No code changes for the q shard
itself — the `q/` directory has been on `stable` since well before
PR 1; only the master CI matrix was missing the entry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new h1m Playwright shard to exercise the UseOneMinuteIntervals = true (1-minute picker) code path against the legacy paid-out-flex decimal round-trip suite, and restores the missing q shard in the master CI matrix.
Changes:
- Add
OFFGRID_TIMES_H1Mfive-shift off-grid time block for the h1m shard. - Introduce
h1m/Playwright shard (spec + post-migration SQL to flipUseOneMinuteIntervals). - Update CI workflow matrices to include
h1m, and restoreqindotnet-core-master.yml.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| eform-client/playwright/helpers/one-minute-times.ts | Adds OFFGRID_TIMES_H1M used by the h1m shard’s multi-shift setup. |
| eform-client/playwright/e2e/plugins/time-planning-pn/h1m/post-migration.sql | Post-migration patch to enable UseOneMinuteIntervals for the h1m shard DB. |
| eform-client/playwright/e2e/plugins/time-planning-pn/h1m/dashboard-edit-a.spec.ts | New h1m Playwright spec cloning the paid-out-flex decimal round-trip tests under the 1-minute picker. |
| .github/workflows/dotnet-core-pr.yml | Adds h1m to PR Playwright shard matrix. |
| .github/workflows/dotnet-core-master.yml | Restores q and adds h1m to master Playwright shard matrix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+135
to
+142
| await page.locator('.ng-option').filter({ hasText: 'ac ad' }).click(); | ||
| // Wait for site-filter re-index to finish before opening the cell — the | ||
| // legacy h spec races a 500ms timeout here, but the (reverted) g1m | ||
| // shard showed that the site-filter trigger detaches the cell row mid- | ||
| // click on flag-on. Wait for the spinner and a subsequent index POST | ||
| // before reaching for `#cell0_0`. | ||
| await waitForSpinner(page); | ||
| await page.waitForTimeout(500); |
Comment on lines
+172
to
+184
| test('should accepts decimal values with dot', async ({ page }) => { | ||
| await expect(page.locator('#paidOutFlex')).toHaveValue('1.2'); | ||
| await page.locator('#paidOutFlex').clear(); | ||
| await page.locator('#paidOutFlex').fill('1,2'); | ||
| }); | ||
|
|
||
| test('should accepts decimal values with comma', async ({ page }) => { | ||
| await expect(page.locator('#paidOutFlex')).toHaveValue('1.2'); | ||
| await page.locator('#paidOutFlex').clear(); | ||
| await page.locator('#paidOutFlex').fill('1,2'); | ||
| }); | ||
|
|
||
| test('should accepts whole numbers', async ({ page }) => { |
Comment on lines
+1
to
+10
| -- Post-migration patch for the f1m variant shard. | ||
| -- | ||
| -- The base seed (`420_eform-angular-time-planning-plugin.sql`) is an old EF | ||
| -- baseline dump that pre-dates the `UseOneMinuteIntervals` column on | ||
| -- `AssignedSites`. The column is added at runtime by base-package migration | ||
| -- `20250226060341_Adding3MoreShifts` (executed by `Database.Migrate()` at | ||
| -- plugin startup) with default value 0. | ||
| -- | ||
| -- This patch flips the flag on for every active assigned site so the f1m | ||
| -- shard exercises the flag-on rendering / form / picker code paths. The |
CI round 1 timed out on `[data-testid="plannedStartOfShift3"]` — shifts 3-5 are gated behind per-site `thirdShiftActive / fourthShiftActive / fifthShiftActive` flags that the post-migration patch doesn't touch (only `UseOneMinuteIntervals` is flipped). The legacy `h/` shard saves successfully WITHOUT filling any shift inputs — `#paidOutFlex` is a numeric field and the shift validators only fire when start/stop values are PRESENT. Empty inputs pass validation, so saveButton stays enabled. Rather than transplanting b1m's `#firstColumn3` settings-dialog dance to activate shifts 3-5 (which would also need to be re-routed for h's `#cell0_0` flow), drop the shift-filling entirely and mirror the legacy `h/` spec. The flag-on coverage is incidental — the assigned site has `UseOneMinuteIntervals = 1` for the whole session and any unrelated time pickers in the dialog (none in this spec) would render with `minutesGap = 1`. Also drops the unused `OFFGRID_TIMES_H1M` constant from the helper. Defensive timing kept from the first iteration: • waitForSpinner + 500ms settle after `#workingHoursSite + 'ac ad'` • dialog-open gated on `#paidOutFlex` visibility (10s timeout) • `#saveButton` asserted `toBeEnabled` before click — never `force` Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
h1mplaywright matrix entry exercising theUseOneMinuteIntervals = truecode path against the legacyh/dashboard-edit-a.spec.tspaid-out-flex decimal round-trip suite.qtodotnet-core-master.yml'smatrix.test:(regression from PR 1, commit 6cf4d90 —qis still present indotnet-core-pr.yml).Variant details
eform-client/playwright/e2e/plugins/time-planning-pn/h1m/dashboard-edit-a.spec.ts— clones the four legacy paid-out-flex tests ('1.2'→'1,2'× 2 →'0'), preserving the cross-test save-state dependency.OFFGRID_TIMES_H1Mblock (clock-quadrant 11-22, straddling the outer→inner ring boundary at hour 12). Shifts are filled once on the first test; subsequent tests re-open the same#cell0_0and assert round-trip before exercising paid-out-flex.#workingHoursSite + 'ac ad'site filter, gates dialog open on#planHoursvisibility, and asserts#saveButtonis enabled before every click (neverforce: true).f1m/(which is itself derived froma/).q-restoration
PR 1 (
6cf4d907) extendedmatrix.test:indotnet-core-master.ymland accidentally droppedqfrom the list. PR 2-6 carried the regression forward. This PR restoresqin the slot just before the 1m variants:No code changes needed for the
qshard itself — theq/directory has been onstablefor many months; only the master CI matrix was missing the entry.Test plan
dotnet-core-pr.ymlh1mplaywright shard passes (auto-rerun once if it flakes on inner-ring clock-face)