Skip to content

Commit

Permalink
Merge pull request #211 from DFE-Digital/E2E-Playwright-Tests
Browse files Browse the repository at this point in the history
FHB-720 Add Playwright End to End Test Framework
  • Loading branch information
DamiLaleye1 authored Nov 5, 2024
2 parents 13c5df0 + 20ef1bd commit 4273e9c
Show file tree
Hide file tree
Showing 11 changed files with 1,353 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/find-e2e-tests/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# .env
BASE_URL=https://test2.find-support-for-your-family.education.gov.uk/
6 changes: 6 additions & 0 deletions test/find-e2e-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/target
25 changes: 25 additions & 0 deletions test/find-e2e-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# E2E Testing

Here are written End to End tests for the three services in Family Hubs: Find, Connect, Manage.
This is a Serenity/JS with Playwright Framework using a screenplay pattern.
# Prerequisites

- Ensure Node.js and npm are installed on your machine.
- Run data seed scripts
- Navigate to folder of service under test (i.e. find-e2e-tests, connect-e2e-tests or manage-e2e-tests)
- Install all required dependencies: npm install
- Ensure to create a .env file containing the baseURL for the environment you plan to test.

# How to run the tests locally (against the test environment)

To run tests: `npm test`
To view the test report: `npm run test:report`

# Helpful Links

Screenplay Pattern Overview - https://serenity-js.org/handbook/design/screenplay-pattern/

Serenity JS Playwright Test
- https://serenity-js.org/handbook/test-runners/playwright-test/
- https://serenity-js.org/handbook/getting-started/serenity-js-with-playwright-test/

Loading

0 comments on commit 4273e9c

Please sign in to comment.