-
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
save workflow test #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
//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.
|
||
} | ||
|
||
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.
Workflow test