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