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

Workflow Event Editor #13

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Workflow Event Editor #13

wants to merge 7 commits into from

Conversation

22MGreen
Copy link
Contributor

@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
Contributor 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
Contributor 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
Contributor 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

Copy link
Contributor Author

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

Choose a reason for hiding this comment

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

image

Copy link
Contributor

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.

Copy link
Contributor

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.

@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.

Copy link
Contributor

@shaneodd shaneodd left a 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

@22MGreen
Copy link
Contributor Author

22MGreen commented Jan 9, 2025

Made updates to this PR to include:

  1. All changes made, except the fixture one.
    Test Scripts: - Create a New Event, Add New Event from dropdown & Add Events from Side Bar

@Pelentan Pelentan requested review from shaneodd and mgaoVA January 15, 2025 14:25
Copy link
Contributor

@shaneodd shaneodd left a comment

Choose a reason for hiding this comment

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

image
Contacted Margo on Wednesday Jan 15. When going into the data I do not see this as an option to be even clicked on.

Margo Green added 2 commits January 29, 2025 12:49
@22MGreen 22MGreen changed the title save workflow test Workflow Event Editor Jan 29, 2025
@22MGreen
Copy link
Contributor Author

Screenshot_Workflow Event Editor

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.

  1. Please ensure this is up-to-date with the main branch, as it's difficult to determine if there are conflicts with existing tests.
    image

  2. 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.

  3. Test names must be aligned to the test plan

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.

5 participants