Skip to content
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

PLANET-7691 Upgrade Playwright to latest version #2498

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mleray
Copy link
Contributor

@mleray mleray commented Jan 15, 2025

Description

See PLANET-7691

Changes:

The actual upgrade didn't require a lot of changes, so I took the opportunity to improve our tests:

  • Replaced deprecated type function with fill
  • Cleaned up code (unused parameters, functions, etc)
  • Simplified the Covers test since it only has the "Take Action" style now
  • Updated some of the slowest tests: Articles, Carousel Header, Related Posts

Testing

On local it should be enough to run npm i --legacy-peer-deps, but if not you can first clean up and re-install:

  • npm uninstall @playwright/test && npm uninstall @wordpress/e2e-test-utils-playwright
  • npm i --legacy-peer-deps
  • npx playwright install

You can check which version you are running using npx playwright --version

@mleray mleray self-assigned this Jan 15, 2025
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 15, 2025
/unhold 78722614-af83-4c8c-bf3f-b62ed03feba9
@mleray mleray force-pushed the playwright-upgrade branch from 21f29b2 to bab031e Compare January 15, 2025 14:26
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 15, 2025
/unhold 234db730-f6a3-479c-a66a-f2e6789b348d
@mleray mleray force-pushed the playwright-upgrade branch from bab031e to 131ef19 Compare January 15, 2025 14:28
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 15, 2025
/unhold 49011e8a-b572-4fcf-bed5-359e764e0d83
@mleray mleray force-pushed the playwright-upgrade branch from 131ef19 to 10c1488 Compare January 15, 2025 14:34
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 15, 2025
/unhold ada4fbd3-c454-4d10-a83f-a17f7e926b90
@planet-4
Copy link
Contributor

planet-4 commented Jan 15, 2025

Test instance is ready 🚀

🌑 leda | admin | blocks report | CircleCI | composer-local.json

⌚ 2025.01.28 14:27:57

@mleray mleray force-pushed the playwright-upgrade branch from 10c1488 to caf1454 Compare January 15, 2025 14:59
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 15, 2025
/unhold 5cafd609-5e2d-4395-9f2f-f59b241350c8
@mleray mleray force-pushed the playwright-upgrade branch from caf1454 to 3247560 Compare January 15, 2025 15:24
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 15, 2025
/unhold 242a0667-130b-4562-af01-8f7a4a6f2bd3
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 15, 2025
/unhold cd6ad4c0-ea56-4af1-a8de-45083509da35
@mleray mleray force-pushed the playwright-upgrade branch from 3247560 to 243f8b5 Compare January 15, 2025 16:11
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 15, 2025
/unhold ac78d885-c649-4847-ae81-fa87c3f12483
@mleray mleray force-pushed the playwright-upgrade branch from 243f8b5 to 18f494c Compare January 15, 2025 16:30
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 15, 2025
/unhold 2b662cce-e36f-4afb-a952-017a863cdfcb
@mleray mleray force-pushed the playwright-upgrade branch from 18f494c to fdb46f6 Compare January 16, 2025 09:02
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 16, 2025
/unhold 5b190ec9-f91b-4d32-800c-d25864e308aa
@mleray mleray force-pushed the playwright-upgrade branch from fdb46f6 to 4cae9eb Compare January 16, 2025 09:24
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 16, 2025
/unhold d1db9c6d-1ee8-48d3-8152-a847c27a12e6
@mleray mleray force-pushed the playwright-upgrade branch from 4cae9eb to ed225de Compare January 16, 2025 09:45
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 16, 2025
/unhold 489c7860-4936-496b-b0f1-91626af2e59b
@mleray mleray force-pushed the playwright-upgrade branch from ed225de to df503ef Compare January 16, 2025 10:12
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 16, 2025
/unhold 9afb6956-8662-4b46-87b0-eafdee2a1357
@mleray mleray force-pushed the playwright-upgrade branch from df503ef to d2b951e Compare January 16, 2025 10:28
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 16, 2025
/unhold 3466abb8-2b27-4010-846d-eb43783b2443
@mleray mleray force-pushed the playwright-upgrade branch from d2b951e to 0ef6c06 Compare January 16, 2025 10:35
@mleray mleray force-pushed the playwright-upgrade branch 2 times, most recently from 4b443d2 to 26843e3 Compare January 17, 2025 15:01
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 17, 2025
/unhold 83ac606d-b301-48de-8242-45cd7335b2f6
@mleray mleray force-pushed the playwright-upgrade branch from 26843e3 to a6bece4 Compare January 17, 2025 15:55
@mleray mleray requested a review from mardelnet January 17, 2025 15:55
@mleray mleray added the Review label Jan 17, 2025
@mleray mleray marked this pull request as ready for review January 17, 2025 15:56
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 17, 2025
/unhold 36d9dc09-1da1-40e9-a08c-a0437b6b412b
@mleray mleray requested review from a team and GP-Dan-Tovbein and removed request for a team January 20, 2025 09:42
@mleray mleray force-pushed the playwright-upgrade branch from a6bece4 to 90805d6 Compare January 24, 2025 09:19
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 24, 2025
/unhold b6d13a88-2ffb-4d06-b9bd-5469477545ae
Copy link
Contributor

@GP-Dan-Tovbein GP-Dan-Tovbein left a comment

Choose a reason for hiding this comment

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

Code looks good to me! However, I'm getting too many specs failing on my local

  Slow test file: [firefox] › greenpeace-media.spec.js (30.9s)
  Slow test file: [firefox] › blocks/carousel-header.spec.js (29.3s)
  Slow test file: [chromium] › greenpeace-media.spec.js (28.5s)
  Slow test file: [firefox] › blocks/covers-take-action.spec.js (22.5s)
  Slow test file: [firefox] › blocks/spreadsheet.spec.js (20.4s)
  Consider splitting slow test files to speed up parallel execution
  32 failed
    [chromium] › gravity-forms.spec.js:55:7 › Gravity Forms tests › check the confirmation message, text type 
    [chromium] › password-protected-content.spec.js:9:5 › check password protected content ─────────
    [chromium] › search.spec.js:6:5 › check search works ───────────────────────────────────────────
    [firefox] › gravity-forms.spec.js:55:7 › Gravity Forms tests › check the confirmation message, text type 
    [firefox] › password-protected-content.spec.js:9:5 › check password protected content ──────────
    [firefox] › search.spec.js:6:5 › check search works ────────────────────────────────────────────
    [webkit] › 404.spec.js:3:5 › check the 404 page ────────────────────────────────────────────────
    [webkit] › blocks/articles.spec.js:11:5 › Test Articles block ──────────────────────────────────
    [webkit] › blocks/carousel-header.spec.js:51:5 › Create and check carousel header block ────────
    [webkit] › blocks/columns-icons.spec.js:7:5 › Test Columns block with Icons style ──────────────
    [webkit] › blocks/columns-images.spec.js:7:5 › Test Columns block with Images style ────────────
    [webkit] › blocks/columns-no-image.spec.js:7:5 › Test Columns block with No Image style ────────
    [webkit] › blocks/columns-tasks.spec.js:7:5 › Test Columns block with Tasks style ──────────────
    [webkit] › blocks/covers-take-action.spec.js:7:5 › Test Covers block with Take Action covers style 
    [webkit] › blocks/spreadsheet.spec.js:10:5 › Test Spreadsheet block ────────────────────────────
    [webkit] › blocks/take-action-boxout.spec.js:21:7 › Test Take Action Boxout block › Take Action Boxout with existing page 
    [webkit] › blocks/take-action-boxout.spec.js:38:7 › Test Take Action Boxout block › Take Action Boxout with custom fields 
    [webkit] › blocks-report-api.spec.js:3:5 › Test Blocks report API ──────────────────────────────
    [webkit] › comments.spec.js:5:5 › Test adding a Comment to a Post ──────────────────────────────
    [webkit] › cookies-banner.spec.js:3:5 › check cookies banner ───────────────────────────────────
    [webkit] › country-selector.spec.js:3:5 › check the country selector behaviour ─────────────────
    [webkit] › footer.spec.js:5:5 › check footer menu ──────────────────────────────────────────────
    [webkit] › gallery.spec.js:7:5 › Test Gallery basic functionalities ────────────────────────────
    [webkit] › gravity-forms.spec.js:55:7 › Gravity Forms tests › check the confirmation message, text type 
    [webkit] › greenpeace-media.spec.js:13:7 › Greenpeace Media tests › import an image to the Library using a search term 
    [webkit] › greenpeace-media.spec.js:40:7 › Greenpeace Media tests › bulk select and upload two images using identifiers 
    [webkit] › navigation-bar.spec.js:5:5 › Test navigation bar menu ───────────────────────────────
    [webkit] › page-layouts-modal.spec.js:5:5 › checks if the welcome modal on the editor is present and closed when the button is clicked 
    [webkit] › password-protected-content.spec.js:9:5 › check password protected content ───────────
    [webkit] › related-posts.spec.js:6:5 › Test Related Posts block ────────────────────────────────
    [webkit] › search.spec.js:6:5 › check search works ─────────────────────────────────────────────
    [webkit] › special-pages.spec.js:5:5 › Test special pages (Act and Explore) ────────────────────
  9 did not run
  47 passed (8.1m)

@mleray mleray force-pushed the playwright-upgrade branch from 90805d6 to c08ecb5 Compare January 27, 2025 14:11
@mleray
Copy link
Contributor Author

mleray commented Jan 27, 2025

Code looks good to me! However, I'm getting too many specs failing on my local

@GP-Dan-Tovbein is that also the case in the main branch? For the search test, it might be because by default ElasticSearch is not running on local 🤔 For the others, is it timeout problems?

planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 27, 2025
/unhold 85bb3b63-f1bc-4702-9f08-a8beb89109cd
@mleray mleray force-pushed the playwright-upgrade branch from 68b4ee6 to 2240e9c Compare January 28, 2025 09:01
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 28, 2025
/unhold 75dd0494-b083-43c0-8ee0-f24c626dc83b
@mleray mleray requested a review from GP-Dan-Tovbein January 28, 2025 09:05
@mleray mleray force-pushed the playwright-upgrade branch from 2240e9c to 20cc150 Compare January 28, 2025 10:16
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 28, 2025
/unhold 65239fb0-2465-47b5-9789-d940a81b18d9
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 28, 2025
/unhold e393cd20-5bb1-482a-ae8c-68f53f7d1c37
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 28, 2025
/unhold 3f705456-0e3b-4cc8-a690-c37c1a33d440
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 28, 2025
/unhold 9347ecd9-f98f-468b-b4f3-2df2907de7fc
@mleray mleray force-pushed the playwright-upgrade branch from 20cc150 to d65036e Compare January 28, 2025 14:33
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 28, 2025
/unhold fa3d793b-4853-4f31-99cd-9197148e9bbc
We were running far behind. Some tests were also simplified or improved.
@mleray mleray force-pushed the playwright-upgrade branch from d65036e to cf08510 Compare January 28, 2025 16:09
planet-4 added a commit to greenpeace/planet4-test-leda that referenced this pull request Jan 28, 2025
/unhold 56f281d2-985b-4477-b6ab-6ad9bff8722a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants