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

PIMS-632 Playwright #2721

Merged
merged 23 commits into from
Nov 13, 2024
Merged

PIMS-632 Playwright #2721

merged 23 commits into from
Nov 13, 2024

Conversation

dbarkowsky
Copy link
Collaborator

@dbarkowsky dbarkowsky commented Oct 9, 2024

🎯 Summary

PIMS-632

This ticket aims to add Playwright as an option for end-to-end (e2e) testing.
It is not a complete testing suite for all the app's functions, but it provides a baseline we can add to over time.

If we want to test adding/editing/deleting in the future, it will be necessary to restore or stage the database in some way so that tests are idempotent.

Changes

  • Added e2e folder that houses Playwright code
  • Added README with usage instructions
  • Added some tests for the following:
    • logging in
    • redirecting to no-role/inactive user pages
    • using map and filtering
    • navigating to agencies table and filtering

Testing

  • Follow instructions in README in /e2e folder for installation.
  • Test the various playwright commands listed there.

I've tried to combat flakey tests, but some of them (like the map filter) are really sensitive to timings.

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

@TaylorFries
Copy link
Collaborator

tests run well and pass when running in ui (npx playwright test --ui) but when running in headless mode (npx playwright test) some tests are failing at random.

Co-authored-by: TaylorFries <[email protected]>
@TaylorFries
Copy link
Collaborator

tests in headless mode now passing consistently (5 consecutive runs.) Had to restart the API every 2 tests to avoid hitting rate limit.

Copy link
Collaborator

@TaylorFries TaylorFries left a comment

Choose a reason for hiding this comment

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

tests run as expected. Aside from occasional timeouts and tests failing due to checking elements before they have fully rendered/ finished animations. See above comments (from today and last week) for more information

@dbarkowsky
Copy link
Collaborator Author

Going to merge this for now so I can work on a workflow that uses it. Need it in DEV first.

@dbarkowsky dbarkowsky merged commit 990b842 into main Nov 13, 2024
8 checks passed
@dbarkowsky dbarkowsky deleted the PIMS-632-Playwright branch November 13, 2024 17:37
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