Skip to content

Commit 80cd64a

Browse files
Replaced accordionItem with selectAccordionItem cypress-command
1 parent 9c04b87 commit 80cd64a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const textConstants = {
66

77
// List items
88
schedulesAccordionItem: 'Schedules',
9+
manageIQRegionAccordItem: /^ManageIQ Region:/,
910

1011
// Field values
1112
initialScheduleName: 'Test-name',
@@ -243,7 +244,11 @@ function interceptGetScheduleDetailsApi(scheduleName = initialScheduleName) {
243244
).as('getCreatedScheduleApi');
244245
// Triggering the action that will fire the API call,
245246
// which is selecting the created schedule
246-
cy.accordionItem(scheduleName);
247+
cy.selectAccordionItem([
248+
manageIQRegionAccordItem,
249+
schedulesAccordionItem,
250+
scheduleName,
251+
]);
247252
// Wait for the API call to complete if it was fired
248253
// This is to ensure that the test does not fail if the request was not fired
249254
cy.then(() => {
@@ -324,7 +329,7 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
324329
pathname: '/ops/tree_select',
325330
query: { text: schedulesAccordionItem },
326331
}).as('getSchedules');
327-
cy.accordionItem(schedulesAccordionItem);
332+
cy.selectAccordionItem([manageIQRegionAccordItem, schedulesAccordionItem]);
328333
cy.wait('@getSchedules');
329334
});
330335

0 commit comments

Comments
 (0)