Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

save workflow test #13

wants to merge 1 commit into from

Conversation

22MGreen
Copy link

@22MGreen 22MGreen commented Nov 7, 2024

Workflow test

  1. Creates a new event
  2. Verify that you are not able to create a duplicate event
  3. Verify you can select a new event from the workflow
  4. Verify you can select an event from the sidebar navigation

@shaneodd
Copy link
Contributor

This test is not working, tried on a couple different machines and get the same error. This was tested with the master branch.
image

Copy link
Collaborator

@mgaoVA mgaoVA left a 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');
Copy link
Collaborator

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.

Copy link
Author

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' });
Copy link
Collaborator

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.

Copy link
Author

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();
Copy link
Collaborator

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.

Copy link
Author

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
Copy link
Collaborator

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) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@mgaoVA
Copy link
Collaborator

mgaoVA commented Nov 15, 2024

This test is not working, tried on a couple different machines and get the same error. This was tested with the master branch. image

Ensure your local database is synced with the Standard Test DB by running the API tester. This should be done if you've made any changes outside of these test.


}

export const test = baseTest.extend<WorkflowFixture>({
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants