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

[WNMGDS-2722] New browser testing wrapper script #3006

Merged
merged 9 commits into from
Apr 1, 2024

Conversation

pwolfert
Copy link
Collaborator

@pwolfert pwolfert commented Apr 1, 2024

Summary

WNMGDS-2722

Implements the idea in #2810 to make it easier to run browser tests in or out of docker and pass relevant arguments to Playwright regardless of which environment it's running in. See the updated README for more information.

How to test

Run yarn test:browser and any of its subcommands. Try passing the new flags in or any Playwright flag. Here are some example commands to try:

  • yarn test:browser --list
  • yarn test:browser:interaction --no-docker --no-build --headed --debug --ignore-snapshots --grep "Dropdown"
  • yarn test:browser:examples
  • yarn test:browser:storybook-docs --no-build --grep "Text" --list

Checklist

  • Prefixed the PR title with the Jira ticket number as [WNMGDS-####] Title or [NO-TICKET] if this is unticketed work.
  • Selected appropriate Type (only one) label for this PR, if it is a breaking change, label should only be Type: Breaking
  • Selected appropriate Impacts, multiple can be selected.
  • Selected appropriate release milestone

Really I need to use spawn, but that means all my args need to be in array form
Updating any of these is as simple as passing `-u` now. We can even use one of these aliases and pass `--no-docker` to it, like `yarn test:browser:examples --no-docker`, and it will work
…nt on browser testingRewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testing
@pwolfert pwolfert added Type: Internal This item relates to internal tooling/maintenance Impacts: Core Impacts the core DS primarily, changes may occur in other themes as well. labels Apr 1, 2024
@pwolfert pwolfert added this to the 11.0.0-beta.1 milestone Apr 1, 2024
@pwolfert pwolfert requested a review from zarahzachz April 1, 2024 17:49
Copy link
Collaborator

@zarahzachz zarahzachz left a comment

Choose a reason for hiding this comment

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

Everything ran fine except for the Dropdown interaction test.

README.md Show resolved Hide resolved
@pwolfert pwolfert changed the title [NO-TICKET] New browser testing wrapper script [WNMGDS-2722] New browser testing wrapper script Apr 1, 2024
@pwolfert pwolfert merged commit c8c19ef into main Apr 1, 2024
1 check passed
@pwolfert pwolfert deleted the pwolfert/browser-test-script branch April 1, 2024 21:37
@pwolfert pwolfert modified the milestones: 11.0.0-beta.1, 10.0.0-beta.3 Apr 4, 2024
pwolfert added a commit that referenced this pull request Apr 4, 2024
* Start to a wrapper script for browser tests

* This is readable, but using exec crashes because the buffer fills up

Really I need to use spawn, but that means all my args need to be in array form

* This works!

* Build prereqs first unless `--no-build` is passed

* Update all the browser test commands

Updating any of these is as simple as passing `-u` now. We can even use one of these aliases and pass `--no-docker` to it, like `yarn test:browser:examples --no-docker`, and it will work

* Update the unit test commands to match

* Rewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testingRewrite the README content on browser testing

* Add an example debug command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impacts: Core Impacts the core DS primarily, changes may occur in other themes as well. Type: Internal This item relates to internal tooling/maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants