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

[OBSOLETE] Migrate end-to-end tests to Playwright #7024

Closed
wants to merge 272 commits into from

Conversation

jmcameron
Copy link
Collaborator

@jmcameron jmcameron commented Apr 18, 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.

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

@jmcameron jmcameron requested a review from lomamech April 18, 2023 18:39
hound[bot]

This comment was marked as outdated.

hound[bot]

This comment was marked as outdated.

hound[bot]

This comment was marked as outdated.

hound[bot]

This comment was marked as outdated.

hound[bot]

This comment was marked as outdated.

hound[bot]

This comment was marked as outdated.

hound[bot]

This comment was marked as outdated.

@jmcameron
Copy link
Collaborator Author

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 7.7.0
ESLint couldn't find the plugin "eslint-plugin-jsdoc".
(The package "eslint-plugin-jsdoc" was not found when loaded as a Node module from the directory "/tmp/d20230418-5-102ee8n".)
It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
npm install eslint-plugin-jsdoc@latest --save-dev
The plugin "eslint-plugin-jsdoc" was referenced from the config file in ".eslintrc".
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

Do not worry about this problem. I'll deal with it later.

hound[bot]

This comment was marked as outdated.

hound[bot]

This comment was marked as outdated.

hound[bot]

This comment was marked as outdated.

hound[bot]

This comment was marked as outdated.

hound[bot]

This comment was marked as outdated.

hound[bot]

This comment was marked as outdated.

@jmcameron
Copy link
Collaborator Author

bors try

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

bors bot commented Apr 22, 2023

try

Build succeeded:

hound[bot]

This comment was marked as outdated.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 8.1.0
ESLint couldn't find the plugin "eslint-plugin-jsdoc".
(The package "eslint-plugin-jsdoc" was not found when loaded as a Node module from the directory "/tmp/d20230421-5-1038kd6".)
It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm install eslint-plugin-jsdoc@latest --save-dev
The plugin "eslint-plugin-jsdoc" was referenced from the config file in ".eslintrc".
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

hound[bot]

This comment was marked as outdated.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 8.1.0
ESLint couldn't find the plugin "eslint-plugin-jsdoc".
(The package "eslint-plugin-jsdoc" was not found when loaded as a Node module from the directory "/tmp/d20230421-5-10tpfcq".)
It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm install eslint-plugin-jsdoc@latest --save-dev
The plugin "eslint-plugin-jsdoc" was referenced from the config file in ".eslintrc".
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Oops! Something went wrong! :(
ESLint: 8.1.0
ESLint couldn't find the plugin "eslint-plugin-jsdoc".
(The package "eslint-plugin-jsdoc" was not found when loaded as a Node module from the directory "/tmp/d20230421-5-10tpfcq".)
It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
    npm install eslint-plugin-jsdoc@latest --save-dev
The plugin "eslint-plugin-jsdoc" was referenced from the config file in ".eslintrc".
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

hound[bot]

This comment was marked as outdated.

@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 22, 2023
@bors
Copy link
Contributor

bors bot commented Aug 22, 2023

try

Build failed:

@jniles
Copy link
Contributor

jniles commented Aug 22, 2023

bors try

@bors
Copy link
Contributor

bors bot commented Aug 22, 2023

try

Merge conflict.

@jmcameron jmcameron changed the title Migrate end-to-end tests to Playwright [OBSOLETE] Migrate end-to-end tests to Playwright Aug 23, 2023
@jmcameron
Copy link
Collaborator Author

Replaced by #7215

@jmcameron jmcameron closed this Aug 23, 2023
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 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>
@jmcameron jmcameron deleted the playwright-test branch August 25, 2023 08:09
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.

None yet

2 participants