15768: adjusted project spec Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox...
[arvados-workbench2.git] / cypress / integration / project.spec.js
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 describe("Project tests", function () {
6     let activeUser;
7     let adminUser;
8
9     before(function () {
10         // Only set up common users once. These aren't set up as aliases because
11         // aliases are cleaned up after every test. Also it doesn't make sense
12         // to set the same users on beforeEach() over and over again, so we
13         // separate a little from Cypress' 'Best Practices' here.
14         cy.getUser("admin", "Admin", "User", true, true)
15             .as("adminUser")
16             .then(function () {
17                 adminUser = this.adminUser;
18             });
19         cy.getUser("user", "Active", "User", false, true)
20             .as("activeUser")
21             .then(function () {
22                 activeUser = this.activeUser;
23             });
24     });
25
26     beforeEach(function () {
27         cy.clearCookies();
28         cy.clearLocalStorage();
29     });
30
31     it("creates a new project with multiple properties", function () {
32         const projName = `Test project (${Math.floor(999999 * Math.random())})`;
33         cy.loginAs(activeUser);
34         cy.get("[data-cy=side-panel-button]").click();
35         cy.get("[data-cy=side-panel-new-project]").click();
36         cy.get("[data-cy=form-dialog]")
37             .should("contain", "New Project")
38             .within(() => {
39                 cy.get("[data-cy=name-field]").within(() => {
40                     cy.get("input").type(projName);
41                 });
42             });
43         // Key: Color (IDTAGCOLORS) - Value: Magenta (IDVALCOLORS3)
44         cy.get("[data-cy=form-dialog]").should("not.contain", "Color: Magenta");
45         cy.get("[data-cy=resource-properties-form]").within(() => {
46             cy.get("[data-cy=property-field-key]").within(() => {
47                 cy.get("input").type("Color");
48             });
49             cy.get("[data-cy=property-field-value]").within(() => {
50                 cy.get("input").type("Magenta");
51             });
52             cy.root().submit();
53             cy.get("[data-cy=property-field-value]").within(() => {
54                 cy.get("input").type("Pink");
55             });
56             cy.root().submit();
57             cy.get("[data-cy=property-field-value]").within(() => {
58                 cy.get("input").type("Yellow");
59             });
60             cy.root().submit();
61         });
62         // Confirm proper vocabulary labels are displayed on the UI.
63         cy.get("[data-cy=form-dialog]").should("contain", "Color: Magenta");
64         cy.get("[data-cy=form-dialog]").should("contain", "Color: Pink");
65         cy.get("[data-cy=form-dialog]").should("contain", "Color: Yellow");
66
67         cy.get("[data-cy=resource-properties-form]").within(() => {
68             cy.get("[data-cy=property-field-key]").within(() => {
69                 cy.get("input").focus();
70             });
71             cy.get("[data-cy=property-field-key]").should("not.contain", "Color");
72         });
73
74         // Create project and confirm the properties' real values.
75         cy.get("[data-cy=form-submit-btn]").click();
76         cy.get("[data-cy=breadcrumb-last]").should("contain", projName);
77         cy.doRequest("GET", "/arvados/v1/groups", null, {
78             filters: `[["name", "=", "${projName}"], ["group_class", "=", "project"]]`,
79         })
80             .its("body.items")
81             .as("projects")
82             .then(function () {
83                 expect(this.projects).to.have.lengthOf(1);
84                 expect(this.projects[0].properties).to.deep.equal(
85                     // Pink is not in the test vocab
86                     { IDTAGCOLORS: ["IDVALCOLORS3", "Pink", "IDVALCOLORS1"] }
87                 );
88             });
89
90         // Open project edit via breadcrumbs
91         cy.get("[data-cy=breadcrumbs]").contains(projName).rightclick();
92         cy.get("[data-cy=context-menu]").contains("Edit").click();
93         cy.get("[data-cy=form-dialog]").within(() => {
94             cy.get("[data-cy=resource-properties-list]").within(() => {
95                 cy.get("div[role=button]").contains("Color: Magenta");
96                 cy.get("div[role=button]").contains("Color: Pink");
97                 cy.get("div[role=button]").contains("Color: Yellow");
98             });
99         });
100         // Add another property
101         cy.get("[data-cy=resource-properties-form]").within(() => {
102             cy.get("[data-cy=property-field-key]").within(() => {
103                 cy.get("input").type("Animal");
104             });
105             cy.get("[data-cy=property-field-value]").within(() => {
106                 cy.get("input").type("Dog");
107             });
108             cy.root().submit();
109         });
110         cy.get("[data-cy=form-submit-btn]").click({ force: true });
111         // Reopen edit via breadcrumbs and verify properties
112         cy.get("[data-cy=breadcrumbs]").contains(projName).rightclick();
113         cy.get("[data-cy=context-menu]").contains("Edit").click();
114         cy.get("[data-cy=form-dialog]").within(() => {
115             cy.get("[data-cy=resource-properties-list]").within(() => {
116                 cy.get("div[role=button]").contains("Color: Magenta");
117                 cy.get("div[role=button]").contains("Color: Pink");
118                 cy.get("div[role=button]").contains("Color: Yellow");
119                 cy.get("div[role=button]").contains("Animal: Dog");
120             });
121         });
122     });
123
124     it("creates a project without and with description", function () {
125         const projName = `Test project (${Math.floor(999999 * Math.random())})`;
126         cy.loginAs(activeUser);
127
128         // Create project
129         cy.get("[data-cy=side-panel-button]").click();
130         cy.get("[data-cy=side-panel-new-project]").click();
131         cy.get("[data-cy=form-dialog]")
132             .should("contain", "New Project")
133             .within(() => {
134                 cy.get("[data-cy=name-field]").within(() => {
135                     cy.get("input").type(projName);
136                 });
137             });
138         cy.get("[data-cy=form-submit-btn]").click();
139
140         const editProjectDescription = (name, type) => {
141             cy.get("[data-cy=side-panel-tree]").contains("Home Projects").click();
142             cy.get("[data-cy=project-panel] tbody tr").contains(name).rightclick({ force: true });
143             cy.get("[data-cy=context-menu]").contains("Edit").click();
144             cy.get("[data-cy=form-dialog]").within(() => {
145                 cy.get("div[contenteditable=true]").click().type(type);
146                 cy.get("[data-cy=form-submit-btn]").click();
147             });
148         };
149
150         const verifyProjectDescription = (name, description) => {
151             cy.doRequest("GET", "/arvados/v1/groups", null, {
152                 filters: `[["name", "=", "${name}"], ["group_class", "=", "project"]]`,
153             })
154                 .its("body.items")
155                 .as("projects")
156                 .then(function () {
157                     expect(this.projects).to.have.lengthOf(1);
158                     expect(this.projects[0].description).to.equal(description);
159                 });
160         };
161
162         // Edit description
163         editProjectDescription(projName, "Test description");
164
165         // Check description is set
166         verifyProjectDescription(projName, "<p>Test description</p>");
167
168         // Clear description
169         editProjectDescription(projName, "{selectall}{backspace}");
170
171         // Check description is null
172         verifyProjectDescription(projName, null);
173
174         // Set description to contain whitespace
175         editProjectDescription(projName, "{selectall}{backspace}    x");
176         editProjectDescription(projName, "{backspace}");
177
178         // Check description is null
179         verifyProjectDescription(projName, null);
180     });
181
182     it("creates new project on home project and then a subproject inside it", function () {
183         const createProject = function (name, parentName) {
184             cy.get("[data-cy=side-panel-button]").click();
185             cy.get("[data-cy=side-panel-new-project]").click();
186             cy.get("[data-cy=form-dialog]")
187                 .should("contain", "New Project")
188                 .within(() => {
189                     cy.get("[data-cy=parent-field]").within(() => {
190                         cy.get("input")
191                             .invoke("val")
192                             .then(val => {
193                                 expect(val).to.include(parentName);
194                             });
195                     });
196                     cy.get("[data-cy=name-field]").within(() => {
197                         cy.get("input").type(name);
198                     });
199                 });
200             cy.get("[data-cy=form-submit-btn]").click();
201         };
202
203         cy.loginAs(activeUser);
204         cy.goToPath(`/projects/${activeUser.user.uuid}`);
205         cy.get("[data-cy=breadcrumb-first]").should("contain", "Projects");
206         cy.get("[data-cy=breadcrumb-last]").should("not.exist");
207         // Create new project
208         const projName = `Test project (${Math.floor(999999 * Math.random())})`;
209         createProject(projName, "Home project");
210         // Confirm that the user was taken to the newly created thing
211         cy.get("[data-cy=form-dialog]").should("not.exist");
212         cy.get("[data-cy=breadcrumb-first]").should("contain", "Projects");
213         cy.get("[data-cy=breadcrumb-last]").should("contain", projName);
214         // Create a subproject
215         const subProjName = `Test project (${Math.floor(999999 * Math.random())})`;
216         createProject(subProjName, projName);
217         cy.get("[data-cy=form-dialog]").should("not.exist");
218         cy.get("[data-cy=breadcrumb-first]").should("contain", "Projects");
219         cy.get("[data-cy=breadcrumb-last]").should("contain", subProjName);
220     });
221
222     it("attempts to use a preexisting name creating a project", function () {
223         const name = `Test project ${Math.floor(Math.random() * 999999)}`;
224         cy.createGroup(activeUser.token, {
225             name: name,
226             group_class: "project",
227         });
228         cy.loginAs(activeUser);
229         cy.goToPath(`/projects/${activeUser.user.uuid}`);
230
231         // Attempt to create new collection with a duplicate name
232         cy.get("[data-cy=side-panel-button]").click();
233         cy.get("[data-cy=side-panel-new-project]").click();
234         cy.get("[data-cy=form-dialog]")
235             .should("contain", "New Project")
236             .within(() => {
237                 cy.get("[data-cy=name-field]").within(() => {
238                     cy.get("input").type(name);
239                 });
240                 cy.get("[data-cy=form-submit-btn]").click();
241             });
242         // Error message should display, allowing editing the name
243         cy.get("[data-cy=form-dialog]")
244             .should("exist")
245             .and("contain", "Project with the same name already exists")
246             .within(() => {
247                 cy.get("[data-cy=name-field]").within(() => {
248                     cy.get("input").type(" renamed");
249                 });
250                 cy.get("[data-cy=form-submit-btn]").click();
251             });
252         cy.get("[data-cy=form-dialog]").should("not.exist");
253     });
254
255     it("navigates to the parent project after trashing the one being displayed", function () {
256         cy.createGroup(activeUser.token, {
257             name: `Test root project ${Math.floor(Math.random() * 999999)}`,
258             group_class: "project",
259         })
260             .as("testRootProject")
261             .then(function () {
262                 cy.createGroup(activeUser.token, {
263                     name: `Test subproject ${Math.floor(Math.random() * 999999)}`,
264                     group_class: "project",
265                     owner_uuid: this.testRootProject.uuid,
266                 }).as("testSubProject");
267             });
268         cy.getAll("@testRootProject", "@testSubProject").then(function ([testRootProject, testSubProject]) {
269             cy.loginAs(activeUser);
270
271             // Go to subproject and trash it.
272             cy.goToPath(`/projects/${testSubProject.uuid}`);
273             cy.get("[data-cy=side-panel-tree]").should("contain", testSubProject.name);
274             cy.get("[data-cy=breadcrumb-last]").should("contain", testSubProject.name).rightclick();
275             cy.get("[data-cy=context-menu]").contains("Move to trash").click();
276
277             // Confirm that the parent project should be displayed.
278             cy.get("[data-cy=breadcrumb-last]").should("contain", testRootProject.name);
279             cy.url().should("contain", `/projects/${testRootProject.uuid}`);
280             cy.get("[data-cy=side-panel-tree]").should("not.contain", testSubProject.name);
281
282             // Checks for bugfix #17637.
283             cy.get("[data-cy=not-found-content]").should("not.exist");
284             cy.get("[data-cy=not-found-page]").should("not.exist");
285         });
286     });
287
288     it("resets the search box only when navigating out of the current project", function () {
289         const fooProjectNameA = `Test foo project ${Math.floor(Math.random() * 999999)}`;
290         const fooProjectNameB = `Test foo project ${Math.floor(Math.random() * 999999)}`;
291         const barProjectNameA = `Test bar project ${Math.floor(Math.random() * 999999)}`;
292
293         [fooProjectNameA, fooProjectNameB, barProjectNameA].forEach(projName => {
294             cy.createGroup(activeUser.token, {
295                 name: projName,
296                 group_class: "project",
297             });
298         });
299
300         cy.loginAs(activeUser);
301         cy.get("[data-cy=project-panel]").should("contain", fooProjectNameA).and("contain", fooProjectNameB).and("contain", barProjectNameA);
302
303         cy.get("[data-cy=search-input]").type("foo");
304         cy.get("[data-cy=project-panel]").should("contain", fooProjectNameA).and("contain", fooProjectNameB).and("not.contain", barProjectNameA);
305
306         // Click on the table row to select it, search should remain the same.
307         cy.get(`p:contains(${fooProjectNameA})`).parent().parent().parent().parent().click();
308         cy.get("[data-cy=search-input] input").should("have.value", "foo");
309
310         // Click to navigate to the project, search should be reset
311         cy.get(`p:contains(${fooProjectNameA})`).click();
312         cy.get("[data-cy=search-input] input").should("not.have.value", "foo");
313     });
314
315     it("navigates to the root project after trashing the parent of the one being displayed", function () {
316         cy.createGroup(activeUser.token, {
317             name: `Test root project ${Math.floor(Math.random() * 999999)}`,
318             group_class: "project",
319         })
320             .as("testRootProject")
321             .then(function () {
322                 cy.createGroup(activeUser.token, {
323                     name: `Test subproject ${Math.floor(Math.random() * 999999)}`,
324                     group_class: "project",
325                     owner_uuid: this.testRootProject.uuid,
326                 })
327                     .as("testSubProject")
328                     .then(function () {
329                         cy.createGroup(activeUser.token, {
330                             name: `Test sub subproject ${Math.floor(Math.random() * 999999)}`,
331                             group_class: "project",
332                             owner_uuid: this.testSubProject.uuid,
333                         }).as("testSubSubProject");
334                     });
335             });
336         cy.getAll("@testRootProject", "@testSubProject", "@testSubSubProject").then(function ([testRootProject, testSubProject, testSubSubProject]) {
337             cy.loginAs(activeUser);
338
339             // Go to innermost project and trash its parent.
340             cy.goToPath(`/projects/${testSubSubProject.uuid}`);
341             cy.get("[data-cy=side-panel-tree]").should("contain", testSubSubProject.name);
342             cy.get("[data-cy=breadcrumb-last]").should("contain", testSubSubProject.name);
343             cy.get("[data-cy=side-panel-tree]").contains(testSubProject.name).rightclick();
344             cy.get("[data-cy=context-menu]").contains("Move to trash").click();
345
346             // Confirm that the trashed project's parent should be displayed.
347             cy.get("[data-cy=breadcrumb-last]").should("contain", testRootProject.name);
348             cy.url().should("contain", `/projects/${testRootProject.uuid}`);
349             cy.get("[data-cy=side-panel-tree]").should("not.contain", testSubProject.name);
350             cy.get("[data-cy=side-panel-tree]").should("not.contain", testSubSubProject.name);
351
352             // Checks for bugfix #17637.
353             cy.get("[data-cy=not-found-content]").should("not.exist");
354             cy.get("[data-cy=not-found-page]").should("not.exist");
355         });
356     });
357
358     it("shows details panel when clicking on the info icon", () => {
359         cy.createGroup(activeUser.token, {
360             name: `Test root project ${Math.floor(Math.random() * 999999)}`,
361             group_class: "project",
362         })
363             .as("testRootProject")
364             .then(function (testRootProject) {
365                 cy.loginAs(activeUser);
366
367                 cy.get("[data-cy=side-panel-tree]").contains(testRootProject.name).click();
368
369                 cy.get("[data-cy=additional-info-icon]").click();
370
371                 cy.contains(testRootProject.uuid).should("exist");
372             });
373     });
374
375     it("clears search input when changing project", () => {
376         cy.createGroup(activeUser.token, {
377             name: `Test root project ${Math.floor(Math.random() * 999999)}`,
378             group_class: "project",
379         })
380             .as("testProject1")
381             .then(testProject1 => {
382                 cy.shareWith(adminUser.token, activeUser.user.uuid, testProject1.uuid, "can_write");
383             });
384
385         cy.getAll("@testProject1").then(function ([testProject1]) {
386             cy.loginAs(activeUser);
387
388             cy.get("[data-cy=side-panel-tree]").contains(testProject1.name).click();
389
390             cy.get("[data-cy=search-input] input").type("test123");
391
392             cy.get("[data-cy=side-panel-tree]").contains("Projects").click();
393
394             cy.get("[data-cy=search-input] input").should("not.have.value", "test123");
395         });
396     });
397
398     it("opens advanced popup for project with username", () => {
399         const projectName = `Test project ${Math.floor(Math.random() * 999999)}`;
400
401         cy.createGroup(adminUser.token, {
402             name: projectName,
403             group_class: "project",
404         }).as("mainProject");
405
406         cy.getAll("@mainProject").then(function ([mainProject]) {
407             cy.loginAs(adminUser);
408
409             cy.get("[data-cy=side-panel-tree]").contains("Groups").click();
410
411             cy.get("[data-cy=uuid]")
412                 .eq(0)
413                 .invoke("text")
414                 .then(uuid => {
415                     cy.createLink(adminUser.token, {
416                         name: "can_write",
417                         link_class: "permission",
418                         head_uuid: mainProject.uuid,
419                         tail_uuid: uuid,
420                     });
421
422                     cy.createLink(adminUser.token, {
423                         name: "can_write",
424                         link_class: "permission",
425                         head_uuid: mainProject.uuid,
426                         tail_uuid: activeUser.user.uuid,
427                     });
428
429                     cy.get("[data-cy=side-panel-tree]").contains("Projects").click();
430
431                     cy.get("main").contains(projectName).rightclick();
432
433                     cy.get("[data-cy=context-menu]").contains("API Details").click();
434
435                     cy.get("[role=tablist]").contains("METADATA").click();
436
437                     cy.get("td").contains(uuid).should("exist");
438
439                     cy.get("td").contains(activeUser.user.uuid).should("exist");
440                 });
441         });
442     });
443
444     describe("Frozen projects", () => {
445         beforeEach(() => {
446             cy.createGroup(activeUser.token, {
447                 name: `Main project ${Math.floor(Math.random() * 999999)}`,
448                 group_class: "project",
449             }).as("mainProject");
450
451             cy.createGroup(adminUser.token, {
452                 name: `Admin project ${Math.floor(Math.random() * 999999)}`,
453                 group_class: "project",
454             })
455                 .as("adminProject")
456                 .then(mainProject => {
457                     cy.shareWith(adminUser.token, activeUser.user.uuid, mainProject.uuid, "can_write");
458                 });
459
460             cy.get("@mainProject").then(mainProject => {
461                 cy.createGroup(adminUser.token, {
462                     name: `Sub project ${Math.floor(Math.random() * 999999)}`,
463                     group_class: "project",
464                     owner_uuid: mainProject.uuid,
465                 }).as("subProject");
466
467                 cy.createCollection(adminUser.token, {
468                     name: `Main collection ${Math.floor(Math.random() * 999999)}`,
469                     owner_uuid: mainProject.uuid,
470                     manifest_text: "./subdir 37b51d194a7513e45b56f6524f2d51f2+3 0:3:foo\n. 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n",
471                 }).as("mainCollection");
472             });
473         });
474
475         it("should be able to froze own project", () => {
476             cy.getAll("@mainProject").then(([mainProject]) => {
477                 cy.loginAs(activeUser);
478
479                 cy.get("[data-cy=project-panel]").contains(mainProject.name).rightclick();
480
481                 cy.get("[data-cy=context-menu]").contains("Freeze").click();
482
483                 cy.get("[data-cy=project-panel]").contains(mainProject.name).rightclick();
484
485                 cy.get("[data-cy=context-menu]").contains("Freeze").should("not.exist");
486             });
487         });
488
489         it("should not be able to modify items within the frozen project", () => {
490             cy.getAll("@mainProject", "@mainCollection").then(([mainProject, mainCollection]) => {
491                 cy.loginAs(activeUser);
492
493                 cy.get("[data-cy=project-panel]").contains(mainProject.name).rightclick();
494
495                 cy.get("[data-cy=context-menu]").contains("Freeze").click();
496
497                 cy.get("[data-cy=project-panel]").contains(mainProject.name).click();
498
499                 cy.get("[data-cy=project-panel]").contains(mainCollection.name).rightclick();
500
501                 cy.get("[data-cy=context-menu]").contains("Move to trash").should("not.exist");
502             });
503         });
504
505         it("should be able to froze not owned project", () => {
506             cy.getAll("@adminProject").then(([adminProject]) => {
507                 cy.loginAs(activeUser);
508
509                 cy.get("[data-cy=side-panel-tree]").contains("Shared with me").click();
510
511                 cy.get("main").contains(adminProject.name).rightclick();
512
513                 cy.get("[data-cy=context-menu]").contains("Freeze").should("not.exist");
514             });
515         });
516
517         it("should be able to unfroze project if user is an admin", () => {
518             cy.getAll("@adminProject").then(([adminProject]) => {
519                 cy.loginAs(adminUser);
520
521                 cy.get("main").contains(adminProject.name).rightclick();
522
523                 cy.get("[data-cy=context-menu]").contains("Freeze").click();
524
525                 cy.wait(1000);
526
527                 cy.get("main").contains(adminProject.name).rightclick();
528
529                 cy.get("[data-cy=context-menu]").contains("Unfreeze").click();
530
531                 cy.get("main").contains(adminProject.name).rightclick();
532
533                 cy.get("[data-cy=context-menu]").contains("Freeze").should("exist");
534             });
535         });
536     });
537
538     it("copies project URL to clipboard", () => {
539         const projectName = `Test project (${Math.floor(999999 * Math.random())})`;
540
541         cy.loginAs(activeUser);
542         cy.get("[data-cy=side-panel-button]").click();
543         cy.get("[data-cy=side-panel-new-project]").click();
544         cy.get("[data-cy=form-dialog]")
545             .should("contain", "New Project")
546             .within(() => {
547                 cy.get("[data-cy=name-field]").within(() => {
548                     cy.get("input").type(projectName);
549                 });
550                 cy.get("[data-cy=form-submit-btn]").click();
551             });
552         cy.get("[data-cy=form-dialog]").should("not.exist");
553         cy.get("[data-cy=side-panel-tree]").contains("Projects").click();
554         cy.get("[data-cy=project-panel]").contains(projectName).should("be.visible").rightclick();
555         cy.get("[data-cy=context-menu]").contains("Copy to clipboard").click();
556         cy.window().then(win =>
557             win.navigator.clipboard.readText().then(text => {
558                 expect(text).to.match(/https\:\/\/localhost\:[0-9]+\/projects\/[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{15}/);
559             })
560         );
561     });
562
563     it("sorts displayed items correctly", () => {
564         cy.loginAs(activeUser);
565
566         cy.get('[data-cy=project-panel] button[title="Select columns"]').click();
567         cy.get("div[role=presentation] ul > div[role=button]").contains("Date Created").click();
568         cy.get("div[role=presentation] ul > div[role=button]").contains("Trash at").click();
569         cy.get("div[role=presentation] ul > div[role=button]").contains("Delete at").click();
570         cy.get("div[role=presentation] > div[aria-hidden=true]").click();
571
572         cy.intercept({ method: "GET", url: "**/arvados/v1/groups/*/contents*" }).as("filteredQuery");
573         [
574             {
575                 name: "Name",
576                 asc: "collections.name asc,container_requests.name asc,groups.name asc",
577                 desc: "collections.name desc,container_requests.name desc,groups.name desc",
578             },
579             {
580                 name: "Last Modified",
581                 asc: "collections.modified_at asc,container_requests.modified_at asc,groups.modified_at asc",
582                 desc: "collections.modified_at desc,container_requests.modified_at desc,groups.modified_at desc",
583             },
584             {
585                 name: "Date Created",
586                 asc: "collections.created_at asc,container_requests.created_at asc,groups.created_at asc",
587                 desc: "collections.created_at desc,container_requests.created_at desc,groups.created_at desc",
588             },
589             {
590                 name: "Trash at",
591                 asc: "collections.trash_at asc,container_requests.trash_at asc,groups.trash_at asc",
592                 desc: "collections.trash_at desc,container_requests.trash_at desc,groups.trash_at desc",
593             },
594             {
595                 name: "Delete at",
596                 asc: "collections.delete_at asc,container_requests.delete_at asc,groups.delete_at asc",
597                 desc: "collections.delete_at desc,container_requests.delete_at desc,groups.delete_at desc",
598             },
599         ].forEach(test => {
600             cy.get("[data-cy=project-panel] table thead th").contains(test.name).click();
601             cy.wait("@filteredQuery").then(interception => {
602                 const searchParams = new URLSearchParams(new URL(interception.request.url).search);
603                 expect(searchParams.get("order")).to.eq(test.asc);
604             });
605             cy.get("[data-cy=project-panel] table thead th").contains(test.name).click();
606             cy.wait("@filteredQuery").then(interception => {
607                 const searchParams = new URLSearchParams(new URL(interception.request.url).search);
608                 expect(searchParams.get("order")).to.eq(test.desc);
609             });
610         });
611     });
612 });