Skip to content

Commit dff7069

Browse files
Added new option for the tests
1 parent 201d7bd commit dff7069

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

cypress/e2e/po/pages/explorer/workload-dashboard.po.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ export default class WorkloadDashboardPagePo extends PagePo {
2222
const sideNav = new ProductNavPo();
2323

2424
burgerMenu.goToCluster(clusterId);
25-
sideNav.navToSideMenuGroupByLabel('Workloads');
26-
sideNav.navToSideMenuEntryByLabel('Workloads');
25+
sideNav.navToSideMenuGroupOverviewByLabel('Workloads');
2726
}
2827

2928
title() {

cypress/e2e/po/side-bars/product-side-nav.po.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ export default class ProductNavPo extends ComponentPo {
4545
return cy.get('.side-nav', LONG_TIMEOUT_OPT).should('exist').contains('.accordion.has-children', label, LONG_TIMEOUT_OPT).click();
4646
}
4747

48+
/**
49+
* Navigate to a group's overview page by clicking its header link
50+
*/
51+
navToSideMenuGroupOverviewByLabel(label: string): Cypress.Chainable {
52+
return this.self().should('exist', LONG_TIMEOUT_OPT)
53+
.contains('.accordion.has-children h6 a', label, LONG_TIMEOUT_OPT)
54+
.click();
55+
}
56+
4857
sideMenuEntryByLabelCount(label: string): Cypress.Chainable {
4958
return this.sideMenuEntryByLabel(label).parent().find('.count').should('exist')
5059
.invoke('text');

0 commit comments

Comments
 (0)