Skip to content

Conversation

@gcsecsey
Copy link
Contributor

@gcsecsey gcsecsey commented Nov 27, 2025

Related issues

I noticed that after merging #2054, a couple of tests were still flaky on trunk. This PR fixes the issues reported on these runs: 39bbd-pb

Proposed Changes

  • Increases the timeout for the "View Post" button after post creation
  • Attempts to close the welcome guide modal more times
  • Adds a wait for networkidle after media upload

Testing Instructions

  • CI should be green
  • Visual review

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@gcsecsey gcsecsey requested a review from a team November 27, 2025 16:32
@gcsecsey gcsecsey changed the title Fix/e2e navigation tests Fix navigation e2e tests Nov 27, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2025

📊 Performance Test Results

Comparing 292625e vs trunk

site-editor

Metric trunk 292625e Diff Change
load 10554.00 ms 13569.00 ms +3015.00 ms 🔴 28.6%

site-startup

Metric trunk 292625e Diff Change
siteCreation 25417.00 ms 28471.00 ms +3054.00 ms 🔴 12.0%
siteStartup 8026.00 ms 9062.00 ms +1036.00 ms 🔴 12.9%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

Copy link
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

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

I tested it locally and for me the test creates a post fails. It seems that it correctly clicks the Publish button, but then it automatically clicks the "View post" button even before the post has been saved, so when the posts load, the new post doesn't appear yet.

e2e-view-post-error.mp4

I tested with these two commands:
npx playwright test --grep "Site Navigation" --ui

and

❯ npm run e2e -- site-navigation.test.ts

> [email protected] e2e
> npx playwright install && npx playwright test site-navigation.test.ts


Running 9 tests using 1 worker

  ✓  1 e2e/site-navigation.test.ts:77:6 › Site Navigation › opens site at homepage (626ms)
  ✓  2 e2e/site-navigation.test.ts:94:6 › Site Navigation › opens and automatically logs in to WP Admin (4.9s)
  ✘  3 e2e/site-navigation.test.ts:110:6 › Site Navigation › creates a post (21.6s)
  ✓  4 e2e/site-navigation.test.ts:156:6 › Site Navigation › uploads media (9.3s)
  ✓  5 e2e/site-navigation.test.ts:192:6 › Site Navigation › activates themes (2.4s)
  ✓  6 e2e/site-navigation.test.ts:218:6 › Site Navigation › adds new themes (17.6s)
  ✓  7 e2e/site-navigation.test.ts:247:6 › Site Navigation › activates plugin (3.0s)
  ✓  8 e2e/site-navigation.test.ts:269:6 › Site Navigation › adds new plugin (18.3s)
  ✓  9 e2e/site-navigation.test.ts:299:6 › Site Navigation › "Post name" permalink structure works (13.6s)


  1) e2e/site-navigation.test.ts:110:6 › Site Navigation › creates a post ──────────────────────────

    Error: Timed out 10000ms waiting for expect(locator).toBeVisible()

    Locator: locator('a.row-title:has-text("E2E Test Post")')
    Expected: visible
    Received: <element(s) not found>
    Call log:
      - expect.toBeVisible with timeout 10000ms
      - waiting for locator('a.row-title:has-text("E2E Test Post")')


      151 |             // Verify post was created by visiting posts list
      152 |             await page.goto( getUrlWithAutoLogin( `${ wpAdminUrl }/edit.php` ) );
    > 153 |             await expect( page.locator( 'a.row-title:has-text("E2E Test Post")' ) ).toBeVisible();
          |                                                                                     ^
      154 |     } );
      155 |
      156 |     test( 'uploads media', async ( { page } ) => {
        at /Users/macbookpro/Documents/projects-m3.nosync/studio/e2e/site-navigation.test.ts:153:75

    Error Context: test-results/site-navigation-Site-Navigation-creates-a-post/error-context.md

    attachment #2: trace (application/zip) ─────────────────────────────────────────────────────────
    test-results/site-navigation-Site-Navigation-creates-a-post/trace.zip
    Usage:

        npx playwright show-trace test-results/site-navigation-Site-Navigation-creates-a-post/trace.zip

    ────────────────────────────────────────────────────────────────────────────────────────────────

  1 failed
    e2e/site-navigation.test.ts:110:6 › Site Navigation › creates a post ───────────────────────────
  8 passed (2.3m)

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.

3 participants