17098: Updates integration test for the 'recover version' operation.
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Wed, 25 Nov 2020 16:25:17 +0000 (13:25 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Wed, 25 Nov 2020 16:25:17 +0000 (13:25 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>

cypress/integration/collection-panel.spec.js

index 0a127db7ad26823a4a6ebc8bc33ba2bb71f83583..59b80e677035db8af48525fe1d8b4ef05cbe27a6 100644 (file)
@@ -393,6 +393,19 @@ describe('Collection panel tests', function() {
                 .should('not.contain', 'foo').and('contain', 'bar');
             cy.get('[data-cy=collection-version-browser-select-3]')
                 .should('contain', '3').and('contain', '3 B');
+
+            // Recover first version
+            cy.get('[data-cy=collection-version-browser]').within(() => {
+                cy.get('[data-cy=collection-version-browser-select-1]').click();
+            });
+            cy.get('[data-cy=collection-panel-options-btn]').click()
+            cy.get('[data-cy=context-menu]').contains('Recover version').click();
+            cy.get('[data-cy=collection-info-panel]')
+                .should('not.contain', 'This is an old version');
+            cy.get('[data-cy=collection-version-number]').should('contain', '4');
+            cy.get('[data-cy=collection-info-panel]').should('contain', colName);
+            cy.get('[data-cy=collection-files-panel]')
+                .should('contain', 'foo').and('contain', 'bar');
         });
     });
 })