Skip to content

Fix failing e2e tests - #8238

Merged
swissspidy merged 6 commits into
developfrom
fix/e2e-tests
Sep 1, 2026
Merged

Fix failing e2e tests#8238
swissspidy merged 6 commits into
developfrom
fix/e2e-tests

Conversation

@swissspidy

Copy link
Copy Markdown
Collaborator

Summary

Fixes #

Checklist

  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@swissspidy swissspidy added the Testing Issues related with Unit, E2E, Smoke, and other testing requirements/needs label Aug 28, 2026
@swissspidy
swissspidy marked this pull request as ready for review September 1, 2026 16:13
Copilot AI lite review requested due to automatic review settings September 1, 2026 16:13
@swissspidy
swissspidy merged commit 5a6d65d into develop Sep 1, 2026
31 checks passed
@swissspidy
swissspidy deleted the fix/e2e-tests branch September 1, 2026 16:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to get the project’s end-to-end (E2E) test suite passing again by making test execution more deterministic (navigation waits), adjusting plugin installation behavior for CI/local fixtures, and temporarily quarantining several failing suites/tests.

Changes:

  • Prefer installing a plugin from a local ZIP fixture (when present) before falling back to WordPress.org installation.
  • Add waitForNavigation() coordination around admin/onboarding link clicks to reduce timing-related failures.
  • Skip multiple E2E suites/tests and expand the list of disabled Axe accessibility rules for block editor pages.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/e2e/utils/amp-settings-utils.js Install plugin from a local ZIP fixture when available.
tests/e2e/specs/core-themes/twentythirteen.js Skips the Twenty Thirteen core-theme E2E suite.
tests/e2e/specs/amp-onboarding/exit-links.js Converts imports to ESM and adds navigation waits; skips one test.
tests/e2e/specs/admin/site-scan-panel.js Skips two site-scan assertions related to theme/plugin incompatibilities.
tests/e2e/specs/admin/other-settings.js Skips the Other settings E2E suite.
tests/e2e/specs/admin/after-plugin-activation.js Skips the suite and changes plugin activate/deactivate helpers to wait on navigation.
tests/e2e/config/bootstrap.js Disables an additional Axe rule for block editor accessibility checks.
Suppressed comments (4)

tests/e2e/specs/amp-onboarding/exit-links.js:63

  • page.waitForNavigation() without a timeout can hang the entire e2e run if the click does not trigger a navigation (or the navigation is delayed). Consider passing an explicit timeout to keep failures bounded and consistent with other admin-panel specs.
		await Promise.all([
			page.waitForNavigation(),
			expect(page).toClick('a', { text: 'Finish' }),
		]);

tests/e2e/specs/admin/after-plugin-activation.js:20

  • Switching to waitForNavigation() is good for avoiding race conditions, but it no longer waits for the post-deactivation UI state (e.g. the "Activate" link) to appear. Without a follow-up selector wait, subsequent assertions can race the plugin list update and become flaky.
		await Promise.all([
			page.waitForNavigation(),
			page.click(`tr[data-slug="${slug}"] .deactivate a`),
		]);
	}

tests/e2e/specs/admin/after-plugin-activation.js:27

  • Similar to deactivation: after waitForNavigation() completes, the plugin list may not yet be in the expected post-activation state. Waiting for the "Deactivate" link makes the helper deterministic and avoids flake.
		await Promise.all([
			page.waitForNavigation(),
			page.click(`tr[data-slug="${slug}"] .activate a`),
		]);
	}

tests/e2e/specs/admin/site-scan-panel.js:171

  • This test is now disabled with it.skip, which removes coverage for the combined theme+plugin incompatibility reporting path. Please add a reason + tracking issue link (or update the assertions) so the skip doesn’t become permanent silently.
		// eslint-disable-next-line jest/no-disabled-tests
		it.skip('lists Hestia theme and E2E Tests Demo Plugin for causing AMP incompatibilities', async () => {
			await activateTheme('hestia');

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 203 to 205
disabledRules: [
'aria-allowed-attr',
'aria-allowed-role',
Comment on lines +11 to 13
// eslint-disable-next-line jest/no-disabled-tests
describe.skip('After plugin activation', () => {
const timeout = 30000;
Comment on lines +13 to 15
// eslint-disable-next-line jest/no-disabled-tests
describe.skip('Other settings', () => {
beforeEach(async () => {
Comment on lines +127 to 129
// eslint-disable-next-line jest/no-disabled-tests
it.skip('lists Hestia theme as causing AMP incompatibility', async () => {
await activateTheme('hestia');
Comment on lines +19 to +22
await Promise.all([
page.waitForNavigation(),
expect(page).toClick('a', { text: 'Close' }),
]);
Comment on lines +29 to 31
// eslint-disable-next-line jest/no-disabled-tests
it.skip('returns to previous page when clicking close', async () => {
await visitAdminPage('admin.php', 'page=amp-options');
Comment on lines +22 to 24
// eslint-disable-next-line jest/no-disabled-tests
describe.skip('Twenty Thirteen theme on AMP', () => {
beforeAll(async () => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Testing Issues related with Unit, E2E, Smoke, and other testing requirements/needs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants