-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vue3 - fix detail page routing (#11976)
* remove optional modifier from the cluster/product/resource/namespace/id route * add e2e test for node detail page refresh
- Loading branch information
1 parent
8e18f2e
commit 1a2373d
Showing
4 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
cypress/e2e/tests/pages/explorer2/nodes/node-detail.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import ResourceTable from '@/cypress/e2e/po//components/resource-table.po'; | ||
import ClusterDashboardPagePo from '@/cypress/e2e/po/pages/explorer/cluster-dashboard.po'; | ||
import HomePagePo from '@/cypress/e2e/po/pages/home.po'; | ||
import ProductNavPo from '@/cypress/e2e/po/side-bars/product-side-nav.po'; | ||
|
||
describe('Node detail', { tags: ['@explorer2', '@adminUser'], testIsolation: 'off' }, () => { | ||
before(() => { | ||
cy.login(); | ||
HomePagePo.goTo(); | ||
}); | ||
|
||
it('should still show the node detail view when the page is refreshed', () => { | ||
ClusterDashboardPagePo.navTo(); | ||
|
||
const nav = new ProductNavPo(); | ||
|
||
nav.navToSideMenuEntryByLabel('Nodes'); | ||
|
||
cy.contains('.title > h1', 'Nodes').should('be.visible'); | ||
|
||
const nodeList = new ResourceTable('[data-testid="cluster-node-list"]'); | ||
|
||
nodeList.sortableTable().checkVisible(); | ||
|
||
// Wait for loading indicator to go | ||
nodeList.sortableTable().checkLoadingIndicatorNotVisible(); | ||
|
||
nodeList.sortableTable().rowElementLink(0, 2).click(); | ||
cy.get('.title .primaryheader h1').should('be.visible'); | ||
cy.get('.title .primaryheader h1').invoke('text').should('contain', 'Node:'); | ||
cy.reload(); | ||
// check that the page rendered is a detail view | ||
cy.get('.title .primaryheader h1').should('be.visible'); | ||
cy.get('.title .primaryheader h1').invoke('text').should('contain', 'Node:'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters