-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report Builder Tests #6
base: main
Are you sure you want to change the base?
Conversation
@@ -33,6 +35,7 @@ export default defineConfig({ | |||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ | |||
trace: 'on-first-retry', | |||
ignoreHTTPSErrors: true, | |||
bypassCSP: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must explain changes in the PR
}); | ||
|
||
test("Report Builder table displays selected data column", async ({ page }) => { | ||
await page.waitForTimeout(3000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await page.locator('#indicatorList').getByText('Service', { exact: true }).click(); | ||
await page.locator('#indicatorList').getByText('Current Status').click(); | ||
await page.getByText('Type of Request').click(); | ||
await expect(page.getByLabel('Type of Request')).toBeChecked(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably redundant in the context of this test. This test checks if data columns are displayed, and line 46 contains an appropriate assertion.
Some of the other new tests here have similar redundancies.
await expect(page.getByLabel('Sort by Type')).toBeVisible(); | ||
}); | ||
|
||
test("User Redirect to SearchFilter Page on Modify Filter", async ({ page }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this test checks if the redirection works, there should be an assertion for this.
E.g. after clicking on "Modify Search", we know the redirection works if we can see "Step 1: Develop search filter"
await page.getByLabel('Report Title').fill('Available for TEST CHANGE TITLE'); | ||
await page.getByLabel('Report Title').press('Enter'); | ||
await page.getByRole('button', { name: 'Save Change' }).click(); | ||
await page.getByRole('cell', { name: 'Available for TEST CHANGE TITLE' }).first().click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be an assertion right after clicking "Save Change".
In the event of a failure, the lack of an explicit assertion incurs a potential 30s delay, whereas the expect() would only cause a 5s delay. This time adds up quickly, as it means the difference between 90s vs 15s between iterations for a single failing test.
await page.getByRole('button', { name: 'Save Change' }).click(); | ||
}); | ||
|
||
test("Select multiple filter using AND/OR,", async ({ page }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the other AND
test -- must test that the logical filter works as expected.
await page.getByRole('button', { name: 'Generate Report' }).click(); | ||
}); | ||
|
||
test("Edit Report Title", async ({ page }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error: locator.click: Test timeout of 30000ms exceeded.
Call log:
- waiting for getByRole('cell', { name: 'TestForm_NonadminCannotCancelOwnSubmittedRecord_new' })
Your database probably includes content that doesn't exist in the standardized version. Run the API tester to restore your local database back to the standard.
test("Edit Report Title", async ({ page }) => { | ||
await page.goto("https://host.docker.internal/Test_Request_Portal/?a=reports&v=3&query=N4IgLgpgTgtgziAXAbVASwCZJHSAHASQBEQAaEAez2gEMwKpsBeMkGOgYwAtsoI4KAGwBuELOQDmdCNgCCAORIBfUuiyIQHaRIYBPYqyq16jDS3Lsw3bADMGMAPoBWCDQAMAdlZTIcxSBU1bAwIQQhIcUpqKDoGZlZLa0Q3SWk%2FZQBdcgArCjQAOwQUEAK0MDRYqHkaGBksnAYwJGAVEAlwojoaJGQQABZWL3IAZhB6wTQYMqQARjd58gmpsAB5Gxs4cKQ3JSA%3D%3D&indicators=NobwRAlgdgJhDGBDALgewE4EkAiYBcYyEyANgKZgA0YUiAthQVWAM4bL4AMAvpeNHCRosuAtGIQUGZrQb4wzNug54efSLARSR8xPCKooAIQCuyNFBn1GC6kpVr%2BmoRhzyALFbkEAsiZJEAAQk0GSByGQAHhx27Fy8ToLabgQA7F42AEqIcKiKcaoJGknCKWAAzBnyAMrQAObkwaHhUTGsBTwAukA"); | ||
await page.getByRole('cell', { name: 'TestForm_NonadminCannotCancelOwnSubmittedRecord_new' }).click(); | ||
await page.getByLabel('Report Title').dblclick(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too many clicks are redundant, and there should be an assertion to verify that the title was successfully changed.
await page.getByRole("cell", { name: "test this is a test" }).click(); | ||
await page.getByLabel("Multi line text", { exact: true }).click(); | ||
await page.getByLabel('Multi line text', { exact: true }).fill('test'); | ||
await page.getByRole('button', { name: 'Save Change' }).click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs assertion to verify that the save operation works -- it would be redundant to change the contents twice if we don't verify the second one.
await page.getByRole('button', { name: 'Save Change' }).click(); | ||
}); | ||
|
||
test("Check Single Line Text", async ({ page }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error: locator.click: Test timeout of 30000ms exceeded.
Call log:
- waiting for getByRole('cell', { name: 'test1' })
Run the API tester to ensure we have reproducible tests.
This test also needs assertions.
This includes several new tests for the Report Builder.