diff --git a/ui/cypress/integration/node/nodetabs.spec.js b/ui/cypress/integration/node/nodetabs.spec.js index b7309d5f5c..84b586c013 100644 --- a/ui/cypress/integration/node/nodetabs.spec.js +++ b/ui/cypress/integration/node/nodetabs.spec.js @@ -92,7 +92,9 @@ describe('Node page volumes tabs', () => { it('brings me to the loki-vol volume page', () => { cy.stubHistory(); - cy.findByRole('gridcell', { name: /loki-vol/i }).click(); + cy.findByRole('gridcell', { name: /loki-vol/i }); + + cy.findByText(/loki-vol/i).click({ force: true }); cy.url().should('include', '/volumes/loki-vol/overview'); }); diff --git a/ui/src/containers/NodePageContent.tsx b/ui/src/containers/NodePageContent.tsx index a1446f5cbb..e7aadd9ad1 100644 --- a/ui/src/containers/NodePageContent.tsx +++ b/ui/src/containers/NodePageContent.tsx @@ -27,7 +27,11 @@ const NodePageContent = (props) => { useEffect(() => { if (nodeTableData.length > 0) { const firstNodeName = nodeTableData[0]?.name?.name; - if (firstNodeName && !path.includes(firstNodeName)) { + if ( + firstNodeName && + !path.includes(firstNodeName) && + path.endsWith('/nodes') + ) { navigate(`/nodes/${firstNodeName}/overview`, { replace: true }); } } // eslint-disable-next-line react-hooks/exhaustive-deps