Skip to content

Commit 9b2fb7b

Browse files
Removing duplicate delete-schedule calls
1 parent 49f74d1 commit 9b2fb7b

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

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

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,7 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
251251
'Schedule "Dummy name" was saved'
252252
);
253253

254-
/* ===== Deleting schedule ===== */
255-
deleteSchedule('Dummy name');
254+
/* ===== Delete is already handled from afterEach hook ===== */
256255
});
257256

258257
it('Checking whether Cancel & Reset buttons work fine in the Edit form', () => {
@@ -287,9 +286,8 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
287286
cy.get('input#description').should('have.value', 'Test description');
288287
cy.get('input#start_date').should('have.value', '06/30/2025');
289288

290-
/* ===== Deleting schedule ===== */
289+
// Selecting Schedules menu item to bypass a bug, can be removed once #9505 is merged
291290
cy.get('[title="Schedules"]').click();
292-
deleteSchedule();
293291
});
294292

295293
it('Checking whether creating a duplicate record is restricted', () => {
@@ -301,9 +299,6 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
301299
cy.get('#main_div #flash_msg_div .alert-danger').contains(
302300
'Error when adding a new schedule: Validation failed: MiqSchedule: Name has already been taken'
303301
);
304-
305-
/* ===== Deleting schedule ===== */
306-
deleteSchedule();
307302
});
308303

309304
it('Checking whether Disabling, Enabling & Queueing up the schedule works', () => {
@@ -329,9 +324,6 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
329324
cy.get('#main_div #flash_msg_div .alert-success').contains(
330325
'The selected Schedule has been queued to run'
331326
);
332-
333-
/* ===== Deleting schedule ===== */
334-
deleteSchedule();
335327
});
336328

337329
afterEach(() => {
@@ -341,7 +333,7 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
341333
invokeCleanupDeletion();
342334
} else {
343335
// Navigate to Settings -> Application-Settings before looking out for Schedules created during test
344-
goToAppSettings();
336+
cy.menu('Settings', 'Application Settings');
345337
invokeCleanupDeletion();
346338
}
347339
});

0 commit comments

Comments
 (0)