1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 describe('Collection details panel', () => {
9 cy.getUser("active", "Active", "User", true, true)
16 it('displays appropriate attributes when a collection is selected', () => {
17 cy.loginAs(adminUser);
19 // Create a test collection
20 const collectionName = `Test Collection ${Math.floor(Math.random() * 999999)}`;
21 cy.createCollection(adminUser.token, {
23 owner_uuid: adminUser.user.uuid,
24 manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:foo\n",
25 }).as('testCollection');
27 // Navigate to the project containing the collection
28 cy.get('@testCollection').then((collection) => {
29 cy.visit(`/projects/${adminUser.user.uuid}`);
31 // Wait for the data table to load
32 cy.get('[data-cy=data-table]').should('be.visible');
34 // Find and check the checkbox for the test collection
35 cy.contains('[data-cy=data-table-row]', collectionName)
36 .find('input[type="checkbox"]')
39 // Open the details panel
40 cy.get('[data-cy=details-panel]').should('not.exist');
41 cy.get('[data-testid=InfoIcon]').click();
42 cy.get('[data-cy=details-panel]').should('be.visible');
44 // Check if appropriate attributes are displayed
45 cy.get('[data-cy=details-panel]').within(() => {
46 cy.contains('Collection UUID').should('be.visible');
47 cy.contains('Portable data hash').should('be.visible');
48 cy.contains('Owner').should('be.visible');
49 cy.contains('Created at').should('be.visible');
50 cy.contains('Last modified').should('be.visible');
51 cy.contains('Content size').should('be.visible');
52 cy.contains('Number of files').should('be.visible');
53 cy.contains('Properties').should('be.visible');
56 // Verify specific collection details
57 cy.get('[data-cy=details-panel]').within(() => {
58 cy.contains(collection.uuid).should('be.visible');
59 cy.contains(collection.portable_data_hash).should('be.visible');
60 cy.contains(adminUser.user.uuid).should('be.visible');
61 cy.contains('1').should('be.visible'); // Number of files
62 cy.contains('3 B').should('be.visible'); // Content size