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

E2E tests converted to playwright #486

Open
wants to merge 117 commits into
base: release/15-Jan-25-R1
Choose a base branch
from

Conversation

DanielClarkeEducation
Copy link
Contributor

@DanielClarkeEducation DanielClarkeEducation commented Dec 6, 2024

Description

Converted all e2e tests from cypress to playwright to improve stability and speed up run times

How Has This Been Tested?

All tests ran locally and in pipelines.
Navigate to e2e project in terminal and run
npx playwright test
you can add --ui to launch testing in the ui

Screenshots

Checklist:

  • My code follows the standards used within this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests (Unit, E2E) that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

DanielClarkeEducation and others added 30 commits December 2, 2024 13:46
* Updated packages to latest version and updated unit test as part of the OwaspHeaders.Core update which changed the default value

* Update E2E tests
* Updated packages and fixed breaking changes

* Added null check for header value
Base automatically changed from release/02-Dec-24-R1 to main January 15, 2025 14:19
@ThomasWhittington ThomasWhittington changed the base branch from main to release/15-Jan-25-R1 January 16, 2025 15:26
@ThomasWhittington ThomasWhittington changed the title Feature/e2e tests conversion to playwright E2E tests converted to playwright Jan 16, 2025
@ThomasWhittington ThomasWhittington marked this pull request as ready for review January 17, 2025 14:41
Copy link
Contributor

Code Coverage

Package Line Rate Branch Rate Health
Dfe.EarlyYearsQualification.Content 98% 90%
Dfe.EarlyYearsQualification.Web 98% 93%
Dfe.EarlyYearsQualification.Mock 100% 98%
Summary 98% (4196 / 4273) 93% (706 / 762)

Minimum allowed line rate is 90%

Comment on lines +70 to +76
- Add some environment variables
```
WEBAPP_URL={URL OF THE HOME PAGE}
AUTH_SECRET={PASSWORD FOR ENVIRONMENT}
DOMAIN={DOMAIN FOR COOKIE TO BE ADDED TO (when local: localhost)}
```
- Run the local web app.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can probably remove these steps now as the .env file will work for both local and CI/CD. Also on local, the playwright config will start up the app for us so we don't need to do it explicitly anymore like we did with Cypress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants