Skip to content

Commit

Permalink
Fix cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
e40pud committed Oct 6, 2023
1 parent 09fe4cd commit b705793
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

import { ALERT_ASSIGNING_UPDATE_BUTTON } from '../screens/alerts';
import { refreshPage } from './security_header';

export const waitForAssigneesToPopulatePopover = () => {
cy.waitUntil(
Expand All @@ -22,10 +21,10 @@ export const waitForAssigneesToPopulatePopover = () => {
};

export const waitForAssigneeToAppearInTable = (userName: string) => {
cy.reload();
cy.waitUntil(
() => {
cy.log('Waiting for assignees to appear in the "Assignees" column');
refreshPage();
return cy.root().then(($el) => {
const assigneesState = $el.find(`.euiDataGridRowCell__truncate:contains('${userName}')`);
if (assigneesState.length > 0) {
Expand All @@ -39,10 +38,10 @@ export const waitForAssigneeToAppearInTable = (userName: string) => {
};

export const waitForAssigneeToDisappearInTable = (userName: string) => {
cy.reload();
cy.waitUntil(
() => {
cy.log('Waiting for assignees to disappear in the "Assignees" column');
refreshPage();
return cy.root().then(($el) => {
const assigneesState = $el.find(`.euiDataGridRowCell__truncate:contains('${userName}')`);
if (assigneesState.length > 0) {
Expand Down

0 comments on commit b705793

Please sign in to comment.