Pyic 8272 - Playwright E2E POC#2258
Conversation
|
|
# Conflicts: # browser-tests/package-lock.json # browser-tests/package.json # browser-tests/readme.md
…o CRI stubs - this replaces the need to read json files from a directory - enforces type safety with the data vocab classes - can be extended to the other CRI stubs, not just the dcmaw async stub - deletes async-dcmaw-stub-data folder - updates readme PYIC-8272: fix failing GHA to run browser tests. Image was failing to build because the .npmrc file was being copied into the wrong place PYIC-8272: add missing alice-parker details
1a20299 to
e685c43
Compare
|
|
||
| const setEvidenceScores = async (scores: EvidenceScores): Promise<void> => { | ||
| if (scores.strength) { | ||
| await page.locator("#strength").fill(scores.strength.toString()); |
There was a problem hiding this comment.
I know these ids are only used once, but they still feel like they should be constants - especially as some of them already are
…the possible steps available for that page. These should be used by default when interacting with Core's pages These have the benefits of: - more BDD-aligned step definitions - encourage step reuse for a given page - easy lookup of what steps are available for a given page and only adding a new one when required - easier enforcement of pattern for building out tests
d4aa23b to
56539e6
Compare
|
|
||
| ``` | ||
| steps/ # Step definitions (.steps.ts) that implement each Gherkin step defined in /features/*.feature | ||
| ├── ipv-page-steps/ # Each file represents an IPV Core page. These contain the step deifinitions for all the interactions with that page. |
| }; | ||
| } as const; | ||
|
|
||
| export type PageName = keyof typeof pagesAndContexts; |
| @@ -0,0 +1,125 @@ | |||
| # E2E Playwright BDD Tests | |||
|
|
|||
| This directory contains the **End-to-End (E2E) test suite** for IPV Core. | |||
There was a problem hiding this comment.
Just a thought, for now we should add a note in here saying this is WIP and these tests aren't actually run anywhere yet and that we're migrating from our existing core-tests repo
|
|
||
| // This is specific to the journey in scenario: F2F Passport claim is returned | ||
| // in the user identity response. | ||
| Then( |
There was a problem hiding this comment.
This seems like it should be in the orch-stub steps file?
There was a problem hiding this comment.
yeah I did debate on putting it there but decided to leave it here since this collection of VCs is fairly specific to the user having gone through a f2f journey
There was a problem hiding this comment.
though actually saying that I can just make it a generic step function which takes in arguments 🤦♀️ Will make that update (sorry if that's what you were trying to say already!)
| // This is specific to the journey in scenario: Pass successfully for a given | ||
| // name change and show reuse screen | ||
| Then( | ||
| "Alison Parker's credentials should be passed to the orch stub", |
There was a problem hiding this comment.
This looks similar to the Kenneth step above and could be commonised in the orch-stub steps?
| @@ -0,0 +1,78 @@ | |||
| import { createBdd } from "playwright-bdd"; | |||
There was a problem hiding this comment.
Maybe name this something more like dcmaw-async-stub.steps.ts ?
So it's clear that these are steps specific to the stub rather than the larger journey.
There was a problem hiding this comment.
I've decided to add this to cri.steps.ts since it didn't feel like it warranted its own file anymore
| const { Given, Then } = createBdd(fixtures); | ||
|
|
||
| Given( | ||
| "the user completes an initial P2 identity journey with expired Alice Parker details", |
There was a problem hiding this comment.
Should this go into a file called something like composite-steps or similar?
If I wanted to set up Alice with an expired fraud VC for a different test I might not think to look here and so end up duplicating the logic.
- update guidance on using the fixtures - remove duplicate page file
- make credential check at the orch-stub a common orch-stub step - rename strategic-app.steps.ts to dcmaw-async-stub.steps.ts - move composite step into a composite.steps.ts file - update README with new additions
2117d65
|



Proposed changes
What changed
Why did it change
Issue tracking
Checklists