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

Jpaten/4076 add list of current and candidate tests #4077

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

jpaten
Copy link
Contributor

@jpaten jpaten commented Jul 22, 2024

Ticket

Closes #4076 .

Reviewers

@MillenniumFalconMechanic .

Changes

  • Added a Readme file for tests, including a list of existing and candidate tests and information about how to run tests

Note: This PR should not be merged before #4071

@jpaten jpaten linked an issue Jul 22, 2024 that may be closed by this pull request
@github-actions github-actions bot added the canary Done by the Clever Canary team label Jul 22, 2024
Copy link
Contributor

@MillenniumFalconMechanic MillenniumFalconMechanic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Jonah! I have added a couple of suggestions for your review. One nit: could you go through and standardize capitalization and quotation of tab names?

that Playwright actually runs, most test code is stored in `e2e/testFunctions.ts`. These functions contain the
code that runs for all tests, except for tests that are not reused between configurations and that only run in one tab. This allows tests to be repeated
for different tabs in different configurations without reusing code, and means that information that tests
depend on can be stored in one place to make adjusting tests to changes in user facing content is straightforward.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
depend on can be stored in one place to make adjusting tests to changes in user facing content is straightforward.
depend on can be stored in one place to make adjusting tests to changes in user-facing content straightforward.

code that runs for all tests, except for tests that are not reused between configurations and that only run in one tab. This allows tests to be repeated
for different tabs in different configurations without reusing code, and means that information that tests
depend on can be stored in one place to make adjusting tests to changes in user facing content is straightforward.
Config specific constants used for tests are kept in the `config_name/config_name-tabs.ts`, and use interfaces and
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Config specific constants used for tests are kept in the `config_name/config_name-tabs.ts`, and use interfaces and
Config-specific constants used for tests are kept in the `config_name/config_name-tabs.ts`, and use interfaces and

Config specific constants used for tests are kept in the `config_name/config_name-tabs.ts`, and use interfaces and
custom types in `testInterfaces.ts`.

### Running tests
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
### Running tests
### Running Tests

and `playwright_anvil-catalog.config.ts`. To run an individual test, add the argument `-g <test_name>`. More information
about command line options for the test can be found in [Playwright's Documentation](https://playwright.dev/docs/test-cli).
To debug or write tests, it can be useful to use Playwright's UI mode with `npx playwright test --ui`, which allows you
to easily run individual tests, and view the actions Playwright takes step by step in and their result.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
to easily run individual tests, and view the actions Playwright takes step by step in and their result.
to easily run individual tests, and view the actions Playwright takes step by step and their result.


#### Running in GitHub

All tests are run automatically when a pull request is made, using GitHub Actions. These actions create a development build
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
All tests are run automatically when a pull request is made, using GitHub Actions. These actions create a development build
All tests are run automatically when a pull request is made, using GitHub Actions. These actions create a dev build

^ Keeps the language consistent with above?

- Check that selecting a filter causes the selected checkbox entries to remain selected across all tabs
- Currently uses the 4th filter and starts on the "files" tab
- Check that the counts next to the filter checkbox match the number of entries once the filter is selected
- Checks an arbitrary list of 6 filters on the datasets and activities tab
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Checks an arbitrary list of 6 filters on the datasets and activities tab
- Checks an arbitrary list of six filters on the datasets and activities tab

- Currently uses the 4th filter and starts on the "files" tab
- Check that the counts next to the filter checkbox match the number of entries once the filter is selected
- Checks an arbitrary list of 6 filters on the datasets and activities tab
- Check that the blue filter buttons appear with the correct text when the filter is selected, and that they cause the filter to become deselected when clicked
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Check that the blue filter buttons appear with the correct text when the filter is selected, and that they cause the filter to become deselected when clicked
- Check that the blue filter tags appear with the correct text when the filter is selected, and that they cause the filter to become deselected when clicked

- Check that the counts next to the filter checkbox match the number of entries once the filter is selected
- Checks an arbitrary list of 6 filters on the datasets and activities tab
- Check that the blue filter buttons appear with the correct text when the filter is selected, and that they cause the filter to become deselected when clicked
- Checks an arbitrary list of 3 filters on the "files" and "biosamples" tabs
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Checks an arbitrary list of 3 filters on the "files" and "biosamples" tabs
- Checks an arbitrary list of three filters on the "files" and "biosamples" tabs

- Check that the blue filter buttons appear with the correct text when the filter is selected, and that they cause the filter to become deselected when clicked
- Checks an arbitrary list of 3 filters on the "files" and "biosamples" tabs
- Check that the clear all button deselects all filters, after an arbitrary list is selected
- Uses an arbitrary list of 3 filters and runs on the "files tab"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Uses an arbitrary list of 3 filters and runs on the "files tab"
- Uses an arbitrary list of three filters and runs on the "files tab"

- Check that paginating forward on the donors tab keeps the currently displayed page number correct, and that on the last page the back button is enabled and the front page is enabled
- Uses the "Donors" tab only
- NOTE: this test may be problematic because it assumes there is relatively short number of pages on the "Donors" tab. This could potentially be resolved by adding filters or by limiting the number of tests run
- Check that paginating forwards by up to 5 pages changes the content on the first row of the table, and that paginating backwards causes that text to remain the same
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Check that paginating forwards by up to 5 pages changes the content on the first row of the table, and that paginating backwards causes that text to remain the same
- Check that paginating forwards by up to five pages changes the content on the first row of the table, and that paginating backwards causes that text to remain the same

@jpaten jpaten force-pushed the jpaten/4076-add-list-of-current-and-candidate-tests branch from fd21c57 to bb86679 Compare August 19, 2024 01:54
@jpaten jpaten force-pushed the jpaten/4076-add-list-of-current-and-candidate-tests branch from bb86679 to 587cfc2 Compare August 19, 2024 19:42
Copy link
Contributor

@MillenniumFalconMechanic MillenniumFalconMechanic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Jonah!

@jpaten jpaten closed this Aug 23, 2024
@jpaten jpaten force-pushed the jpaten/4076-add-list-of-current-and-candidate-tests branch from 587cfc2 to 7657375 Compare August 23, 2024 04:20
@jpaten jpaten reopened this Aug 23, 2024
@jpaten jpaten merged commit b34f6e1 into main Aug 23, 2024
4 checks passed
@jpaten jpaten deleted the jpaten/4076-add-list-of-current-and-candidate-tests branch August 23, 2024 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
canary Done by the Clever Canary team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add list of current and candidate tests
2 participants