Skip to content

Commit 677ac2f

Browse files
Added wait for notifications API on menu navigation Settings->ApplicationSettings
1 parent 945b755 commit 677ac2f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

cypress/e2e/ui/Settings/Application-Settings/schedule.cy.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,21 @@ function invokeCleanupDeletion() {
6363
});
6464
}
6565

66+
function goToAppSettings() {
67+
cy.intercept('GET', '/api/notifications').as('getNotifications');
68+
cy.intercept(
69+
'GET',
70+
'/api/notifications?expand=resources&attributes=details&sort_by=id&sort_order=desc&limit=100'
71+
).as('getExpandedNotifications');
72+
cy.menu('Settings', 'Application Settings');
73+
cy.wait('@getNotifications');
74+
cy.wait('@getExpandedNotifications');
75+
}
76+
6677
describe('Automate Schedule form operations: Settings > Application Settings > Settings > Schedules > Configuration > Add a new schedule', () => {
6778
beforeEach(() => {
6879
cy.login();
69-
cy.menu('Settings', 'Application Settings');
80+
goToAppSettings();
7081
cy.intercept('POST', '/ops/tree_select?id=xx-msc&text=Schedules').as('getSchedules');
7182
cy.get('[title="Schedules"]').click();
7283
cy.wait('@getSchedules');
@@ -329,7 +340,7 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
329340
invokeCleanupDeletion();
330341
} else {
331342
// Navigate to Settings -> Application-Settings before looking out for Schedules created during test
332-
cy.menu('Settings', 'Application Settings');
343+
goToAppSettings();
333344
invokeCleanupDeletion();
334345
}
335346
});

0 commit comments

Comments
 (0)