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

Fix PNI Playwright tests #11765

Merged
merged 5 commits into from
Jan 25, 2024
Merged

Fix PNI Playwright tests #11765

merged 5 commits into from
Jan 25, 2024

Conversation

mmmavis
Copy link
Collaborator

@mmmavis mmmavis commented Jan 24, 2024

Related #9373

This PR enables existing Playwright tests for PNI search related functionalities by fixing broken code and breaking code into individual tests using test hooks.

File is relocated under a new folder pni and renamed into search.spec.js

To test locally

  • Run docker-compose up on one tab
  • Approach 1:
    • On package.json, update line 52 to "playwright:integration": "wait-on -i 3000 -t 120000 -v http://127.0.0.1:8000/cms && playwright test ./tests/integration/pni" so you can skip all other tests unrelated to PNI search
    • Open a new terminal tab, and run npm run playwright:integration
  • Approach 2: Alternatively, you can run the PNI tests directly using VSCode's Test Explorer.

@mmmavis mmmavis marked this pull request as ready for review January 25, 2024 00:19
@mmmavis mmmavis changed the title [WIP] Fix PNI Playwright tests Fix PNI Playwright tests Jan 25, 2024
Copy link
Contributor

@jhonatan-lopes jhonatan-lopes left a comment

Choose a reason for hiding this comment

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

Hey @mmmavis, thanks for this! It's working well LGTM 🚀

tests/integration/pni/search.spec.js Show resolved Hide resolved
@jhonatan-lopes
Copy link
Contributor

Another thing that I noticed here is that playwright is not installed inside the container. I think it would be better to install it alongside the dependencies of the dev Dockerfile and make sure that it runs inside the container (and with the right seed) so that we don't have tiny differences between the playwright env and the Docker env.

@jhonatan-lopes
Copy link
Contributor

Ticket to clean up package.json scripts: #11767

@mmmavis
Copy link
Collaborator Author

mmmavis commented Jan 25, 2024

@jhonatan-lopes thanks for the suggestions and filing follow-up ticket to make our dev setup more concrete!

@mmmavis mmmavis merged commit 2b615ea into main Jan 25, 2024
9 checks passed
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.

2 participants