test(calendar): e2e regression for edit-keeps-event-visible#7919
Merged
Conversation
Adds a Playwright spec guarding the backend-configuration calendar bug where editing an event removed it from the week view. Creates a weekly Sunday event (which pre-fix would not render in its own week), asserts it renders, edits it, and asserts it stays visible. Idempotent across reruns. Backend fix lives in eform-backendconfiguration-plugin (GetTasksForWeek occurrence generation). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a Playwright e2e regression test to guard against the backend-configuration calendar bug where editing a weekly Sunday event caused it to disappear from the week view, plus a small page object to encapsulate the calendar create/edit/save flows used by the test.
Changes:
- Adds an e2e spec that creates (if missing) a weekly Sunday event, asserts it renders, edits it, and asserts it remains visible.
- Introduces a
BackendConfigurationCalendarPagepage object with helpers for navigation, creating a recurring event, editing, and saving (including optional recurring-scope confirmation).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| eform-client/playwright/e2e/Tests/backend-configuration-calendar/calendar.edit-event-stays-visible.spec.ts | New regression spec covering “edit keeps event visible” behavior with idempotent setup. |
| eform-client/playwright/e2e/Page objects/BackendConfigurationCalendar.page.ts | New calendar page object wrapping selectors and create/edit/save workflows for the regression test. |
| * missing, so reruns reuse the same event instead of accumulating tiles (which | ||
| * would otherwise occupy the create slot and break click-to-create). | ||
| */ | ||
| test.describe('Backend configuration calendar - edit keeps event visible', () => { |
Comment on lines
+42
to
+44
| if ((await calendar.eventByTitle(BASE).count()) === 0) { | ||
| await calendar.createWeeklyEvent(SUNDAY, CREATE_HOUR, BASE, 'Ugentlig'); | ||
| } |
Comment on lines
+47
to
+49
| test.afterAll(async () => { | ||
| await page.close(); | ||
| }); |
Comment on lines
+23
to
+26
| /** Clickable day cells in the week grid (#cal-day-0 .. #cal-day-6). */ | ||
| dayColumns(): Locator { | ||
| return this.page.locator('.day-cell-content'); | ||
| } |
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
Playwright e2e regression guard for the backend-configuration calendar bug where editing an event removed it from the week view.
The spec creates a weekly Sunday event (the exact shape that pre-fix would not render in its own week), asserts it renders, edits its title, and asserts it stays visible. It's idempotent across reruns (stable title, create-only-if-missing) so it doesn't accumulate tiles or break click-to-create.
Adds:
playwright/e2e/Page objects/BackendConfigurationCalendar.page.ts— calendar page object (create/edit/save helpers).playwright/e2e/Tests/backend-configuration-calendar/calendar.edit-event-stays-visible.spec.tsCompanion
The backend + frontend fix is in eform-backendconfiguration-plugin#884. This PR only adds the e2e test (the Playwright suite lives in this repo, not the plugin repo).
Passes locally against the running app (2/2).
🤖 Generated with Claude Code