Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163717
D2063.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D2063.id.diff
View Options
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
@@ -28,6 +28,15 @@
.click();
}
+function updateVaultItemList(vaultUrl, vaultItems) {
+ cy.visit(vaultUrl)
+ .then(() => {
+ // Add uncooked task to localStorage
+ // which updates it in vault items list
+ window.localStorage.setItem('swh-vault-cooking-tasks', JSON.stringify(vaultItems));
+ });
+}
+
// Mocks API response : /api/1/vault/(:objectType)/(:hash)
// objectType : {'directory', 'revision'}
function genVaultCookingResponse(objectType, objectId, status, message, fetchUrl) {
@@ -243,12 +252,8 @@
});
it('should offer to recook an archive if no more available to download', function() {
- cy.visit(this.Urls.browse_vault())
- .then(() => {
- // Add uncooked task to localStorage
- // which updates it in vault items list
- window.localStorage.setItem('swh-vault-cooking-tasks', JSON.stringify(vaultItems));
- });
+
+ updateVaultItemList(this.Urls.browse_vault(), vaultItems);
// Send 404 when fetching vault item
cy.route({
@@ -293,4 +298,17 @@
});
});
+ it('should remove selected vault items', function() {
+
+ updateVaultItemList(this.Urls.browse_vault(), vaultItems);
+
+ cy.get(`#vault-task-${this.revision}`)
+ .find('input[type="checkbox"]')
+ .click();
+ cy.contains('button', 'Remove selected tasks')
+ .click();
+
+ cy.get(`#vault-task-${this.revision}`)
+ .should('not.exist');
+ });
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 30, 1:57 PM (1 w, 12 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219592
Attached To
D2063: cypress: Vault item removal test
Event Timeline
Log In to Comment