Changeset View
Changeset View
Standalone View
Standalone View
cypress/integration/vault.spec.js
Show First 20 Lines • Show All 398 Lines • ▼ Show 20 Lines | it('should offer to immediately download a revision gitfast archive if already cooked', function() { | ||||
cy.get('.modal-dialog') | cy.get('.modal-dialog') | ||||
.contains('button:visible', 'Ok') | .contains('button:visible', 'Ok') | ||||
.click(); | .click(); | ||||
cy.wait('@fetchCookedArchive'); | cy.wait('@fetchCookedArchive'); | ||||
}); | }); | ||||
it('should offer to recook an object if previous vault task failed', function() { | |||||
cy.visit(this.directoryUrl); | |||||
// Stub responses when requesting the vault API to simulate | |||||
// the last cooking of the directory tarball has failed | |||||
cy.route({ | |||||
method: 'GET', | |||||
url: this.vaultDirectoryUrl, | |||||
response: this.genVaultDirCookingResponse('failed') | |||||
}).as('checkVaultCookingTask'); | |||||
checkVaultCookingTask('as tarball'); | |||||
// Check that recooking the directory is offered to user | |||||
cy.get('.modal-dialog') | |||||
.contains('button:visible', 'Ok') | |||||
.should('be.visible'); | |||||
}); | |||||
}); | }); |