diff --git a/changes/1640-reroute-homepage b/changes/1640-reroute-homepage deleted file mode 100644 index 03e97a4fd1..0000000000 --- a/changes/1640-reroute-homepage +++ /dev/null @@ -1 +0,0 @@ -* Homepage is now routed to /home instead of hosts/manage \ No newline at end of file diff --git a/cypress/integration/all/app/hosts.spec.ts b/cypress/integration/all/app/hosts.spec.ts index 4ca625f9a9..ead1cbedef 100644 --- a/cypress/integration/all/app/hosts.spec.ts +++ b/cypress/integration/all/app/hosts.spec.ts @@ -19,7 +19,7 @@ describe("Hosts page", () => { }, }, () => { - cy.visit("/hosts/manage"); + cy.visit("/"); cy.contains("button", /add new host/i).click(); @@ -40,7 +40,7 @@ describe("Hosts page", () => { // testing, but may vary by environment). cy.waitUntil( () => { - cy.visit("/hosts/manage"); + cy.visit("/"); return Cypress.$('button[title="Online"]').length > 0; }, { timeout: 30000, interval: 1000 } diff --git a/cypress/integration/all/sessions/sessions.spec.ts b/cypress/integration/all/sessions/sessions.spec.ts index 9ae5820cc8..31caad1eef 100644 --- a/cypress/integration/all/sessions/sessions.spec.ts +++ b/cypress/integration/all/sessions/sessions.spec.ts @@ -15,8 +15,8 @@ describe("Sessions", () => { cy.get("button").click(); // Verify dashboard - cy.url().should("include", "/home"); - cy.contains("Hosts"); + cy.url().should("include", "/hosts/manage"); + cy.contains("All Hosts"); // Log out cy.findByAltText(/user avatar/i).click(); diff --git a/cypress/integration/all/sessions/sso.spec.ts b/cypress/integration/all/sessions/sso.spec.ts index f33473f1e1..f92590bc8e 100644 --- a/cypress/integration/all/sessions/sso.spec.ts +++ b/cypress/integration/all/sessions/sso.spec.ts @@ -17,8 +17,8 @@ describe("SSO Sessions", () => { cy.contains("button", "Login").click(); // Verify dashboard - cy.url().should("include", "/home"); - cy.contains("Hosts"); + cy.url().should("include", "/hosts/manage"); + cy.contains("All Hosts"); // Log out cy.findByAltText(/user avatar/i).click(); diff --git a/cypress/integration/basic/admin.spec.ts b/cypress/integration/basic/admin.spec.ts index 5b7a2f46c7..3d6e32debe 100644 --- a/cypress/integration/basic/admin.spec.ts +++ b/cypress/integration/basic/admin.spec.ts @@ -14,7 +14,7 @@ describe("Basic tier - Admin user", () => { it("Can perform the appropriate basic-tier admin actions", () => { cy.login("anna@organization.com", "user123#"); - cy.visit("/hosts/manage"); + cy.visit("/"); // Ensure the hosts page is loaded cy.contains("All hosts"); diff --git a/cypress/integration/basic/maintainer.spec.ts b/cypress/integration/basic/maintainer.spec.ts index 54d92b482f..fb9f8bfe58 100644 --- a/cypress/integration/basic/maintainer.spec.ts +++ b/cypress/integration/basic/maintainer.spec.ts @@ -14,7 +14,7 @@ describe("Basic tier - Maintainer user", () => { it("Can perform the appropriate basic global maintainer actions", () => { cy.login("mary@organization.com", "user123#"); - cy.visit("/hosts/manage"); + cy.visit("/"); // Ensure page is loaded cy.contains("All hosts"); diff --git a/cypress/integration/basic/observer.spec.ts b/cypress/integration/basic/observer.spec.ts index 6463789366..79c3060738 100644 --- a/cypress/integration/basic/observer.spec.ts +++ b/cypress/integration/basic/observer.spec.ts @@ -14,7 +14,7 @@ describe("Basic tier - Observer user", () => { it("Can perform the appropriate basic global observer actions", () => { cy.login("oliver@organization.com", "user123#"); - cy.visit("/hosts/manage"); + cy.visit("/"); // Ensure page is loaded cy.contains("All hosts"); @@ -67,8 +67,6 @@ describe("Basic tier - Observer user", () => { cy.visit("/schedule/manage"); cy.findByText(/you do not have permissions/i).should("exist"); - cy.visit("/hosts/manage"); - cy.contains(".table-container .data-table__table th", "Team").should( "be.visible" ); diff --git a/cypress/integration/basic/team_maintainer_observer.spec.ts b/cypress/integration/basic/team_maintainer_observer.spec.ts index 2fbc9a32ca..85244a8214 100644 --- a/cypress/integration/basic/team_maintainer_observer.spec.ts +++ b/cypress/integration/basic/team_maintainer_observer.spec.ts @@ -13,7 +13,7 @@ describe("Basic tier - Team observer/maintainer user", () => { it("Can perform the appropriate team observer actions", () => { cy.login("marco@organization.com", "user123#"); - cy.visit("/hosts/manage"); + cy.visit("/"); // Ensure page is loaded cy.contains("Hosts"); @@ -107,7 +107,7 @@ describe("Basic tier - Team observer/maintainer user", () => { it("Can perform the appropriate maintainer actions", () => { cy.login("marco@organization.com", "user123#"); - cy.visit("/hosts/manage"); + cy.visit("/"); // Ensure page is loaded and appropriate nav links are displayed cy.contains("Hosts"); diff --git a/cypress/integration/core/admin.spec.ts b/cypress/integration/core/admin.spec.ts index a4b429aeae..de6e88be71 100644 --- a/cypress/integration/core/admin.spec.ts +++ b/cypress/integration/core/admin.spec.ts @@ -14,7 +14,7 @@ describe("Core tier - Admin user", () => { it("Can perform the appropriate core-tier admin actions", () => { cy.login("anna@organization.com", "user123#"); - cy.visit("/hosts/manage"); + cy.visit("/"); // Ensure page is loaded cy.contains("All hosts"); diff --git a/cypress/integration/core/maintainer.spec.ts b/cypress/integration/core/maintainer.spec.ts index c9b81b6afb..ab9cea3af1 100644 --- a/cypress/integration/core/maintainer.spec.ts +++ b/cypress/integration/core/maintainer.spec.ts @@ -14,7 +14,7 @@ describe("Core tier - Maintainer user", () => { it("Can perform the appropriate core global maintainer actions", () => { cy.login("mary@organization.com", "user123#"); - cy.visit("/hosts/manage"); + cy.visit("/"); // Ensure page is loaded cy.contains("All hosts"); diff --git a/cypress/integration/core/observer.spec.ts b/cypress/integration/core/observer.spec.ts index c7fc303805..eac55ec579 100644 --- a/cypress/integration/core/observer.spec.ts +++ b/cypress/integration/core/observer.spec.ts @@ -14,7 +14,7 @@ describe("Core tier - Observer user", () => { it("Can perform the appropriate core global observer actions", () => { cy.login("oliver@organization.com", "user123#"); - cy.visit("/hosts/manage"); + cy.visit("/"); // Ensure page is loaded cy.contains("All hosts"); diff --git a/frontend/components/side_panels/SiteTopNav/navItems.js b/frontend/components/side_panels/SiteTopNav/navItems.js index 38190de39c..b5bbc1c40e 100644 --- a/frontend/components/side_panels/SiteTopNav/navItems.js +++ b/frontend/components/side_panels/SiteTopNav/navItems.js @@ -21,7 +21,7 @@ export default (currentUser) => { name: "Home", iconName: "logo", location: { - regex: new RegExp(`^${URL_PREFIX}/home`), + regex: new RegExp(`^${URL_PREFIX}/home/dashboard`), pathname: PATHS.HOMEPAGE, }, }, diff --git a/frontend/router/index.jsx b/frontend/router/index.jsx index d904b15e1f..2a7b6f7dc0 100644 --- a/frontend/router/index.jsx +++ b/frontend/router/index.jsx @@ -69,8 +69,8 @@ const routes = ( - - + + diff --git a/frontend/router/paths.ts b/frontend/router/paths.ts index eb08ea9752..536edae829 100644 --- a/frontend/router/paths.ts +++ b/frontend/router/paths.ts @@ -23,7 +23,7 @@ export default { FLEET_403: `${URL_PREFIX}/403`, FLEET_500: `${URL_PREFIX}/500`, LOGIN: `${URL_PREFIX}/login`, - HOMEPAGE: `${URL_PREFIX}/home`, + HOMEPAGE: `${URL_PREFIX}/home/dashboard`, LOGOUT: `${URL_PREFIX}/logout`, MANAGE_HOSTS: `${URL_PREFIX}/hosts/manage`, HOST_DETAILS: (host: IHost): string => {