-
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
Workflow Event Editor #13
base: main
Are you sure you want to change the base?
Conversation
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.
We are using camelCase for filename consistency.
Workflow Editor - Creating and Editing events.spec.ts
should be renamed to workflowEditor.spec.ts
|
||
//Create a New Event | ||
test ('CreateEvent', async ({ page, workflowData}, testinfo) => { | ||
await page.goto('https://host.docker.internal/Test_Request_Portal/admin/?a=workflow'); |
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 line, and similar lines in other tests are redundant.
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.
remove the first line from all test
await page.getByLabel('Close Modal').click(); | ||
|
||
const screenshot = await page.screenshot() | ||
await testinfo.attach('screenshot', { body: screenshot, contentType: 'image/png' }); |
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.
The screenshot should be taken prior to closing the modal in order to show the new events.
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.
added more screenshots
await page.getByRole('button', { name: 'Close' }).click(); | ||
|
||
|
||
const screenshot = await page.screenshot(); |
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 above. Screenshots are not useful if they don't show the expected change.
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.
updated
await page.getByRole('button', { name: 'Save' }).click(); | ||
|
||
await page.getByLabel('List of Events').click(); | ||
//Verify new event is added |
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.
Missing assertion
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.
updated
//End of 1st Test (Create New Event) | ||
|
||
// Select Newly Created Event from dropdown | ||
test('Add Event from ddown', async ({ page, workflowData }, testInfo) => { |
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.
Going through these tests, I have this same issue. Ran on 2 different machines, rebuilt from scratch on the secondary machine.
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 specific test is still giving me issues as well.
|
||
} | ||
|
||
export const test = baseTest.extend<WorkflowFixture>({ |
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.
A fixture is probably unnecessary for this purpose. See example.
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.
Not able to complete tests
Made updates to this PR to include:
|
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.
…icates, edit a event then remove an event
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 ensure this is up-to-date with the main branch, as it's difficult to determine if there are conflicts with existing tests.
-
Filenames should be aligned to their functional location. By prefixing the file with its functional location: "adminPanelWorkflowEditor", it will be easier to keep files organized over time. Consider renaming it to
adminPanelWorkflowEditor-events.spec.ts
, or similar. -
Test names must be aligned to the test plan
Workflow test