Skip to content

Pyic 8272 - Playwright E2E POC#2258

Merged
thebauSoftwire merged 53 commits into
mainfrom
PYIC-8272
Mar 10, 2026
Merged

Pyic 8272 - Playwright E2E POC#2258
thebauSoftwire merged 53 commits into
mainfrom
PYIC-8272

Conversation

@aleemriaz

@aleemriaz aleemriaz commented Sep 24, 2025

Copy link
Copy Markdown
Contributor

Proposed changes

What changed

  • A working proof of concept is created in Playwright that successfully replicates the functionality of the identified Selenium end-to-end test.

Why did it change

  • POC for spike

Issue tracking

Checklists

  • READMEs and documentation up-to-date
  • Browser/ unit/ Selenium tests have been written/ updated
  • No risk of exposure: PII, credentials, etc through logs/ code
  • Ensure added/updated routes have CSRF protection if required

@aleemriaz aleemriaz requested review from a team as code owners September 24, 2025 09:46
@sonarqubecloud

Copy link
Copy Markdown

Comment thread browser-tests/e2e-tests/pages/doc-checking-page.ts Outdated
Comment thread browser-tests/e2e-tests/config/test-config.ts Outdated
Comment thread browser-tests/e2e-tests/config/test-config.ts Outdated
Comment thread browser-tests/e2e-tests/fixtures/page-fixtures.ts Outdated
Comment thread browser-tests/e2e-tests/pages/base-page.ts Outdated
Comment thread browser-tests/e2e-tests/pages/identity-page.ts Outdated
Comment thread browser-tests/e2e-tests/pages/identity-page.ts Outdated
Comment thread browser-tests/e2e-tests/pages/identity-page.ts Outdated
Comment thread browser-tests/e2e-tests/pages/identity-page.ts Outdated
Comment thread browser-tests/e2e-tests/pages/orchestrator-stub-page.ts Outdated
@sonarqubecloud

Copy link
Copy Markdown

Comment thread browser-tests/e2e-tests/steps/strategicApp.steps.ts Fixed
Comment thread browser-tests/e2e-tests/steps/strategicApp.steps.ts Fixed
Comment thread browser-tests/e2e-tests/steps/strategicApp.steps.ts Fixed
# 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
blakeyp
blakeyp previously approved these changes Mar 4, 2026

const setEvidenceScores = async (scores: EvidenceScores): Promise<void> => {
if (scores.strength) {
await page.locator("#strength").fill(scores.strength.toString());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
Comment thread browser-tests/e2e-tests/guidance.md Outdated

```
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo *definitions

};
} as const;

export type PageName = keyof typeof pagesAndContexts;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oo nice!

@@ -0,0 +1,125 @@
# E2E Playwright BDD Tests

This directory contains the **End-to-End (E2E) test suite** for IPV Core.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comment thread browser-tests/e2e-tests/steps/ipv-page-steps/ipv-page-reuse.steps.ts Outdated
blakeyp
blakeyp previously approved these changes Mar 10, 2026

// This is specific to the journey in scenario: F2F Passport claim is returned
// in the user identity response.
Then(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems like it should be in the orch-stub steps file?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

good point!

DanCorderIPV
DanCorderIPV previously approved these changes Mar 10, 2026
- 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
@thebauSoftwire thebauSoftwire dismissed stale reviews from DanCorderIPV and blakeyp via 2117d65 March 10, 2026 15:28
@sonarqubecloud

Copy link
Copy Markdown

@thebauSoftwire thebauSoftwire merged commit 2e4b0f0 into main Mar 10, 2026
7 checks passed
@thebauSoftwire thebauSoftwire deleted the PYIC-8272 branch March 10, 2026 15:39
@blakeyp blakeyp mentioned this pull request Mar 11, 2026
4 tasks
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.

6 participants