X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/095e176632bbf81d28a239742a1ecce12404bd2d..9f1850a385ee8e0a011474de19ee6507b0b168f3:/services/workbench2/cypress/integration/collection.spec.js diff --git a/services/workbench2/cypress/integration/collection.spec.js b/services/workbench2/cypress/integration/collection.spec.js index f83a974193..54c570f7c4 100644 --- a/services/workbench2/cypress/integration/collection.spec.js +++ b/services/workbench2/cypress/integration/collection.spec.js @@ -32,6 +32,45 @@ describe("Collection panel tests", function () { cy.clearLocalStorage(); }); + it('shows the appropriate buttons in the toolbar', () => { + + const msButtonTooltips = [ + 'API Details', + 'Add to Favorites', + 'Copy to clipboard', + 'Edit collection', + 'Make a copy', + 'Move to', + 'Move to trash', + 'Open in new tab', + 'Open with 3rd party client', + 'Share', + 'View details', + ]; + + cy.loginAs(activeUser); + const name = `Test collection ${Math.floor(Math.random() * 999999)}`; + cy.get("[data-cy=side-panel-button]").click({force: true}); + cy.get("[data-cy=side-panel-new-collection]").click(); + cy.get("[data-cy=form-dialog]") + .should("contain", "New collection") + .within(() => { + cy.get("[data-cy=name-field]").within(() => { + cy.get("input").type(name); + }); + cy.get("[data-cy=form-submit-btn]").click(); + }); + cy.get("[data-cy=side-panel-tree]").contains("Home Projects").click(); + cy.waitForDom() + cy.get('[data-cy=data-table-row]').contains(name).should('exist').parent().parent().parent().parent().click() + cy.get('[data-cy=multiselect-button]').should('have.length', msButtonTooltips.length) + for (let i = 0; i < msButtonTooltips.length; i++) { + cy.get('[data-cy=multiselect-button]').eq(i).trigger('mouseover'); + cy.get('body').contains(msButtonTooltips[i]).should('exist') + cy.get('[data-cy=multiselect-button]').eq(i).trigger('mouseout'); + } + }) + it("allows to download mountain duck config for a collection", () => { cy.createCollection(adminUser.token, { name: `Test collection ${Math.floor(Math.random() * 999999)}`, @@ -125,6 +164,8 @@ describe("Collection panel tests", function () { cy.get("[data-cy=form-dialog]").should("exist").and("contain", "Collection with the same name already exists"); }); + + it("uses the property editor (from edit dialog) with vocabulary terms", function () { cy.createCollection(adminUser.token, { name: `Test collection ${Math.floor(Math.random() * 999999)}`, @@ -168,6 +209,8 @@ describe("Collection panel tests", function () { }); }); + + it("uses the editor (from details panel) with vocabulary terms", function () { cy.createCollection(adminUser.token, { name: `Test collection ${Math.floor(Math.random() * 999999)}`,