Skip to content

Commit cb3b1e1

Browse files
committed
optimized steps
1 parent 8354754 commit cb3b1e1

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

cypress/e2e/my-dspace.cy.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,17 +232,21 @@ describe('My DSpace page', () => {
232232
//Wait for the page to display
233233
cy.get('ds-my-dspace-page').should('be.visible');
234234

235+
//And wait to list is ready
236+
cy.get('[data-test="objects"]').should('be.visible');
237+
235238
//Intercept to await backend response
236239
cy.intercept({
237240
method: 'GET',
238241
url: '/server/api/discover/search/objects**',
239242
}).as('workflowSearch');
240243

241244
//Change view to see workflow tasks
242-
cy.get('ds-search-switch-configuration select')
243-
.find('option[data-test="workflow"]')
244-
.then(option => {
245-
cy.get('ds-search-switch-configuration select').select(option.val());
245+
cy.get('ds-search-switch-configuration select option[data-test="workflow"]')
246+
.should('exist')
247+
.invoke('attr', 'value')
248+
.then(value => {
249+
cy.get('ds-search-switch-configuration select').select(value);
246250
});
247251

248252
//Await backend search response

0 commit comments

Comments
 (0)