18594: Added cypress test to show that username in advanced metadata is loaded
[arvados-workbench2.git] / cypress / integration / project.spec.js
index 3678b78a349268326fe96841c41dc453cce0d6c2..f369330e577090011ffc222837fe4ca214a8904a 100644 (file)
@@ -34,7 +34,7 @@ describe('Project tests', function() {
         cy.get('[data-cy=side-panel-button]').click();
         cy.get('[data-cy=side-panel-new-project]').click();
         cy.get('[data-cy=form-dialog]')
-            .should('contain', 'New project')
+            .should('contain', 'New Project')
             .within(() => {
                 cy.get('[data-cy=name-field]').within(() => {
                     cy.get('input').type(projName);
@@ -74,7 +74,7 @@ describe('Project tests', function() {
             cy.get('[data-cy=side-panel-button]').click();
             cy.get('[data-cy=side-panel-new-project]').click();
             cy.get('[data-cy=form-dialog]')
-                .should('contain', 'New project')
+                .should('contain', 'New Project')
                 .within(() => {
                     cy.get('[data-cy=parent-field]').within(() => {
                         cy.get('input').invoke('val').then((val) => {
@@ -214,4 +214,31 @@ describe('Project tests', function() {
             cy.get('[data-cy=search-input] input').should('not.have.value', 'test123');
         });
     });
+
+    it('opens advanced popup for project with username', () => {
+        const projectName = `Test root project ${Math.floor(Math.random() * 999999)}`;
+
+        cy.createProject({
+            owningUser: adminUser,
+            targetUser: activeUser,
+            projectName,
+            canWrite: true,
+            addToFavorites: true
+        }).as('mySharedProject');
+
+        cy.getAll('@mySharedProject')
+            .then(function ([mySharedProject]) {
+                cy.loginAs(activeUser);
+                
+                cy.get('[data-cy=side-panel-tree]').contains('Shared with me').click();
+
+                cy.get('main').contains(projectName).rightclick();
+
+                cy.get('[data-cy=context-menu]').contains('Advanced').click();
+
+                cy.get('[role=tablist]').contains('METADATA').click();
+
+                cy.get('td').contains('User: Active User').should('exist');
+        });
+    });
 });
\ No newline at end of file