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

[fix flaky on mki] add dismiss all toasts #184659

Merged
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 @@ -17,6 +17,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
const svlCommonNavigation = getPageObject('svlCommonNavigation');
const svlCommonPage = getPageObject('svlCommonPage');
const svlObltNavigation = getService('svlObltNavigation');
const toasts = getService('toasts');

describe('Cases list', function () {
before(async () => {
Expand Down Expand Up @@ -258,6 +259,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
createNCasesBeforeDeleteAllAfter(1, getPageObject, getService);

it('deletes a case correctly', async () => {
await toasts.dismissAll();
Copy link
Member

Choose a reason for hiding this comment

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

I am wondering if we should do it before each test. Wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

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

If you'd like to, please update this branch, so we can git it in quicker.
I don't see the harm in it, personally.

Copy link
Member

@cnasikas cnasikas Jun 3, 2024

Choose a reason for hiding this comment

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

If we are in a rush to merge this PR then it is better to leave it as it is. In case it was not clear what I meant by "before each test" was something like

beforeEach(async () => {
   await toasts.dismissAll();
}

await cases.casesTable.deleteCase(0);
await cases.casesTable.waitForTableToFinishLoading();
await cases.casesTable.validateCasesTableHasNthRows(0);
Expand Down