Skip to content

PSP-11590: Research files - view form automation#5345

Open
stairaku wants to merge 12 commits into
bcgov:devfrom
stairaku:automation-branch
Open

PSP-11590: Research files - view form automation#5345
stairaku wants to merge 12 commits into
bcgov:devfrom
stairaku:automation-branch

Conversation

@stairaku

Copy link
Copy Markdown
Collaborator

No description provided.

@stairaku stairaku requested a review from eddherrera June 25, 2026 22:45
@stairaku stairaku self-assigned this Jun 25, 2026
@stairaku stairaku added the test-scripts Tag used for functional test scripts label Jun 25, 2026
await this.helpDeskButton.click();
}

normalize(value: unknown): string {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we could probably replace unknown with 'string | null'

return value == null ? '' : String(value).trim();
}

formatApiDate(apiDate: string | null | undefined): string {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

let's create a Utils.ts to encapsulate these kind of functions.

});
}

formatApiBoolean(value: boolean | null | undefined): string {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

let's create a Utils.ts to encapsulate these kind of functions.

await researchListPage.goto();

//Search researh file by name
await researchListPage.searchByName('Bubba BBQ Whirled');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This would be highly unstable. Let's chat about the test structure.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

ohh, I forgot to replace that one with a .env variable, my mistake

await context.close();
});

test('verify research list view', async () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We could either skip or assert for something like the 'Title'

await test.step('Create file', async () => {
//Navigate to new research file and create a minimum viable research
await researchCreatePage.goto();
await researchCreatePage.setResearchNameValue('researchFile');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We need to pass a unique value, let's create a new Util function that receives a prefix of type string, and returns a string with unique value... for example,

generateFileName(prefix: string) => { return => prefix + YYYYMMDD + random number or hour min }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

already have this but on research pages, just move it to utils and make it more generic.

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test-scripts Tag used for functional test scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants