Merge branch '20882-fix-priority' refs #20882
[arvados-workbench2.git] / cypress / integration / project.spec.js
index f58cf7feb7f846136675200eb65386c12ee07515..fd14cc4226323b331a22c09ea35724748a07f6b7 100644 (file)
@@ -135,6 +135,7 @@ describe('Project tests', function() {
                 });
             });
         cy.get('[data-cy=form-submit-btn]').click();
+        cy.get('[data-cy=form-dialog]').should('not.exist');
 
         const editProjectDescription = (name, type) => {
             cy.get('[data-cy=side-panel-tree]').contains('Home Projects').click();
@@ -163,20 +164,20 @@ describe('Project tests', function() {
         editProjectDescription(projName, 'Test description');
 
         // Check description is set
-        verifyProjectDescription("<p>Test description</p>");
+        verifyProjectDescription(projName, "<p>Test description</p>");
 
         // Clear description
         editProjectDescription(projName, '{selectall}{backspace}');
 
         // Check description is null
-        verifyProjectDescription(null);
+        verifyProjectDescription(projName, null);
 
         // Set description to contain whitespace
         editProjectDescription(projName, '{selectall}{backspace}    x');
         editProjectDescription(projName, '{backspace}');
 
         // Check description is null
-        verifyProjectDescription(null);
+        verifyProjectDescription(projName, null);
 
     });
 
@@ -544,13 +545,16 @@ describe('Project tests', function() {
                 });
                 cy.get('[data-cy=form-submit-btn]').click();
             });
-
+        cy.get('[data-cy=form-dialog]').should("not.exist");
+        cy.get('[data-cy=snackbar]').contains('created');
+        cy.get('[data-cy=snackbar]').should("not.exist");
         cy.get('[data-cy=side-panel-tree]').contains('Projects').click();
-        cy.get('[data-cy=project-panel]').contains(projectName).rightclick();
+        cy.waitForDom();
+        cy.get('[data-cy=project-panel]').contains(projectName).should('be.visible').rightclick();
         cy.get('[data-cy=context-menu]').contains('Copy to clipboard').click();
         cy.window().then((win) => (
             win.navigator.clipboard.readText().then((text) => {
-                expect(text).to.match(/https\:\/\/localhost\:[0-9]+\/projects\/[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{15}/,);
+                expect(text).to.match(/https\:\/\/127\.0\.0\.1\:[0-9]+\/projects\/[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{15}/,);
             })
         ));