-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding hashes to system tab URLs (#5535)
- Loading branch information
Showing
5 changed files
with
136 additions
and
43 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
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 |
---|---|---|
|
@@ -123,7 +123,11 @@ describe("System management with Plus features", () => { | |
cy.wait("@getDictSystem"); | ||
cy.getByTestId("input-dpo").should("have.value", "[email protected]"); | ||
cy.getByTestId("tab-Data uses").click(); | ||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(500); | ||
cy.getByTestId("tab-Information").click(); | ||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(500); | ||
cy.getByTestId("tab-Data uses").click(); | ||
cy.getByTestId("confirmation-modal").should("not.exist"); | ||
}); | ||
|
@@ -460,4 +464,44 @@ describe("System management with Plus features", () => { | |
}); | ||
}); | ||
}); | ||
|
||
describe("tab navigation", () => { | ||
it("updates URL hash when switching tabs", () => { | ||
cy.visit(`${SYSTEM_ROUTE}/configure/demo_analytics_system#information`); | ||
cy.location("hash").should("eq", "#information"); | ||
|
||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(500); | ||
cy.getByTestId("tab-Data uses").click(); | ||
cy.location("hash").should("eq", "#data-uses"); | ||
|
||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(500); | ||
cy.getByTestId("tab-Data flow").click(); | ||
cy.location("hash").should("eq", "#data-flow"); | ||
|
||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(500); | ||
cy.getByTestId("tab-Integrations").click(); | ||
cy.location("hash").should("eq", "#integrations"); | ||
|
||
// eslint-disable-next-line cypress/no-unnecessary-waiting | ||
cy.wait(500); | ||
cy.getByTestId("tab-History").click(); | ||
cy.location("hash").should("eq", "#history"); | ||
}); | ||
|
||
it("loads correct tab directly based on URL hash", () => { | ||
// Visit page with specific hash | ||
cy.visit(`${SYSTEM_ROUTE}/configure/demo_analytics_system#data-uses`); | ||
|
||
// Verify correct tab is active | ||
cy.getByTestId("tab-Data uses").should( | ||
"have.attr", | ||
"aria-selected", | ||
"true", | ||
); | ||
cy.location("hash").should("eq", "#data-uses"); | ||
}); | ||
}); | ||
}); |
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
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