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

Migrate end-to-end tests to Playwright #7215

Conversation

jmcameron
Copy link
Collaborator

@jmcameron jmcameron commented Aug 23, 2023

This PR enables end-to-end tests that have been migrated from Protractor to Playwright. Note that only 23% of the end-to-end have been converted, but it seems appropriate to start using the tests that have been migrated now to avoid any regressions that they might catch.

Note that the old Protractor tests have not been deleted yet, since the obsolete files may still be useful in the migration process. Also the original command yarn test:ends are unchanged so it remains broken. Use the new command yarn test:e2e instead.

Note that a few of these tests still sporadically fail; I'm trying to resolve those problems.

See Issue 6976 for details about the migration.

Closes #6976.

Note: This PR replaces PR 7024. It is essentially a rebase to consolidate all the commit messages (via git diff vs master and patch, not via git rebase).

Testing

  • Set your .env file for bhima_test
  • Run yarn to update dependencies (you may want to run yarn upgrade too)
  • Install playwright:
    • npm install playwright
    • Verify the two versions match:
      • grep '@playwright/test@' yarn.lock
      • npx playwright --version
    • If it complains about the version of chrome not being found, do this:
      • npx playwright install
  • Run the tests:
    • yarn test:e2e-account
    • yarn test:e2e-stock
    • yarn test:e2e

@jmcameron
Copy link
Collaborator Author

bors try

bors bot added a commit that referenced this pull request Aug 23, 2023
@bors
Copy link
Contributor

bors bot commented Aug 23, 2023

try

Build failed:

@jmcameron
Copy link
Collaborator Author

bors try

bors bot added a commit that referenced this pull request Aug 23, 2023
@bors
Copy link
Contributor

bors bot commented Aug 23, 2023

try

Build failed:

@jmcameron
Copy link
Collaborator Author

bors try

bors bot added a commit that referenced this pull request Aug 23, 2023
@jmcameron
Copy link
Collaborator Author

bors try-

@jmcameron
Copy link
Collaborator Author

bors try

bors bot added a commit that referenced this pull request Aug 24, 2023
@bors
Copy link
Contributor

bors bot commented Aug 24, 2023

try

Build failed:

@jmcameron jmcameron force-pushed the migrate-end-to-end-tests-to-playwright branch from 947a39b to a8d2808 Compare August 24, 2023 14:33
@jmcameron jmcameron force-pushed the migrate-end-to-end-tests-to-playwright branch from a8d2808 to 25b20df Compare August 24, 2023 14:36
@jmcameron
Copy link
Collaborator Author

bors r+

bors bot added a commit that referenced this pull request Aug 24, 2023
7215: Migrate end-to-end tests to Playwright r=jmcameron a=jmcameron

This PR enables end-to-end tests that have been migrated from Protractor to Playwright.  Note that only 23% of the end-to-end have been converted, but it seems appropriate to start using the tests that have been migrated now to avoid any regressions that they might catch.

Note that the old Protractor tests have not been deleted yet, since the obsolete files may still be useful in the migration process.  Also the original command `yarn test:ends` are unchanged so it remains broken.  Use the new command `yarn test:e2e` instead.

Note that a few of these tests still sporadically fail; I'm trying to resolve those problems.

See [Issue 6976](#6976) for details about the migration.

Note: This PR replaces [PR 7024](#7024).  It is essentially a rebase to consolidate all the commit messages (via git diff vs master and patch, not via `git rebase`).

### Testing
- Set your .env file for bhima_test
- Run `yarn` to update dependencies (you may want to run `yarn upgrade` too)
- Install playwright:
   - `npm install playwright`
   -  Verify the two versions match:
      - `grep '`@playwright/test@'` yarn.lock`
      - `npx playwright --version`
- Run the tests:  `yarn test:e2e`


Co-authored-by: Jonathan Cameron <jmcameron@gmail.com>
@bors
Copy link
Contributor

bors bot commented Aug 24, 2023

Build failed:

@jmcameron
Copy link
Collaborator Author

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 24, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 49aaa19 into Third-Culture-Software:master Aug 24, 2023
@jmcameron jmcameron deleted the migrate-end-to-end-tests-to-playwright branch August 25, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert end-to-end tests to Playwright
1 participant