PSP-11590: Research files - view form automation#5345
Conversation
…nto automation-branch
| await this.helpDeskButton.click(); | ||
| } | ||
|
|
||
| normalize(value: unknown): string { |
There was a problem hiding this comment.
we could probably replace unknown with 'string | null'
| return value == null ? '' : String(value).trim(); | ||
| } | ||
|
|
||
| formatApiDate(apiDate: string | null | undefined): string { |
There was a problem hiding this comment.
let's create a Utils.ts to encapsulate these kind of functions.
| }); | ||
| } | ||
|
|
||
| formatApiBoolean(value: boolean | null | undefined): string { |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
This would be highly unstable. Let's chat about the test structure.
There was a problem hiding this comment.
ohh, I forgot to replace that one with a .env variable, my mistake
| await context.close(); | ||
| }); | ||
|
|
||
| test('verify research list view', async () => { |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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 }
There was a problem hiding this comment.
already have this but on research pages, just move it to utils and make it more generic.
|



No description provided.