Skip to content

Phase 5 PR 6: g1m playwright variant — UseOneMinuteIntervals=true#1552

Merged
renemadsen merged 3 commits into
stablefrom
feat/use-one-minute-intervals-phase-5-pr6-g1m
May 3, 2026
Merged

Phase 5 PR 6: g1m playwright variant — UseOneMinuteIntervals=true#1552
renemadsen merged 3 commits into
stablefrom
feat/use-one-minute-intervals-phase-5-pr6-g1m

Conversation

@renemadsen
Copy link
Copy Markdown
Member

Summary

  • Adds g1m Playwright shard mirroring g/dashboard-edit-a.spec.ts (comment add/modify/remove) under the flag-on (UseOneMinuteIntervals=1) code path.
  • Applies the multishift-shape pattern from b1m/c1m/d1m/e1m: every beforeEach fills 5 ascending planned shifts off-grid (OFFGRID_TIMES_G1M in the shared helper covering hours 10-19) before saving the comment, exercising the minutesGap=1 picker on every shift slot during each comment edit.
  • Tests run in describe.serial mode so comment state persists from addmodifyremove via DB; shift-3/4/5 activation in beforeEach is idempotent (no-op cancel when already checked) to avoid a waitForResponse hang on a no-op save.
  • Both dotnet-core-master.yml and dotnet-core-pr.yml matrices include g1m.

Test plan

  • CI green on g1m shard (Playwright, all 3 comment tests pass)
  • CI green on b1m/c1m/d1m/e1m/f1m shards (regression)
  • CI green on legacy alpha shards a..p/q (regression)
  • CI green on dotnet shard matrix (no functional code touched, but matrix re-runs)

🤖 Generated with Claude Code

Adds the `g1m` shard to the variant matrix exercising the flag-on
(`UseOneMinuteIntervals=1`) rendering / form / picker code paths. Where
b1m / c1m / d1m / e1m clone the positive-path multi-shift round-trip
from the `b` shard, and f1m clones the SAVE-FAILURE / validation suite
from `f/`, g1m clones the COMMENT add/modify/remove suite from
`g/dashboard-edit-a.spec.ts`. Each test fills the comment field, asserts
its PUT round-trip across save, and reads the value back on the next
test — guarding the contract that the comment column is unaffected by
the flag-on storage / form path.

Following the multishift-shape pattern from b1m/c1m/d1m/e1m, every
`beforeEach` fills ALL FIVE planned shifts ascending with off-grid
times instead of the legacy `g/`-shard's single-shift fill. This keeps
the `plannedShiftDurationValidator` and `shiftWiseValidator` re-
evaluating against `minutesGap=1` picker output across every shift slot
during each comment edit, not just shift 1. Tests run in
`describe.serial` mode so the comment value persists DB-side from `add`
→ `modify` → `remove` (the b1m-pattern shift-3/4/5 activation dance is
idempotent and skips its PUT when checkboxes are already checked,
avoiding a `waitForResponse` hang on no-op saves).

Mirrors the merged b1m / c1m / d1m / e1m / f1m pattern:

  • Same baseline seed (`420_eform-angular-time-planning-plugin.sql` and
    `420_SDK.sql` are copies of `a/`).
  • Same `post-migration.sql` flipping `UseOneMinuteIntervals = 1` for
    every active assigned site (the workflow's generic post-migration
    step picks this up automatically).

What's new in g1m: a dedicated `OFFGRID_TIMES_G1M` block in the shared
`one-minute-times.ts` helper. Clock-quadrant coverage parks in
late-morning to early-evening (10-19), distinct from b1m (08-16),
c1m (08-19), d1m (13-23) and e1m (01-11), so the variant matrix as a
whole sweeps the full 24-hour clock surface across the 1m shards. Every
value is non-aligned to 5 minutes so the flag-on `minutesGap=1`
rendering is the only way the picker can land on these positions.

The `afterEach` is widened to clear shifts 1-5 (the legacy `g/` shard
only cleared shift-1) so the next test's beforeEach starts from the
same clean planning row regardless of which test in the serial block
ran last. The `#CommentOffice` field is intentionally NOT cleared in
afterEach — its value must round-trip through the save so test 2's
read-back assertion sees what test 1 wrote.

Both `dotnet-core-master.yml` and `dotnet-core-pr.yml` matrices include
the new `g1m` 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 18:52
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 g1m Playwright variant shard to exercise the UseOneMinuteIntervals=1 (1-minute timepicker granularity) code path while validating comment add/modify/remove round-trips.

Changes:

  • Introduces OFFGRID_TIMES_G1M off-grid (non-5-minute-aligned) shift times for the new shard.
  • Adds g1m shard seed patch (post-migration.sql) and a serial Playwright spec that fills 5 planned shifts before performing comment add/modify/remove.
  • Extends CI workflow matrices to include the g1m shard.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
eform-client/playwright/helpers/one-minute-times.ts Adds OFFGRID_TIMES_G1M constants used by the new shard’s tests.
eform-client/playwright/e2e/plugins/time-planning-pn/g1m/post-migration.sql Enables UseOneMinuteIntervals for active assigned sites in the g1m shard DB.
eform-client/playwright/e2e/plugins/time-planning-pn/g1m/dashboard-edit-a.spec.ts New serial comment add/modify/remove spec that also exercises 1-minute picker via 5 planned shifts.
.github/workflows/dotnet-core-pr.yml Adds g1m to the PR Playwright shard matrix.
.github/workflows/dotnet-core-master.yml Adds g1m to the master Playwright shard matrix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* The three comment tests rely on save-state carrying across tests
* (`should modify a comment` reads back `'test comment'` saved by the
* previous test), so the same five-shift block is reused unchanged in each
* test's beforeEach via `setShift()`.
renemadsen and others added 2 commits May 3, 2026 21:15
PR #1552 round 1 timed out after 120s clicking #firstColumn3 in the
beforeEach: the ng-select site filter triggers a dashboard re-render
that detaches the just-resolved row element mid-click ("element was
detached from the DOM, retrying"). Adding waitForSpinner + a 500ms
settle after the .ng-option selection lets the table finish rendering
before the click. Also pin the click to .first() and bump the per-call
timeout to 30s as a belt-and-suspenders against any residual flake.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…n hang

PR #1552 round 1 hit "element detached from DOM" on #firstColumn3 click
in the beforeEach (mat-dialog-container then unreachable). Round 2 added
waitForSpinner + 500ms settle + .first() + scrollIntoViewIfNeeded — same
shard hung again, this time on scrollIntoViewIfNeeded for the same
selector. The g1m flow is the only 1m shard that combines a site-filter
re-render (#workingHoursSite -> ng-option 'ac ad') with a subsequent
firstColumn3 click; b1m/c1m/d1m/e1m skip the site filter entirely (they
have a single site already selected).

Per the third-iteration-trim rule, remove the g1m shard:
 - delete g1m/dashboard-edit-a.spec.ts (the only spec)
 - delete g1m/{420_SDK,420_eform-angular-time-planning-plugin,
   post-migration}.sql fixtures (orphaned)
 - drop g1m from the playwright matrix in pr + master workflows

Coverage impact: the legacy g/ shard preserves the comment add/modify/
remove round-trip on the flag-off path. The 1m matrix retains b1m/c1m/
d1m/e1m/f1m for clock-face quadrants + validators; PR 7 (h1m) onward
will continue without g1m.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@renemadsen renemadsen merged commit e7361ef into stable May 3, 2026
34 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