-
User Secrets
-
-
-
+
User Secrets
{!user.logged ? (
diff --git a/tests/cypress/e2e/dashboard.spec.ts b/tests/cypress/e2e/dashboard.spec.ts
index a99831c192..a5d737e1ae 100644
--- a/tests/cypress/e2e/dashboard.spec.ts
+++ b/tests/cypress/e2e/dashboard.spec.ts
@@ -546,3 +546,60 @@ describe("Dashboard pins", () => {
);
});
});
+
+describe("announce v2 banner", () => {
+ beforeEach(() => {
+ fixtures.config().versions().userTest().userPreferences();
+ });
+
+ it("v2 banner should be visible on the v1 dashboard", () => {
+ fixtures
+ .projects()
+ .entitySearch({ fixture: "kgSearch/emptySearch.json", total: 0 })
+ .getLastVisitedProjects({
+ fixture: "projects/empty-last-visited-projects.json",
+ })
+ .noActiveProjects()
+ .sessionServersEmpty();
+
+ cy.visit("/v1");
+ cy.wait("@getUser");
+ cy.wait("@getDataServiceUser");
+ cy.wait("@getEntities");
+ cy.wait("@getLastVisitedProjects");
+ cy.wait("@getNoActiveProjects");
+
+ cy.getDataCy("announce-v2-banner").should("be.visible");
+
+ // TODO -- go to search, banner should not be visible there
+ });
+
+ it("v2 banner should not be visible outside the v1 dashboard", () => {
+ fixtures
+ .projects()
+ .entitySearch({ fixture: "kgSearch/emptySearch.json", total: 0 })
+ .getLastVisitedProjects({
+ fixture: "projects/empty-last-visited-projects.json",
+ })
+ .noActiveProjects()
+ .sessionServersEmpty();
+
+ cy.visit("/v1/search");
+ cy.wait("@getUser");
+ cy.wait("@getDataServiceUser");
+ cy.wait("@getEntities");
+
+ cy.getDataCy("announce-v2-banner").should("not.exist");
+ });
+});
+
+describe("anonymous dashboard", () => {
+ beforeEach(() => {
+ fixtures.config().versions().userNone();
+ });
+
+ it("user should be prompted to log in", () => {
+ cy.visit("/v1");
+ cy.contains("to view the Renku legacy dashboard").should("be.visible");
+ });
+});
diff --git a/tests/cypress/e2e/navV2.spec.ts b/tests/cypress/e2e/navV2.spec.ts
index 31c7158ff9..18328594c3 100644
--- a/tests/cypress/e2e/navV2.spec.ts
+++ b/tests/cypress/e2e/navV2.spec.ts
@@ -18,7 +18,7 @@
import fixtures from "../support/renkulab-fixtures";
-describe("View v2 landing page", () => {
+describe("View v2 nav bar", () => {
beforeEach(() => {
fixtures.config().versions().userTest();
cy.visit("/");
@@ -45,3 +45,14 @@ describe("View v2 landing page", () => {
cy.contains("Create a new project").should("be.visible");
});
});
+
+describe("View v1 nav bar", () => {
+ beforeEach(() => {
+ fixtures.config().versions().userTest();
+ cy.visit("/v1");
+ });
+
+ it("check for legacy information", () => {
+ cy.get(".badge.bg-warning").contains("Legacy").should("be.visible");
+ });
+});
diff --git a/tests/cypress/e2e/newSession.spec.ts b/tests/cypress/e2e/newSession.spec.ts
index 055c3c7ce5..e3caf5cac8 100644
--- a/tests/cypress/e2e/newSession.spec.ts
+++ b/tests/cypress/e2e/newSession.spec.ts
@@ -311,8 +311,8 @@ describe("launch sessions, outdated projects", () => {
.contains("Update the project to start a session.")
.should("be.visible");
cy.get("a.btn")
- .should("have.attr", "href", "/projects/e2e/local-test-project/settings")
.contains("Settings")
+ .should("have.attr", "href", "/projects/e2e/local-test-project/settings")
.should("be.visible");
});
@@ -332,8 +332,8 @@ describe("launch sessions, outdated projects", () => {
.contains("Changes are necessary to start a session.")
.should("be.visible");
cy.get("a.btn")
- .should("have.attr", "href", "/projects/e2e/local-test-project/settings")
.contains("Settings")
+ .should("have.attr", "href", "/projects/e2e/local-test-project/settings")
.should("be.visible");
});