Skip to content

Commit

Permalink
Fix nodelist.spec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWatenbergScality committed Jan 3, 2025
1 parent fc0a207 commit 8a85764
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ui/cypress/integration/node/nodelist.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ describe('Node list', () => {
cy.visit('/nodes');
cy.stubHistory();

cy.fixture('kubernetes/nodes.json').then((nodes) => {
// With sorting implemented, node "test" is in unknown state hence should be the first on the nodelist.
cy.location('pathname').should('eq', `/nodes/test/overview`);
});

cy.get('[data-cy="create_node_button"]').click();
cy.url().should('include', '/nodes/create');
});
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/NodeListTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const NodeListTable = ({ nodeTableData }) => {
`/nodes/${nodeName}/`,
);
if (isTabSelected) {
navigate(newPath);
navigate(`${newPath}?${query.toString()}`);
} else {
navigate(`${newPath}/overview?${query.toString()}`);
}
Expand Down

0 comments on commit 8a85764

Please sign in to comment.