My demo at using Playwright. Using Seek as it has a relatively simple API to intercept and mock.
npm install
npx playwright install
npm run test-unit search.spec.ts
*Note: E2E test doesn't work due to captcha, this is here only as a demo/theory
If no session storage has been saved previously, username
and password
will be required. name
will always be required for checking purposes
e.g.
username=email@email.com password=1234 name="john smith" npm run test-e2e user_profile.spec.ts
Artifacts are located in test-results
trace files and videos are always saved to double check that the tests are performing as expected
run npm run show-report
in order to see trace file (when successful)
Build docker image: docker build -t playwright .
Run with volume (create if not exists): docker run --mount source=playwright,target=/artifacts playwright