Skip to content

Commit 49f74d1

Browse files
Revert logic for dismissing notification alerts on cypress login flow
1 parent 677ac2f commit 49f74d1

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

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

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function addSchedule() {
2424
cy.contains('[role="option"]', '(GMT-10:00) Hawaii')
2525
.should('be.visible')
2626
.click();
27-
cy.get('input#start_date').type('06/30/2025', { force: true });
27+
cy.get('input#start_date').type('06/30/2025');
2828
cy.get('input#start_time').type('11:23');
2929
// Checks if Save button is enabled once all required fields are filled
3030
cy.contains('#main-content .bx--btn-set button[type="submit"]', 'Save')
@@ -63,22 +63,23 @@ 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');
66+
function verifyFilterTypeDropdownExists() {
67+
cy.get('label[for="filter_typ"]').should('exist');
68+
cy.get('select#filter_typ').should('exist');
69+
}
70+
71+
function verifyTimerDropdownExists() {
72+
cy.get('label[for="timer_value"]').should('exist');
73+
cy.get('select#timer_value').should('exist');
7574
}
7675

7776
describe('Automate Schedule form operations: Settings > Application Settings > Settings > Schedules > Configuration > Add a new schedule', () => {
7877
beforeEach(() => {
7978
cy.login();
80-
goToAppSettings();
81-
cy.intercept('POST', '/ops/tree_select?id=xx-msc&text=Schedules').as('getSchedules');
79+
cy.menu(settingsMenuOption, appSettingsMenuOption);
80+
cy.intercept('POST', '/ops/tree_select?id=xx-msc&text=Schedules').as(
81+
'getSchedules'
82+
);
8283
cy.get('[title="Schedules"]').click();
8384
cy.wait('@getSchedules');
8485
});
@@ -197,22 +198,22 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
197198

198199
/* ===== Selecting any other option other than "Once" from "Run" dropdown shows the "Every" dropdown ===== */
199200

200-
cy.get('select#timer_typ').select('Hours', { force: true });
201+
cy.get('select#timer_typ').select('Hours');
201202
// Checking whether the "Every" dropdown exist
202203
cy.get('label[for="timer_value"]').should('exist');
203204
cy.get('select#timer_value').should('exist');
204205

205-
cy.get('select#timer_typ').select('Days', { force: true });
206+
cy.get('select#timer_typ').select('Days');
206207
// Checking whether the "Every" dropdown exist
207208
cy.get('label[for="timer_value"]').should('exist');
208209
cy.get('select#timer_value').should('exist');
209210

210-
cy.get('select#timer_typ').select('Weeks', { force: true });
211+
cy.get('select#timer_typ').select('Weeks');
211212
// Checking whether the "Every" dropdown exist
212213
cy.get('label[for="timer_value"]').should('exist');
213214
cy.get('select#timer_value').should('exist');
214215

215-
cy.get('select#timer_typ').select('Months', { force: true });
216+
cy.get('select#timer_typ').select('Months');
216217
// Checking whether the "Every" dropdown exist
217218
cy.get('label[for="timer_value"]').should('exist');
218219
cy.get('select#timer_value').should('exist');
@@ -275,7 +276,7 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
275276
selectConfigMenu('Edit this Schedule');
276277
// Editing description and start date
277278
cy.get('input#description').clear().type('Dummy description');
278-
cy.get('input#start_date').clear().type('07/21/2025', { force: true });
279+
cy.get('input#start_date').clear().type('07/21/2025');
279280
cy.contains('#main-content .bx--btn-set button[type="button"]', 'Reset')
280281
.should('be.enabled')
281282
.click();

cypress/support/e2e.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ Cypress.on('uncaught:exception', (err, runnable) => {
6161
console.log(err.message);
6262
if (err.message.includes(`Cannot read properties of undefined (reading 'received')`) || // Error handler for Chrome
6363
err.message.includes(`Cannot read properties of undefined (reading '0')`) || // Error handler for Chrome
64-
err.message.includes('response.filtered_item_list[0] is undefined') || // Error handler for Firefox
6564
err.message.includes('subscription is undefined') || // Error handler for Firefox
6665
err.message.includes('NetworkError when attempting to fetch resource.') || // Error handler for Firefox
6766
err.message.includes('The operation was aborted.')) // Error handler for Firefox

0 commit comments

Comments
 (0)