diff --git a/automation/run-e2e/docker/docker-compose.yml b/automation/run-e2e/docker/docker-compose.yml index e3fb6aa4fb..32336ca6d6 100644 --- a/automation/run-e2e/docker/docker-compose.yml +++ b/automation/run-e2e/docker/docker-compose.yml @@ -29,6 +29,7 @@ services: # Starts after mxbuild completes; "docker compose up --wait" blocks until healthy. mxruntime: image: mxruntime:${MENDIX_VERSION:?MENDIX_VERSION is required} + shm_size: "2gb" depends_on: mxbuild: condition: service_completed_successfully diff --git a/automation/run-e2e/playwright.config.cjs b/automation/run-e2e/playwright.config.cjs index cbafb7f825..0c80130f21 100644 --- a/automation/run-e2e/playwright.config.cjs +++ b/automation/run-e2e/playwright.config.cjs @@ -41,7 +41,28 @@ module.exports = defineConfig({ baseURL: process.env.URL ? process.env.URL : "http://127.0.0.1:8080", /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: "on-first-retry" + trace: "on-first-retry", + + launchOptions: { + args: [ + "--disable-dev-shm-usage", + "--disable-extensions", + "--disable-background-networking", + "--disable-background-timer-throttling", + "--disable-renderer-backgrounding", + "--disable-sync", + "--disable-translate", + "--disable-default-apps", + "--disable-hang-monitor", + "--metrics-recording-only", + "--no-first-run", + "--font-render-hinting=none" + ] + }, + + contextOptions: { + reducedMotion: "reduce" + } }, /* Configure projects for major browsers */ diff --git a/packages/pluggableWidgets/datagrid-web/e2e/filtering/DataGridFilteringIntegration.spec.js-snapshots/datagridFilteringIntegration-chromium-linux.png b/packages/pluggableWidgets/datagrid-web/e2e/filtering/DataGridFilteringIntegration.spec.js-snapshots/datagridFilteringIntegration-chromium-linux.png index 62a88e58a8..fd79236deb 100644 Binary files a/packages/pluggableWidgets/datagrid-web/e2e/filtering/DataGridFilteringIntegration.spec.js-snapshots/datagridFilteringIntegration-chromium-linux.png and b/packages/pluggableWidgets/datagrid-web/e2e/filtering/DataGridFilteringIntegration.spec.js-snapshots/datagridFilteringIntegration-chromium-linux.png differ diff --git a/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartAscending-chromium-linux.png b/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartAscending-chromium-linux.png index eec886b8d7..100b95378c 100644 Binary files a/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartAscending-chromium-linux.png and b/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartAscending-chromium-linux.png differ diff --git a/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartCustomColor-chromium-linux.png b/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartCustomColor-chromium-linux.png index 912920535b..801392db0e 100644 Binary files a/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartCustomColor-chromium-linux.png and b/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartCustomColor-chromium-linux.png differ diff --git a/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartDescending-chromium-linux.png b/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartDescending-chromium-linux.png index 1d7f95e9b6..38acfb5e02 100644 Binary files a/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartDescending-chromium-linux.png and b/packages/pluggableWidgets/heatmap-chart-web/e2e/HeatMapChart.spec.js-snapshots/heatmapChartDescending-chromium-linux.png differ diff --git a/packages/pluggableWidgets/skiplink-web/e2e/SkipLink.spec.js b/packages/pluggableWidgets/skiplink-web/e2e/SkipLink.spec.js index e36eee53ad..178384ec0b 100644 --- a/packages/pluggableWidgets/skiplink-web/e2e/SkipLink.spec.js +++ b/packages/pluggableWidgets/skiplink-web/e2e/SkipLink.spec.js @@ -12,37 +12,34 @@ test.beforeEach(async ({ page }) => { test.describe("SkipLink:", function () { test("skip link is present in DOM but initially hidden", async ({ page }) => { - // Skip link should be in the DOM but not visible const skipLink = page.locator(".widget-skip-link").first(); await expect(skipLink).toBeAttached(); - - // Check initial styling (hidden) - const transform = await skipLink.evaluate(el => getComputedStyle(el).transform); - expect(transform).toContain("matrix(1, 0, 0, 1, 0, -48)"); + + // Element is translated above the viewport — its bottom edge should be at or above y=0 + const rect = await skipLink.evaluate(el => el.getBoundingClientRect().toJSON()); + expect(rect.bottom).toBeLessThanOrEqual(0); }); test("skip link becomes visible when focused via keyboard", async ({ page }) => { - // Tab to focus the skip link (should be first focusable element) const skipLink = page.locator(".widget-skip-link").first(); await page.keyboard.press("Tab"); - + await expect(skipLink).toBeFocused(); - await page.waitForTimeout(1000); - // Check that it becomes visible when focused - const transform = await skipLink.evaluate(el => getComputedStyle(el).transform); - expect(transform).toContain("matrix(1, 0, 0, 1, 0, 0)") + // Element should now be within the viewport + const rect = await skipLink.evaluate(el => el.getBoundingClientRect().toJSON()); + expect(rect.top).toBeGreaterThanOrEqual(0); }); test("skip link navigates to main content when activated", async ({ page }) => { // Tab to focus the skip link await page.keyboard.press("Tab"); - + const skipLink = page.locator(".widget-skip-link").first(); await expect(skipLink).toBeFocused(); - + // Activate the skip link await page.keyboard.press("Enter"); - + // Check that main content is now focused const mainContent = page.locator("main"); await expect(mainContent).toBeFocused(); @@ -50,13 +47,13 @@ test.describe("SkipLink:", function () { test("skip link has correct attributes and text", async ({ page }) => { const skipLink = page.locator(".widget-skip-link").first(); - + // Check default text await expect(skipLink).toHaveText("Skip to main content"); - + // Check href attribute await expect(skipLink).toHaveAttribute("href", "#"); - + // Check CSS class await expect(skipLink).toHaveClass("widget-skip-link mx-name-skipLink1"); }); @@ -64,11 +61,11 @@ test.describe("SkipLink:", function () { test("visual comparison", async ({ page }) => { // Tab to make skip link visible for screenshot await page.keyboard.press("Tab"); - + const skipLink = page.locator(".widget-skip-link").first(); await expect(skipLink).toBeFocused(); - + // Visual comparison of focused skip link await expect(skipLink).toHaveScreenshot("skiplink-focused.png"); }); -}); \ No newline at end of file +}); diff --git a/packages/pluggableWidgets/skiplink-web/e2e/SkipLink.spec.js-snapshots/skiplink-focused-chromium-linux.png b/packages/pluggableWidgets/skiplink-web/e2e/SkipLink.spec.js-snapshots/skiplink-focused-chromium-linux.png index 34157374d2..279ca41157 100644 Binary files a/packages/pluggableWidgets/skiplink-web/e2e/SkipLink.spec.js-snapshots/skiplink-focused-chromium-linux.png and b/packages/pluggableWidgets/skiplink-web/e2e/SkipLink.spec.js-snapshots/skiplink-focused-chromium-linux.png differ diff --git a/packages/pluggableWidgets/video-player-web/e2e/VideoPlayer.spec.js-snapshots/videoPlayerExternalPoster-chromium-linux.png b/packages/pluggableWidgets/video-player-web/e2e/VideoPlayer.spec.js-snapshots/videoPlayerExternalPoster-chromium-linux.png index 9e85601584..51c7d1d31d 100644 Binary files a/packages/pluggableWidgets/video-player-web/e2e/VideoPlayer.spec.js-snapshots/videoPlayerExternalPoster-chromium-linux.png and b/packages/pluggableWidgets/video-player-web/e2e/VideoPlayer.spec.js-snapshots/videoPlayerExternalPoster-chromium-linux.png differ