From 8d21666fbd4a053455beda471e8c406f509153ef Mon Sep 17 00:00:00 2001 From: Raju Udava Date: Thu, 21 Oct 2021 12:26:55 +0530 Subject: [PATCH] [test] cypress: support for split category in shared view list Signed-off-by: Raju Udava --- cypress/support/page_objects/mainPage.js | 15 +++++++++++---- cypress/support/page_objects/navigation.js | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cypress/support/page_objects/mainPage.js b/cypress/support/page_objects/mainPage.js index bd1946f770..570b6d9d40 100644 --- a/cypress/support/page_objects/mainPage.js +++ b/cypress/support/page_objects/mainPage.js @@ -197,12 +197,19 @@ export class _mainPage { cy.getActiveMenu().find('.v-list-item').contains('Views List').click() - cy.get(1000) + cy.wait(1000) + + // cy.get('.container').find('button.mdi-delete-outline') cy.get('th:contains("View Link")').parent().parent() - .next().find('tr').each((tableRow) => { - cy.wrap(tableRow).find('button').last().click() - cy.wait(1000) + .next().find('tr').each(($tableRow) => { + cy.log($tableRow[0].childElementCount) + + // one of the row would contain seggregation header ('other views) + if (4 == $tableRow[0].childElementCount) { + cy.wrap($tableRow).find('button').last().click() + cy.wait(1000) + } }) .then(() => { cy.get('.v-overlay__content > .d-flex > .v-icon').click() diff --git a/cypress/support/page_objects/navigation.js b/cypress/support/page_objects/navigation.js index 0bc6ad1dda..2decbb1274 100644 --- a/cypress/support/page_objects/navigation.js +++ b/cypress/support/page_objects/navigation.js @@ -263,7 +263,7 @@ export class _projectsPage { } waitHomePageLoad() { - cy.url({ timeout: 25000 }).should('contain', '?type=roles') + cy.url({ timeout: 50000 }).should('contain', '?type=roles') } waitDeletePageLoad() {