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

LPD-37310 Adjsut cookieBanner playwright test #4501

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ test('@LPD-25701 Cookie Banner Script', async ({
systemSettingsPage,
}) => {
await test.step('Go to page and click edit', async () => {
await page.goto(layout.friendlyURL);
await page.goto(layout.friendlyUrlPath);

await page.locator('#content').waitFor({state: 'visible'});
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of this, can we just await edit button?

const editButton = await page.getByRole('link', {name: 'Edit'});

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is also flaky it seems. It get stuck not finding the Edit button. Trying to avoid this.


const editButton = page.getByRole('link', {name: 'Edit'});

Expand Down Expand Up @@ -52,7 +54,6 @@ test('@LPD-25701 Cookie Banner Script', async ({
await htmlExample.waitFor({state: 'visible'});
await htmlExample.click();
await htmlExample.click();
await htmlExample.click();
Copy link
Collaborator

Choose a reason for hiding this comment

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

You said in #4190 (comment) that triple click is the only way to edit. What changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah this section is flaky as well and I'm thinking of redoing this a different way in order to prevent all the flaky tasks.


const htmlSection = page.locator('.CodeMirror-scroll');

Expand Down Expand Up @@ -118,7 +119,10 @@ test('@LPD-25701 Cookie Banner Script', async ({
await updateButton.click();
}

await waitForAlert(page);
await waitForAlert(
page,
`Success:Your request completed successfully.`
);
Comment on lines +122 to +125
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this change is needed. waitForAlert defaults to this text.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought this too but was failing locally without it until I changed it. I'll revert it and see if I get any further errors.

});

await test.step('Accept Cookies', async () => {
Expand Down