Skip to content

Conversation

@aleemriaz
Copy link
Contributor

@aleemriaz aleemriaz commented Sep 24, 2025

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

await this.page.locator('#test_data').click();
await this.selectTestData('Alice Parker (Valid) DVLA Licence');
await this.setEvidenceScores({
strengthHours: '3',
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do these field names end in hours, minutes, and seconds?

static getFeatureFlagsUrl(): string {
const baseUrl = this.getIdentityBuildUrl();
const featureSet = this.getEnvironmentVariableOrDefault(
'FEATURE_FLAGS',
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this makes sense as an environment variable - we'll want different flags per tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah you’re right. This is just a POC for this specific test. Once we start adding more tests, we can parameterise this variable so each test can pass in the feature flags it needs.

TICF_API_KEY: ConfigurationReader.getTicfApiKey(),
},
FEATURE_FLAGS: {
ENABLE_URL: ConfigurationReader.getFeatureFlagsUrl(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, not sure a single feature flags URL will be useful for most tests.

fraudPage: async ({ page }, use) => {
await use(new FraudStubPage(page));
},
apiService: async ({ request }, use) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be ticfApiService?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, I'll update.

}

protected async clickButton(name: string): Promise<void> {
await this.page.getByRole('button', { name }).click();
Copy link
Contributor

Choose a reason for hiding this comment

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

Would these be better off targetting an ID rather than a name?

await this.clickButton('Continue');
}

async navigateToDcmawSuccess(): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to navigate to this page? The end user will get there by clicking a button or link won't they?

import { BasePage } from './base-page';
import { CONFIG } from '../config/test-config';

export class IdentityPage extends BasePage {
Copy link
Contributor

Choose a reason for hiding this comment

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

This class seems to contain methods relating to more than one page - should they be split into separate page classes?

}

async expectIPVSuccess(): Promise<void> {
await this.expectHeading('Continue to the service you need to use');
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to confirm that we're on the success page URL rather than look for text that might change in the future?

async expectReuseScreen(): Promise<void> {
await expect(this.page.locator('#header')).toContainText('You have already proved your identity');
await this.expectText('ALISON JANE PARKER');
await this.expectText('80TYEOMAN WAYTROWBRIDGEBA14');
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are there missing spaces here?

}

async getUserId(): Promise<string> {
return await this.page.getByRole('textbox', { name: 'Enter userId manually' }).inputValue();
Copy link
Contributor

Choose a reason for hiding this comment

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

Again can we use an ID or similar rather than text?
(This applies to other place too, I won't comment on all of them)

@sonarqubecloud
Copy link

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.

3 participants