X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a6b824e63de4df4296a17d74d80ff2101820762d..121165a587c43edfab0431aa1685dd8975a71e88:/cypress/integration/sharing.spec.js diff --git a/cypress/integration/sharing.spec.js b/cypress/integration/sharing.spec.js index c64f57fd20..f742d09062 100644 --- a/cypress/integration/sharing.spec.js +++ b/cypress/integration/sharing.spec.js @@ -77,7 +77,7 @@ describe('Sharing tests', function () { cy.get('[data-cy=invite-people-field]').find('input').type(activeUser.user.email); cy.get('[role=tooltip]').click(); cy.get('@sharingDialog').within(() => { - cy.contains('Save changes').click(); + cy.get('[data-cy=add-invited-people]').click(); cy.contains('Close').click(); }); }); @@ -95,7 +95,7 @@ describe('Sharing tests', function () { cy.get('[data-cy=invite-people-field]').find('input').type(activeUser.user.email); cy.get('[role=tooltip]').click(); cy.get('@sharingDialog').within(() => { - cy.contains('Save changes').click(); + cy.get('[data-cy=add-invited-people]').click(); cy.contains('Close').click(); }); }); @@ -106,6 +106,20 @@ describe('Sharing tests', function () { cy.contains('Shared with me').click(); + // Test search + cy.get('[data-cy=search-input] input').type('readonly'); + cy.get('main').should('not.contain', mySharedWritableProject.name); + cy.get('main').should('contain', mySharedReadonlyProject.name); + cy.get('[data-cy=search-input] input').clear(); + + // Test filter + cy.waitForDom().get('th').contains('Type').click(); + cy.get('div[role=presentation]').contains('Project').click(); + cy.waitForDom().get('main table tr td').contains('Project').should('not.exist'); + cy.get('div[role=presentation]').contains('Project').click(); + cy.waitForDom().get('div[role=presentation] button').contains('Close').click(); + + // Test move to trash cy.get('main').contains(mySharedWritableProject.name).rightclick(); cy.get('[data-cy=context-menu]').should('contain', 'Move to trash'); cy.get('[data-cy=context-menu]').contains('Move to trash').click(); @@ -153,12 +167,12 @@ describe('Sharing tests', function () { cy.loginAs(adminUser); cy.get('[data-cy=project-panel]').contains(collName).rightclick(); cy.get('[data-cy=context-menu]').contains('Share').click(); - cy.get('button').contains('Save changes').parent().should('be.disabled'); + cy.get('button').get('[data-cy=add-invited-people]').should('be.disabled'); cy.get('[data-cy=invite-people-field] input').type('Anonymous'); cy.get('div[role=tooltip]').contains('anonymous').click(); - cy.get('button').contains('Save changes').parent().should('not.be.disabled'); + cy.get('button').get('[data-cy=add-invited-people]').should('not.be.disabled'); cy.get('[data-cy=invite-people-field] div[role=button]').contains('anonymous').parent().find('svg').click(); - cy.get('button').contains('Save changes').parent().should('be.disabled'); + cy.get('button').get('[data-cy=add-invited-people]').should('be.disabled'); }); }); -}); \ No newline at end of file +});