-
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
Conversation
end2end/tests/reportBuilder.spec.ts
Outdated
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.
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.
Fixed
end2end/README.md
Outdated
@@ -2,19 +2,111 @@ | |||
|
|||
TODO: Add overview | |||
|
|||
# LEAF Automated Tests |
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.
Note instructions have been updated in: #9 , Please start from this version.
Maybe a step needs to be added to explain that the API tester must be run first before doing any work on e2e tests.
end2end/README.md
Outdated
@@ -12,33 +12,29 @@ LEAF uses Playwright for end-to-end testing. The test database is populated and | |||
3. On the command line: Navigate to the location where the development environment is installed | |||
4. Change directory into `LEAF-Automated-Tests/end2end` | |||
5. Install Playwright development tools: | |||
``` |
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 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.
fixed
end2end/tests/reportBuilder.spec.ts
Outdated
|
||
test("Take Action allow user to perform necessary form Action", async ({ page }) => { | ||
await page.goto("https://host.docker.internal/Test_Request_Portal/?a=reports&v=3&query=N4IgLgpgTgtgziAXAbVASwCZJHSAHASQBEQAaEAez2gEMwKpsBCAXjJBjoGMALbKCHAoAbAG4Qs5AOZ0I2AIIA5EgF9S6LIhAYIwiJEmVqUOg2xtynMLyQAGabIXKQKgLrkAVhTQA7BChwwOgBXBHccBjAkYDUQYTQYNCjEAEZbdPJ4xLAAeQAzPLh9OxUgA&indicators=NobwRAlgdgJhDGBDALgewE4EkAiYBcYyEyANgKZgA0YUiAthQVWAM4bL4AMAvpeNHCRosuAi2QoAri2a0G%2BMMzboOeHn0iwEKDDgWJ4RVFABCk5Giiz6jRdWWqeAXSA%3D"); | ||
const actionRow = page.getByRole('row', { name: '951 Take Action Available for' }); |
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 test fails on subsequent runs, because no more actions are available for record 951.
I'd recommend using a selector such as "first button", recording the record ID, and then navigating to the record to validate that the "testing purpose" comment exists.
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.
fixed and implemented the suggested changes
end2end/tests/reportBuilder.spec.ts
Outdated
await page.goto("https://host.docker.internal/Test_Request_Portal/?a=reports&v=3&query=N4IgLgpgTgtgziAXAbVASwCZJHSAHASQBEQAaEAez2gEMwKpsBCAXjJBjoGMALbKCHAoAbAG4Qs5AOZ0I2AIIA5EgF9S6LIhAYIwiJEmVqUOg2xtynMLyQAGabIXKQKgLrkAVhTQA7BChwwOgBXBHccBjAkYDUQYTQYNCjEAEZbdPJ4xLAAeQAzPLh9OxUgA&indicators=NobwRAlgdgJhDGBDALgewE4EkAiYBcYyEyANgKZgA0YUiAthQVWAM4bL4AMAvpeNHCRosuAi2QoAri2a0G%2BMMzboOeHn0iwEKDDgWJ4RVFABCk5Giiz6jRdWWqeAXSA%3D"); | ||
await page.getByRole('button', { name: 'Share Report' }).click(); | ||
await page.getByText('https://host.docker.internal/').click(); | ||
const emailReport = page.getByRole('button', { name: 'Email Report' }); |
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.
Because the scope of this test is to validate that the Share Report button works, this test should navigate to the link and verify that the link works.
end2end/tests/reportBuilder.spec.ts
Outdated
await emailReport.click(); | ||
}); | ||
|
||
test("Validate JSON button", 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.
Similar to my comment above, this feature is only useful if the generated link is functional. Therefore the test should ensure that the link works.
end2end/tests/reportBuilder.spec.ts
Outdated
await page.getByText('Assigned Person 2').click(); | ||
await page.getByRole('button', { name: 'Generate Report' }).click(); | ||
const createButton = page.getByRole('button', { name: 'Create Row' }); | ||
await expect(createButton).toBeVisible(); |
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.
Observe what happens when you click "Create Row".
We should expect that a new record is created, and shows up on the top. Note that the newly created row has "untitled" in its Title column.
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.
new row button functionality is checked and new row is created with 'untitled' in its Title column.
end2end/tests/reportBuilder.spec.ts
Outdated
await page.getByRole('button', { name: "Edit Labels" }).click(); | ||
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.
??
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.
fixed
end2end/tests/reportBuilder.spec.ts
Outdated
await expect(createButton).toBeFocused(); | ||
}); | ||
|
||
test('Modify search with AND logical 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.
test('Modify search with AND logical filter', async ({ page }) => { | |
test('Modify search with AND logical filter (UI only, does not validate filter results)', async ({ page }) => { |
Clarify that this test does not actually test the logical component, only the UI,
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.
fixed
end2end/tests/reportBuilder.spec.ts
Outdated
}); | ||
|
||
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.
test("Select multiple filter using AND/OR,", async ({ page }) => { | |
test('Select multiple filter using AND/OR (UI only, does not validate filter results)', async ({ page }) => { |
As before: if these tests are not going to check the accuracy of resulting data, we don't want to give a false impression. Therefore, clarification is needed to explain this only tests UI components.
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.
fixed
end2end/tests/reportBuilder.spec.ts
Outdated
await page.goto("https://host.docker.internal/Test_Request_Portal/?a=reports&v=3&query=N4IgLgpgTgtgziAXAbVASwCZJAVztASQBEQAaEAewAdoBDMCqbAXjJBnoGMALbNgc3oRsAQQByJAL6l0WRCE5D%2BjAJ7E21OgybzW5DmB7YAZoxgB9AKwRaABgDsAodgDyAJRDTZ2DBAA2EJBY5JpQ9IwsbAZGiLbkgpCiEp4AuuQAVhRoAHYIKCD4UABuaJzC5DloYGjhUGK0MMJpBYxgSMDSIPyBRPS0SMggAJxsACxsjuQAzCDNfmgwVUgAjLZr5POLYC7GxvhtsZJAA%3D%3D&indicators=NobwRAlgdgJhDGBDALgewE4EkAiYBcYyEyANgKZgA0YUiAthQVWAM4bL4AMAvpeNHCRosuAizLoAbggrVaDfGGZt0HPDz6RYCFBhyLoxCLvTN5jJdRVqN%2FbUL2iwieEVRQAQgFdkaKGfoLZXYuXjtBE30CAE4AhQIAQRYWCABzKDIYAAIAcXRULwAHYNVQzQEdYSiwABY4iwBZLxIiLJJoMizkMgAPDisQ9TCtCKqnAHZ6xQAlRDhUEpthiocRRQBmKYIAZWhU8jaOrt7%2B1kGeAF0gA%3D"); | ||
const firstText = page.getByRole("cell", { name: "4331" }); | ||
await firstText.click(); | ||
await page.getByLabel('Single line text', { exact: true }).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.
Please run the entire test suite in order to identify conflicting tests. This is conflicting with adminPanelFormEditor.spec.ts -> change field heading
.
We can either:
- Update the older test to restore the original fieldname (this would be preferred, because it resolves a problem in that test)
- OR update this test to remove
exact: 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.
fixed
8aaca9a
to
2c09773
Compare
2c09773
to
e141f5d
Compare
3482ccd
to
22ec038
Compare
These two fail for me if I re-run the test |
The tests have been fixed and the test names are updated. Tests are working as expected. Test #1 will still fail on the screenshot. But the remaining 14 which I worked is passing on every run. @mgaoVA @aerinkayne. |
This includes several new tests for the Report Builder.