Skip to content

Commit 070fea0

Browse files
Replaced accordionItem with selectAccordionItem cypress-command
1 parent 85c077a commit 070fea0

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
@@ -7,6 +7,7 @@ const textConstants = {
77

88
// List items
99
schedulesAccordionItem: 'Schedules',
10+
manageIQRegionAccordItem: /^ManageIQ Region:/,
1011

1112
// Field values
1213
initialScheduleName: 'Test-name',
@@ -231,7 +232,11 @@ function interceptGetScheduleDetailsApi(scheduleName = initialScheduleName) {
231232
).as('getCreatedScheduleApi');
232233
// Triggering the action that will fire the API call,
233234
// which is selecting the created schedule
234-
cy.accordionItem(scheduleName);
235+
cy.selectAccordionItem([
236+
manageIQRegionAccordItem,
237+
schedulesAccordionItem,
238+
scheduleName,
239+
]);
235240
// Wait for the API call to complete if it was fired
236241
// This is to ensure that the test does not fail if the request was not fired
237242
cy.then(() => {
@@ -312,7 +317,7 @@ describe('Automate Schedule form operations: Settings > Application Settings > S
312317
pathname: '/ops/tree_select',
313318
query: { text: schedulesAccordionItem },
314319
}).as('getSchedules');
315-
cy.accordionItem(schedulesAccordionItem);
320+
cy.selectAccordionItem([manageIQRegionAccordItem, schedulesAccordionItem]);
316321
cy.wait('@getSchedules');
317322
});
318323

0 commit comments

Comments
 (0)