Skip to content

Phase 5 PR 7: h1m playwright variant + restore q to master matrix#1553

Merged
renemadsen merged 2 commits into
stablefrom
feat/use-one-minute-intervals-phase-5-pr7-h1m
May 3, 2026
Merged

Phase 5 PR 7: h1m playwright variant + restore q to master matrix#1553
renemadsen merged 2 commits into
stablefrom
feat/use-one-minute-intervals-phase-5-pr7-h1m

Conversation

@renemadsen
Copy link
Copy Markdown
Member

Summary

  • Adds h1m playwright matrix entry exercising the UseOneMinuteIntervals = true code path against the legacy h/dashboard-edit-a.spec.ts paid-out-flex decimal round-trip suite.
  • Restores q to dotnet-core-master.yml's matrix.test: (regression from PR 1, commit 6cf4d90q is still present in dotnet-core-pr.yml).

Variant details

  • Spec: 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.
  • Multishift-shape pattern: fills 5 ascending shifts with new OFFGRID_TIMES_H1M block (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_0 and assert round-trip before exercising paid-out-flex.
  • Defensive timing (informed by the PR 6 g1m revert): waits for spinner AND a 500ms settle after #workingHoursSite + 'ac ad' site filter, gates dialog open on #planHours visibility, and asserts #saveButton is enabled before every click (never force: true).
  • Seed + post-migration: copied verbatim from f1m/ (which is itself derived from a/).

q-restoration

PR 1 (6cf4d907) extended matrix.test: in dotnet-core-master.yml and accidentally dropped q from the list. PR 2-6 carried the regression forward. This PR restores q 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]

No code changes needed for the q shard itself — the q/ directory has been on stable for many months; only the master CI matrix was missing the entry.

Test plan

  • CI green on dotnet-core-pr.yml
  • h1m playwright shard passes (auto-rerun once if it flakes on inner-ring clock-face)
  • All other shards remain unaffected

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>
Copilot AI review requested due to automatic review settings May 3, 2026 19:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_H1M five-shift off-grid time block for the h1m shard.
  • Introduce h1m/ Playwright shard (spec + post-migration SQL to flip UseOneMinuteIntervals).
  • Update CI workflow matrices to include h1m, and restore q in dotnet-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>
@renemadsen renemadsen merged commit 44d4d13 into stable May 3, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants