-
Notifications
You must be signed in to change notification settings - Fork 77
E2e reliability and performance #2201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
0b0c761
feat(run-e2e): add shared fixtures and Mendix helpers for E2E tests
samuelreichert b7e1c46
feat(run-e2e): harden playwright config with timeouts and screenshot …
samuelreichert 8177ab5
fix(turbo): update e2e task inputs from stale cypress refs to playwright
samuelreichert a3510bf
feat(run-e2e): add playwright ESLint rules to prevent new flakiness
samuelreichert a2b6305
feat(run-e2e): add codemod script to migrate specs to shared fixtures
samuelreichert 0d22111
fix(e2e): replace all waitForTimeout with event-based waits
samuelreichert 2d6bc1e
refactor(e2e): migrate all specs to shared fixtures and helpers
samuelreichert 70e54cc
fix(e2e): remove per-test screenshot threshold and maxDiffPixels over…
samuelreichert 1c1125a
perf(e2e): parallelize nightly workflow with 4 matrix runners
samuelreichert c324647
feat(run-e2e): add smoke suite support via E2E_SUITE env var and @smo…
samuelreichert beaf779
feat(run-e2e): add shared checkAccessibility helper
samuelreichert b8ee67b
fix(run-e2e): add exports field for fixtures and mendix-helpers
samuelreichert 45c207b
fix(run-e2e): waitForMendixApp must wait for page render and network …
samuelreichert 02ae9fc
fix(e2e): migrate remaining specs that codemod missed (expect,test or…
samuelreichert 6c51983
fix(run-e2e): worker-scoped session and waitForFunction timeout fix
samuelreichert 303a637
fix(datagrid-web): eliminate race conditions in filter e2e tests
samuelreichert 076e898
fix(e2e): remove flaky patterns from video-player and checkbox-radio …
samuelreichert 3a4d1a2
fix(run-e2e): remove networkidle from waitForMendixApp, add opt-in wa…
samuelreichert 776393a
chore(run-e2e): remove migrate-spec.mjs one-time migration script
samuelreichert 3ad71e8
fix(badge-button-web): remove racy nth(1) assertion in close page test
samuelreichert 244ef33
fix(run-e2e): reduce local workers from 4 to 2
samuelreichert b817e15
docs(e2e): add Playwright test guidelines and update AGENTS.md
samuelreichert d72d76f
test(e2e): update chromium-linux snapshots
samuelreichert ad01db8
test(gallery-web): ensure text filter input has focus before screenshot
samuelreichert 7b61dd6
test(line-chart-web): wait for Plotly render before screenshot to fix…
samuelreichert f1e30a4
test(e2e): update snapshots for badge button, slider, and tooltip com…
samuelreichert 52ec562
test(e2e): update SkipLink tests for focus context and visibility checks
samuelreichert 089902e
test(e2e): update DataGridDropDownFilter tests to target correct elem…
samuelreichert 8eca6ab
test(e2e): enhance heatmap chart tests to verify additional elements …
samuelreichert 850c5ad
test(e2e): fix skiplink visibility checks using getBoundingClientRect
samuelreichert 6293b46
test(e2e): use toBeInViewport and drop stale count assertion
samuelreichert c09697a
test(e2e): enhance external video poster rendering checks and add scr…
samuelreichert 7028fdd
test(e2e): fix race condition and locator iteration in number filter …
samuelreichert 28debe1
docs(e2e): consolidate guidelines, remove duplication
samuelreichert 663cb6a
test(progress-bar): wait for template grid data before asserting
samuelreichert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /* eslint-disable no-undef */ | ||
| import { test as base, expect } from "@playwright/test"; | ||
|
|
||
| async function waitForMendixApp(page, timeout = 60_000) { | ||
| await page.waitForLoadState("domcontentloaded"); | ||
| await page.waitForFunction( | ||
| () => | ||
| Boolean(window.mx?.session) && | ||
| !document.querySelector(".mx-progress-indicator") && | ||
| document.querySelector(".mx-page") !== null, | ||
| undefined, | ||
| { timeout } | ||
| ); | ||
| } | ||
|
|
||
| export { expect }; | ||
|
|
||
| export const test = base.extend({ | ||
| mendixSession: [ | ||
| async ({ browser }, use) => { | ||
| const context = await browser.newContext(); | ||
| const page = await context.newPage(); | ||
| const originalGoto = page.goto.bind(page); | ||
| page.goto = async (url, options) => { | ||
| const response = await originalGoto(url, options); | ||
| await waitForMendixApp(page); | ||
| return response; | ||
| }; | ||
| await use({ context, page }); | ||
| await page.evaluate(() => window.mx?.session?.logout?.()).catch(() => {}); | ||
| await context.close(); | ||
| }, | ||
| { scope: "worker" } | ||
| ], | ||
| page: async ({ mendixSession }, use) => { | ||
| await use(mendixSession.page); | ||
| } | ||
| }); |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| /* eslint-disable no-undef */ | ||
| import { expect } from "@playwright/test"; | ||
|
|
||
| export async function waitForMendixApp(page, timeout = 60_000) { | ||
| await page.waitForLoadState("domcontentloaded"); | ||
| await page.waitForFunction( | ||
| () => | ||
| Boolean(window.mx?.session) && | ||
| !document.querySelector(".mx-progress-indicator") && | ||
| document.querySelector(".mx-page") !== null, | ||
| undefined, | ||
| { timeout } | ||
| ); | ||
| } | ||
|
|
||
| export async function waitForDataReady(page, timeout = 60_000) { | ||
| await waitForMendixApp(page, timeout); | ||
| await page.waitForLoadState("networkidle"); | ||
| } | ||
|
|
||
| export async function waitForWidget(page, mxName, timeout = 15_000) { | ||
| const locator = page.locator(`.mx-name-${mxName}`); | ||
| await expect(locator).toBeVisible({ timeout }); | ||
| return locator; | ||
| } | ||
|
|
||
| export async function waitForListData(page, mxName, minRows = 1, timeout = 15_000) { | ||
| const container = page.locator(`.mx-name-${mxName}`); | ||
| await expect(container).toBeVisible({ timeout }); | ||
| const rows = container.locator("[class*='item'], tr[class*='row'], [class*='gallery-item']"); | ||
| await expect(rows).toHaveCount(minRows, { timeout }); | ||
| return rows; | ||
| } | ||
|
|
||
| export async function safeLogout(page) { | ||
| await page.evaluate(() => window.mx?.session?.logout?.()).catch(() => {}); | ||
| } | ||
|
|
||
| export async function navigateToPage(page, path, timeout = 30_000) { | ||
| await page.goto(path); | ||
| await waitForMendixApp(page, timeout); | ||
| } | ||
|
|
||
| export async function checkAccessibility(page, selector, options = {}) { | ||
| const AxeBuilder = (await import("@axe-core/playwright")).default; | ||
| let builder = new AxeBuilder({ page }).withTags(options.tags || ["wcag21aa"]); | ||
| if (selector) { | ||
| builder = builder.include(selector); | ||
| } | ||
| if (options.exclude) { | ||
| for (const sel of [].concat(options.exclude)) { | ||
| builder = builder.exclude(sel); | ||
| } | ||
| } | ||
| const results = await builder.analyze(); | ||
| expect(results.violations).toEqual([]); | ||
| } |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.