diff --git a/cypress/integration/vault.spec.js b/cypress/integration/vault.spec.js --- a/cypress/integration/vault.spec.js +++ b/cypress/integration/vault.spec.js @@ -132,6 +132,9 @@ cy.contains('button', 'Download') .click(); + cy.contains('button', 'as tarball') + .click(); + // Check error alert is displayed cy.get('.alert-danger') .should('be.visible') @@ -157,6 +160,9 @@ cy.contains('button', 'Download') .click(); + cy.contains('button', 'as tarball') + .click(); + // Create a vault cooking task through the GUI cy.get('.modal-dialog') .contains('button:visible', 'Ok') @@ -229,6 +235,9 @@ cy.contains('button', 'Download') .click(); + cy.contains('button', 'as tarball') + .click(); + cy.window().then(win => { const swhIdsContext = win.swh.webapp.getSwhIdsContext(); const browseDirectoryUrl = swhIdsContext.directory.swhid_with_context_url; @@ -393,6 +402,9 @@ cy.contains('button', 'Download') .click(); + cy.contains('button', 'as tarball') + .click(); + // Create a vault cooking task through the GUI cy.get('.modal-dialog') .contains('button:visible', 'Ok') @@ -424,6 +436,9 @@ cy.contains('button', 'Download') .click(); + cy.contains('button', 'as tarball') + .click(); + cy.wait('@checkVaultCookingTask'); // Create a vault cooking task through the GUI and fill email input @@ -518,6 +533,9 @@ cy.contains('button', 'Download') .click(); + cy.contains('button', 'as tarball') + .click(); + // Start archive download through the GUI cy.get('.modal-dialog') .contains('button:visible', 'Ok') @@ -571,6 +589,9 @@ cy.contains('button', 'Download') .click(); + cy.contains('button', 'as tarball') + .click(); + // Check that recooking the directory is offered to user cy.get('.modal-dialog') .contains('button:visible', 'Ok') diff --git a/swh/web/templates/includes/vault-create-tasks.html b/swh/web/templates/includes/vault-create-tasks.html --- a/swh/web/templates/includes/vault-create-tasks.html +++ b/swh/web/templates/includes/vault-create-tasks.html @@ -8,33 +8,26 @@ {% load swh_templatetags %} {% if vault_cooking %} - {% if user.is_authenticated and user.is_staff or "swh.vault.git_bare.ui" in user.get_all_permissions %} -
- - -
- {% else %} - - {% endif %} + +