diff --git a/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectDelete.tsx b/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectDelete.tsx index ba6beb0eca..a8efbfaf5a 100644 --- a/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectDelete.tsx +++ b/client/src/features/ProjectPageV2/ProjectPageContent/Settings/ProjectDelete.tsx @@ -55,7 +55,7 @@ export default function ProjectPageDelete({ project }: ProjectDeleteProps) { useEffect(() => { if (result.isSuccess) { - navigate(ABSOLUTE_ROUTES.v2.projects.root); + navigate(ABSOLUTE_ROUTES.v2.root); if (notifications) notificationProjectDeleted(notifications, project.name); } diff --git a/client/src/features/ProjectPageV2/settings/ProjectDeleteConfirmation.tsx b/client/src/features/ProjectPageV2/settings/ProjectDeleteConfirmation.tsx index 836ab1b5dd..71498bedf7 100644 --- a/client/src/features/ProjectPageV2/settings/ProjectDeleteConfirmation.tsx +++ b/client/src/features/ProjectPageV2/settings/ProjectDeleteConfirmation.tsx @@ -64,7 +64,7 @@ export default function ProjectDeleteConfirmation({ useEffect(() => { if (result.isSuccess) { - navigate(ABSOLUTE_ROUTES.v2.projects.root); + navigate(ABSOLUTE_ROUTES.v2.root); if (notifications) notificationProjectDeleted(notifications, project.name); } diff --git a/client/src/features/dashboardV2/DashboardV2.tsx b/client/src/features/dashboardV2/DashboardV2.tsx index e54e550a64..2981c9a457 100644 --- a/client/src/features/dashboardV2/DashboardV2.tsx +++ b/client/src/features/dashboardV2/DashboardV2.tsx @@ -18,17 +18,10 @@ import cx from "classnames"; import { Folder, People, PlayCircle, PlusLg } from "react-bootstrap-icons"; import { Link } from "react-router-dom-v5-compat"; -import { - Card, - CardBody, - CardFooter, - CardHeader, - Col, - ListGroup, - Row, -} from "reactstrap"; +import { Card, CardBody, CardHeader, Col, ListGroup, Row } from "reactstrap"; import { WarnAlert } from "../../components/Alert"; +import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; import { ExternalLink } from "../../components/ExternalLinks"; import { Loader } from "../../components/Loader"; import { @@ -36,33 +29,44 @@ import { useGetProjectsQuery, } from "../projectsV2/api/projectV2.enhanced-api"; import BackToV1Button from "../projectsV2/shared/BackToV1Button"; -import { RtkOrNotebooksError } from "../../components/errors/RtkErrorAlert"; -import DashboardV2Sessions from "./DashboardV2Sessions"; import GroupShortHandDisplay from "../projectsV2/show/GroupShortHandDisplay"; import ProjectShortHandDisplay from "../projectsV2/show/ProjectShortHandDisplay"; +import DashboardV2Sessions from "./DashboardV2Sessions"; export default function DashboardV2() { return (
- - - + + + + + + + + +
); } function DashboardWelcome() { return ( -
+
-

Welcome to the Renku 2.0 beta preview!

+

+ Welcome to the Renku 2.0 beta preview!! +

-

+

Learn more about Renku 2.0 on our{" "} -

Do not do any important work in the Renku 2.0 beta preview!

-

+

+ Do not do any important work in the Renku 2.0 beta preview! +

+

The beta is for testing only. We do not guarantee saving and - persisting work in the beta. + persisting work in the beta. You can go{" "} + at any time.

-
- You can go at any time. -
@@ -125,12 +129,6 @@ function ProjectsDashboard() { - - - - View all my projects - - ); } @@ -139,6 +137,7 @@ function ProjectList() { const { data, error, isLoading } = useGetProjectsQuery({ page: 1, perPage: 5, + direct_member: true, }); const noProjects = isLoading ? ( @@ -151,22 +150,38 @@ function ProjectList() {

Cannot show projects.

- ) : data == null || data?.total === 0 ? ( + ) : !data || data?.projects?.length === 0 ? (
No 2.0 projects.
) : null; - if (noProjects) return
{noProjects}
; + const viewLink = ( + + ); + + if (noProjects) + return ( +
+ {noProjects} + {viewLink} +
+ ); return ( - - {data?.projects?.map((project) => ( - - ))} - +
+ + {data?.projects?.map((project) => ( + + ))} + + {viewLink} +
); } @@ -195,12 +210,6 @@ function GroupsDashboard() { - - - - View all my groups - - ); } @@ -209,6 +218,7 @@ function GroupsList() { const { data, error, isLoading } = useGetGroupsQuery({ page: 1, perPage: 5, + direct_member: true, }); const noGroups = isLoading ? ( @@ -221,22 +231,35 @@ function GroupsList() {

Cannot show groups.

- ) : data == null || data?.total === 0 ? ( + ) : !data || data == null || data?.groups?.length === 0 ? (
No 2.0 groups.
) : null; - if (noGroups) return
{noGroups}
; + const viewLink = ( + + ); + + if (noGroups) + return ( +
+ {noGroups} + {viewLink} +
+ ); return ( - - {data?.groups?.map((group) => ( - - ))} - +
+ + {data?.groups?.map((group) => ( + + ))} + + {viewLink} +
); } @@ -256,3 +279,27 @@ function SessionsDashboard() { ); } + +function ViewAllLink({ + type, + noItems, +}: { + type: "project" | "group"; + noItems: boolean; +}) { + return noItems ? ( + + View other {type === "project" ? "projects" : "groups"} + + ) : ( + + View all my {type === "project" ? "projects" : "groups"} + + ); +} diff --git a/client/src/features/dashboardV2/DashboardV2Sessions.tsx b/client/src/features/dashboardV2/DashboardV2Sessions.tsx index ec2da1f281..b95eec252b 100644 --- a/client/src/features/dashboardV2/DashboardV2Sessions.tsx +++ b/client/src/features/dashboardV2/DashboardV2Sessions.tsx @@ -90,14 +90,14 @@ function DashboardSession({ session }: DashboardSessionProps) { ? generatePath(ABSOLUTE_ROUTES.v2.projects.showById, { id: projectId, }) - : ABSOLUTE_ROUTES.v2.projects.root; + : ABSOLUTE_ROUTES.v2.root; const showSessionUrl = project ? generatePath(ABSOLUTE_ROUTES.v2.projects.show.sessions.show, { namespace: project.namespace, slug: project.slug, session: session.name, }) - : ABSOLUTE_ROUTES.v2.projects.root; + : ABSOLUTE_ROUTES.v2.root; return ( import("./list/GroupList")); - -export default function LazyGroupList() { - return ( - }> - - - ); -} diff --git a/client/src/features/projectsV2/LazyProjectV2List.tsx b/client/src/features/projectsV2/LazyProjectV2List.tsx deleted file mode 100644 index 7324588093..0000000000 --- a/client/src/features/projectsV2/LazyProjectV2List.tsx +++ /dev/null @@ -1,29 +0,0 @@ -/*! - * Copyright 2024 - Swiss Data Science Center (SDSC) - * A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and - * Eidgenössische Technische Hochschule Zürich (ETHZ). - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ -import { Suspense, lazy } from "react"; -import PageLoader from "../../components/PageLoader"; - -const ProjectV2List = lazy(() => import("./list/ProjectV2List")); - -export default function LazyProjectV2List() { - return ( - }> - - - ); -} diff --git a/client/src/features/projectsV2/api/namespace.api.ts b/client/src/features/projectsV2/api/namespace.api.ts index bf7fc4e360..b05a579ff8 100644 --- a/client/src/features/projectsV2/api/namespace.api.ts +++ b/client/src/features/projectsV2/api/namespace.api.ts @@ -91,6 +91,8 @@ export type GetGroupsApiArg = { page?: number; /** The number of results per page */ perPage?: number; + /** A flag to filter groups where the user is a direct member */ + direct_member?: boolean; }; export type PostGroupsApiResponse = /** status 201 The group was created */ GroupResponse; diff --git a/client/src/features/projectsV2/api/projectV2.api.ts b/client/src/features/projectsV2/api/projectV2.api.ts index d685b66a41..2e12f25e3e 100644 --- a/client/src/features/projectsV2/api/projectV2.api.ts +++ b/client/src/features/projectsV2/api/projectV2.api.ts @@ -90,6 +90,8 @@ export type GetProjectsApiArg = { page?: number; /** The number of results per page */ perPage?: number; + /** A flag to filter projects where the user is a direct member */ + direct_member?: boolean; }; export type PostProjectsApiResponse = /** status 201 The project was created */ Project; @@ -142,6 +144,7 @@ export type Ulid = string; export type ProjectName = string; export type Slug = string; export type CreationDate = string; +export type UpdatedAt = string; export type UserId = string; export type Repository = string; export type RepositoriesList = Repository[]; @@ -162,6 +165,7 @@ export type Project = { description?: Description; etag?: ETag; keywords?: KeywordsList; + updated_at?: UpdatedAt; }; export type ProjectsList = Project[]; export type ErrorResponse = { diff --git a/client/src/features/projectsV2/api/projectV2.enhanced-api.ts b/client/src/features/projectsV2/api/projectV2.enhanced-api.ts index b47bdc8b3a..ae21df71e4 100644 --- a/client/src/features/projectsV2/api/projectV2.enhanced-api.ts +++ b/client/src/features/projectsV2/api/projectV2.enhanced-api.ts @@ -58,7 +58,11 @@ const injectedApi = api.injectEndpoints({ getGroupsPaged: builder.query({ query: (queryArg) => ({ url: "/groups", - params: { page: queryArg.page, per_page: queryArg.perPage }, + params: { + page: queryArg.page, + per_page: queryArg.perPage, + direct_member: queryArg.direct_member, + }, }), transformResponse: (response, meta, queryArg) => { const groups = response as GroupResponseList; @@ -113,6 +117,7 @@ const injectedApi = api.injectEndpoints({ url: "/projects", params: { namespace: queryArg["namespace"], + direct_member: queryArg["direct_member"], page: queryArg.page, per_page: queryArg.perPage, }, diff --git a/client/src/features/projectsV2/list/GroupList.tsx b/client/src/features/projectsV2/list/GroupList.tsx index 8dde39426a..e69de29bb2 100644 --- a/client/src/features/projectsV2/list/GroupList.tsx +++ b/client/src/features/projectsV2/list/GroupList.tsx @@ -1,136 +0,0 @@ -/*! - * Copyright 2023 - Swiss Data Science Center (SDSC) - * A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and - * Eidgenössische Technische Hochschule Zürich (ETHZ). - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ -import cx from "classnames"; -import { useState } from "react"; -import { Card, CardBody, Col, Row } from "reactstrap"; -import { generatePath, Link } from "react-router-dom-v5-compat"; - -import ContainerWrap from "../../../components/container/ContainerWrap"; -import FormSchema from "../../../components/formschema/FormSchema"; -import { Loader } from "../../../components/Loader"; -import Pagination from "../../../components/Pagination"; -import { TimeCaption } from "../../../components/TimeCaption"; -import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; -import type { GroupResponse } from "../api/namespace.api"; -import { useGetGroupsQuery } from "../api/projectV2.enhanced-api"; -import WipBadge from "../shared/WipBadge"; -import { RtkOrNotebooksError } from "../../../components/errors/RtkErrorAlert"; -import ClampedParagraph from "../../../components/clamped/ClampedParagraph"; - -interface GroupListGroupProps { - group: GroupResponse; -} -function GroupListGroup({ group }: GroupListGroupProps) { - const groupUrl = generatePath(ABSOLUTE_ROUTES.v2.groups.show.root, { - slug: group.slug, - }); - return ( - - - -
- {group.name} -
- - {group.description && ( - - {group.description} - - )} - - -
-
- - ); -} - -function GroupListDisplay() { - const perPage = 12; - const [page, setPage] = useState(1); - const { data, error, isLoading } = useGetGroupsQuery({ - page, - perPage, - }); - - if (isLoading) - return ( -
-
- -
Retrieving groups...
-
-
- ); - - if (error || data == null) { - return ; - } - - if (!data.total) return
No renku v2 groups.
; - - return ( -
- - {data.groups?.map((group) => ( - - ))} - - -
- ); -} - -export default function GroupList() { - const newGroupUrl = ABSOLUTE_ROUTES.v2.groups.new; - return ( - - -

- All visible groups - -

-
- - Create New Group - -
- - } - > - -
-
- ); -} diff --git a/client/src/features/projectsV2/list/ProjectV2List.tsx b/client/src/features/projectsV2/list/ProjectV2List.tsx deleted file mode 100644 index 7259ee620b..0000000000 --- a/client/src/features/projectsV2/list/ProjectV2List.tsx +++ /dev/null @@ -1,52 +0,0 @@ -/*! - * Copyright 2024 - Swiss Data Science Center (SDSC) - * A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and - * Eidgenössische Technische Hochschule Zürich (ETHZ). - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ - -import cx from "classnames"; -import { Link } from "react-router-dom-v5-compat"; - -import FormSchema from "../../../components/formschema/FormSchema"; -import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; -import WipBadge from "../shared/WipBadge"; -import ProjectListDisplay from "./ProjectV2ListDisplay"; - -export default function ProjectV2List() { - const newProjectUrl = ABSOLUTE_ROUTES.v2.projects.new; - return ( - -

- All visible projects - -

-
- - Create New Project - -
- - } - > - There are no visible projects.

} - /> -
- ); -} diff --git a/client/src/features/projectsV2/new/GroupNew.tsx b/client/src/features/projectsV2/new/GroupNew.tsx index 94b021d856..d664670acf 100644 --- a/client/src/features/projectsV2/new/GroupNew.tsx +++ b/client/src/features/projectsV2/new/GroupNew.tsx @@ -146,7 +146,7 @@ function GroupMetadataForm() {
Cancel diff --git a/client/src/features/projectsV2/notFound/GroupNotFound.tsx b/client/src/features/projectsV2/notFound/GroupNotFound.tsx index 2820412130..0adbc2eafb 100644 --- a/client/src/features/projectsV2/notFound/GroupNotFound.tsx +++ b/client/src/features/projectsV2/notFound/GroupNotFound.tsx @@ -61,11 +61,11 @@ export default function GroupNotFound({ error }: GroupNotFoundProps) {
- Return to the groups list + Return to the dashboard
diff --git a/client/src/features/projectsV2/notFound/ProjectNotFound.tsx b/client/src/features/projectsV2/notFound/ProjectNotFound.tsx index cdb91e5fde..3d179800cc 100644 --- a/client/src/features/projectsV2/notFound/ProjectNotFound.tsx +++ b/client/src/features/projectsV2/notFound/ProjectNotFound.tsx @@ -82,11 +82,11 @@ export default function ProjectNotFound({ error }: ProjectNotFoundProps) {
- Return to the projects list + Return to the dashboard
diff --git a/client/src/features/projectsV2/show/GroupShortHandDisplay.tsx b/client/src/features/projectsV2/show/GroupShortHandDisplay.tsx index 7dd0e39a98..8daf8411c9 100644 --- a/client/src/features/projectsV2/show/GroupShortHandDisplay.tsx +++ b/client/src/features/projectsV2/show/GroupShortHandDisplay.tsx @@ -18,11 +18,8 @@ import cx from "classnames"; import { Link, generatePath } from "react-router-dom-v5-compat"; - -import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; -import VisibilityIcon from "../../../components/entities/VisibilityIcon"; import { TimeCaption } from "../../../components/TimeCaption"; -import ClampedParagraph from "../../../components/clamped/ClampedParagraph"; +import { ABSOLUTE_ROUTES } from "../../../routing/routes.constants"; import { GroupResponse } from "../api/namespace.api"; interface GroupShortHandDisplayProps { @@ -42,17 +39,10 @@ export default function GroupShortHandDisplay({ )} data-cy="group-item" > -
{group.name}
-

{group.slug}

- {group.description && ( - - {group.description} - - )} -
- +
+

{group.name}

-
{project.name}
-

- @{project.namespace}/{project.slug} -

- - {project.description && ( - - {project.description} - - )} +
+

+ {project.name} +

+ +
- - +

+ @{project.namespace}/{project.slug} +

+ {project.updated_at ? ( + + ) : ( + + )}
); diff --git a/client/src/features/rootV2/RootV2.tsx b/client/src/features/rootV2/RootV2.tsx index 67aa75644a..c23f7b20b3 100644 --- a/client/src/features/rootV2/RootV2.tsx +++ b/client/src/features/rootV2/RootV2.tsx @@ -34,9 +34,7 @@ import LazyConnectedServicesPage from "../connectedServices/LazyConnectedService import LazyDashboardV2 from "../dashboardV2/LazyDashboardV2"; import LazyHelpV2 from "../dashboardV2/LazyHelpV2"; import LazyGroupV2Show from "../groupsV2/LazyGroupV2Show"; -import LazyGroupV2List from "../projectsV2/LazyGroupList"; import LazyGroupV2New from "../projectsV2/LazyGroupNew"; -import LazyProjectV2List from "../projectsV2/LazyProjectV2List"; import LazyProjectV2New from "../projectsV2/LazyProjectV2New"; import LazyProjectV2ShowByProjectId from "../projectsV2/LazyProjectV2ShowByProjectId"; import LazySearchV2 from "../searchV2/LazySearchV2"; @@ -140,7 +138,6 @@ export default function RootV2() { function GroupsV2Routes() { return ( - } /> } @@ -175,14 +172,6 @@ function HelpV2Routes() { function ProjectsV2Routes() { return ( - - - - } - /> { }); it("list groups", () => { - cy.contains("List Groups").should("not.exist"); + cy.contains("View other groups").should("not.exist"); cy.contains("View all my groups").should("be.visible").click(); - cy.contains("List Groups").should("be.visible"); + cy.contains("Renku 2.0 Search").should("be.visible"); + cy.getDataCy("search-filter-role-owner").should("be.checked"); + cy.getDataCy("search-filter-role-editor").should("be.checked"); + cy.getDataCy("search-filter-role-viewer").should("be.checked"); + cy.getDataCy("search-filter-type-group").should("be.checked"); }); it("list projects", () => { - cy.contains("List Projects (V2)").should("not.exist"); + cy.contains("View other projects").should("not.exist"); cy.contains("View all my projects").should("be.visible").click(); - cy.contains("List Projects (V2)").should("be.visible"); + cy.contains("Renku 2.0 Search").should("be.visible"); + cy.getDataCy("search-filter-role-owner").should("be.checked"); + cy.getDataCy("search-filter-role-editor").should("be.checked"); + cy.getDataCy("search-filter-role-viewer").should("be.checked"); + cy.getDataCy("search-filter-type-project").should("be.checked"); + }); +}); + +describe("View v2 landing page empty", () => { + beforeEach(() => { + fixtures.config().versions().userTest().namespaces(); + fixtures.projects().landingUserProjects().readProjectV2ById(); + cy.visit("/v2"); + }); + + it("view dashboard", () => { + cy.contains("Sessions").should("be.visible"); + cy.contains("Projects").should("be.visible"); + cy.contains("Groups").should("be.visible"); + }); + + it("list groups", () => { + cy.contains("View all my groups").should("not.exist"); + cy.contains("View other groups").should("be.visible").click(); + cy.contains("Renku 2.0 Search").should("be.visible"); + cy.getDataCy("search-filter-role-owner").should("not.be.checked"); + cy.getDataCy("search-filter-role-editor").should("be.not.checked"); + cy.getDataCy("search-filter-role-viewer").should("be.not.checked"); + cy.getDataCy("search-filter-type-group").should("be.checked"); + }); + + it("list projects", () => { + cy.contains("View all my projects").should("not.exist"); + cy.contains("View other projects").should("be.visible").click(); + cy.contains("Renku 2.0 Search").should("be.visible"); + cy.getDataCy("search-filter-role-owner").should("be.not.checked"); + cy.getDataCy("search-filter-role-editor").should("be.not.checked"); + cy.getDataCy("search-filter-role-viewer").should("be.not.checked"); + cy.getDataCy("search-filter-type-project").should("be.checked"); }); }); diff --git a/tests/cypress/e2e/groupV2.spec.ts b/tests/cypress/e2e/groupV2.spec.ts index 3dfa0e661b..47772ce80e 100644 --- a/tests/cypress/e2e/groupV2.spec.ts +++ b/tests/cypress/e2e/groupV2.spec.ts @@ -60,19 +60,21 @@ describe("List v2 groups", () => { beforeEach(() => { fixtures.config().versions().userTest().namespaces(); fixtures.projects().landingUserProjects().listManyGroupV2(); - cy.visit("/v2/groups"); + cy.visit("/v2"); }); it("list groups", () => { - cy.contains("List Groups").should("be.visible"); - cy.contains("test 15 group-v2").should("not.exist"); - cy.get(".page-item").find("a").contains("2").click(); - cy.contains("test 15 group-v2").should("be.visible"); + cy.contains("Groups").should("be.visible"); + cy.contains("test 1 group-v2").should("exist"); + cy.getDataCy("dashboard-group-list") + .find("a") + .its("length") + .should("eq", 5); }); it("shows groups", () => { fixtures.readGroupV2().readGroupV2Namespace(); - cy.contains("List Groups").should("be.visible"); + cy.contains("Groups").should("be.visible"); cy.contains("test 2 group-v2").should("be.visible").click(); cy.wait("@readGroupV2"); cy.contains("test 2 group-v2").should("be.visible"); @@ -90,7 +92,7 @@ describe("Edit v2 group", () => { }) .namespaces(); fixtures.projects().landingUserProjects().listGroupV2(); - cy.visit("/v2/groups"); + cy.visit("/v2"); }); it("allows editing group metadata", () => { @@ -99,7 +101,7 @@ describe("Edit v2 group", () => { .readGroupV2Namespace() .listGroupV2Members() .updateGroupV2(); - cy.contains("List Groups").should("be.visible"); + cy.contains("Groups").should("be.visible"); cy.contains("test 2 group-v2").should("be.visible").click(); cy.wait("@readGroupV2"); cy.contains("test 2 group-v2").should("be.visible"); @@ -134,7 +136,7 @@ describe("Edit v2 group", () => { .readGroupV2() .readGroupV2Namespace(); - cy.contains("List Groups").should("be.visible"); + cy.contains("Groups").should("be.visible"); cy.contains("test 2 group-v2").should("be.visible").click(); cy.wait("@readGroupV2"); cy.contains("test 2 group-v2").should("be.visible"); @@ -173,7 +175,7 @@ describe("Edit v2 group", () => { .readGroupV2Namespace() .listGroupV2Members() .deleteGroupV2(); - cy.contains("List Groups").should("be.visible"); + cy.contains("Groups").should("be.visible"); cy.contains("test 2 group-v2").should("be.visible").click(); cy.wait("@readGroupV2"); cy.contains("test 2 group-v2").should("be.visible"); @@ -196,6 +198,6 @@ describe("Edit v2 group", () => { name: "listGroupV2PostDelete", }); cy.contains("Group with slug test-2-group-v2 does not exist"); - cy.contains("Return to the groups list").click(); + cy.contains("Return to the dashboard").click(); }); }); diff --git a/tests/cypress/e2e/projectV2.spec.ts b/tests/cypress/e2e/projectV2.spec.ts index 66c04dd220..54bf74d2bd 100644 --- a/tests/cypress/e2e/projectV2.spec.ts +++ b/tests/cypress/e2e/projectV2.spec.ts @@ -118,33 +118,6 @@ describe("Add new v2 project -- not logged in", () => { }); }); -describe("List v2 project", () => { - beforeEach(() => { - fixtures.config().versions().userTest().namespaces(); - fixtures.projects().landingUserProjects().listProjectV2(); - cy.visit("/v2/projects"); - }); - - it("list projects", () => { - cy.contains("List Projects (V2)").should("be.visible"); - }); - - it("list projects with pagination", () => { - fixtures.listManyProjectV2(); - cy.wait("@listProjectV2"); - cy.contains("List Projects (V2)").should("be.visible"); - cy.get("ul.rk-search-pagination").should("be.visible"); - }); - - it("shows projects", () => { - fixtures.readProjectV2(); - cy.contains("List Projects (V2)").should("be.visible"); - cy.contains("test 2 v2-project").should("be.visible").click(); - cy.wait("@readProjectV2"); - cy.contains("test 2 v2-project").should("be.visible"); - }); -}); - describe("Navigate to project", () => { beforeEach(() => { fixtures.config().versions().userTest().namespaces(); @@ -222,13 +195,13 @@ describe("Edit v2 project", () => { .projects() .landingUserProjects() .listProjectV2(); - cy.visit("/v2/projects"); + cy.visit("/v2"); }); it("changes project metadata", () => { fixtures.readProjectV2().updateProjectV2().listNamespaceV2(); - cy.contains("List Projects (V2)").should("be.visible"); - cy.getDataCy("project-card") + cy.contains("Projects").should("be.visible"); + cy.getDataCy("dashboard-project-list") .contains("a", "test 2 v2-project") .should("be.visible") .click(); @@ -252,8 +225,7 @@ describe("Edit v2 project", () => { it("changes project namespace", () => { fixtures.readProjectV2().updateProjectV2().listManyNamespaceV2(); - cy.contains("List Projects (V2)").should("be.visible"); - cy.getDataCy("project-card") + cy.getDataCy("dashboard-project-list") .contains("a", "test 2 v2-project") .should("be.visible") .click(); @@ -286,8 +258,7 @@ describe("Edit v2 project", () => { fixtures.readProjectV2().updateProjectV2({ fixture: "projectV2/update-projectV2-repositories.json", }); - cy.contains("List Projects (V2)").should("be.visible"); - cy.getDataCy("project-card") + cy.getDataCy("dashboard-project-list") .contains("a", "test 2 v2-project") .should("be.visible") .click(); @@ -460,7 +431,7 @@ describe("Edit v2 project", () => { fixture: "projectV2/list-projectV2-post-delete.json", name: "listProjectV2PostDelete", }); - cy.contains("List Projects (V2)"); + cy.contains("Projects"); cy.contains("Project deleted").should("be.visible"); }); });