tail_uuid: activeUser.user.uuid
})
cy.visit(`/collections/${this.testCollection.uuid}`);
- // Check that name & uuid are correct.
+
+ cy.get('[data-cy=linear-progress]').should('exist');
cy.get('[data-cy=linear-progress]').should('not.exist');
+
+ // Check that name & uuid are correct.
cy.get('[data-cy=collection-info-panel]')
.should('contain', this.testCollection.name)
.and('contain', this.testCollection.uuid)
.as('testCollection').then(function() {
cy.loginAs(activeUser);
cy.visit(`/collections/${this.testCollection.uuid}`);
+
+ cy.get('[data-cy=linear-progress]').should('exist');
+ cy.get('[data-cy=linear-progress]').should('not.exist');
+
const nameTransitions = [
['bar', '&'],
['&', 'foo'],
['I ❤️ ⛵️', '...']
];
nameTransitions.forEach(([from, to]) => {
- cy.get('[data-cy=linear-progress]').should('not.exist');
cy.get('[data-cy=collection-files-panel]')
.contains(`${from}`).rightclick();
cy.get('[data-cy=context-menu]')
.as('testCollection').then(function() {
cy.loginAs(activeUser);
cy.visit(`/collections/${this.testCollection.uuid}`);
- // Rename 'bar' to 'subdir/foo'
+
+ cy.get('[data-cy=linear-progress]').should('exist');
cy.get('[data-cy=linear-progress]').should('not.exist');
+
+ // Rename 'bar' to 'subdir/foo'
cy.get('[data-cy=collection-files-panel]')
.contains('bar').rightclick();
cy.get('[data-cy=context-menu]')
});
});
- it('tries to rename a file with an illegal names', function() {
+ it('tries to rename a file with illegal names', function() {
// Creates the collection using the admin token so we can set up
// a bogus manifest text without block signatures.
cy.createCollection(adminUser.token, {
.as('testCollection').then(function() {
cy.loginAs(activeUser);
cy.visit(`/collections/${this.testCollection.uuid}`);
+
+ cy.get('[data-cy=linear-progress]').should('exist');
+ cy.get('[data-cy=linear-progress]').should('not.exist');
+
const illegalNamesFromUI = [
['.', "Name cannot be '.' or '..'"],
['..', "Name cannot be '.' or '..'"],
['//foo', 'Empty dir name not allowed']
]
illegalNamesFromUI.forEach(([name, errMsg]) => {
- cy.get('[data-cy=linear-progress]').should('not.exist');
cy.get('[data-cy=collection-files-panel]')
.contains('bar').rightclick();
cy.get('[data-cy=context-menu]')
// Check the old version displays as what it is.
cy.loginAs(activeUser)
cy.visit(`/collections/${oldVersionUuid}`);
+
+ cy.get('[data-cy=linear-progress]').should('exist');
+ cy.get('[data-cy=linear-progress]').should('not.exist');
+
cy.get('[data-cy=collection-info-panel]').should('contain', 'This is an old version');
cy.get('[data-cy=read-only-icon]').should('exist');
cy.get('[data-cy=collection-info-panel]').should('contain', colName);
// Visit collection, check basic information
cy.loginAs(activeUser)
cy.visit(`/collections/${this.collection.uuid}`);
+
+ cy.get('[data-cy=linear-progress]').should('exist');
+ cy.get('[data-cy=linear-progress]').should('not.exist');
+
cy.get('[data-cy=collection-info-panel]').should('not.contain', 'This is an old version');
cy.get('[data-cy=read-only-icon]').should('not.exist');
cy.get('[data-cy=collection-version-number]').should('contain', '1');
//
// SPDX-License-Identifier: AGPL-3.0
-describe('Collection panel tests', function () {
+describe('Multi-file deletion tests', function () {
let activeUser;
let adminUser;
.as('testCollection').then(function () {
cy.loginAs(activeUser);
cy.visit(`/collections/${this.testCollection.uuid}`);
+
+ cy.get('[data-cy=linear-progress]').should('exist');
+ cy.get('[data-cy=linear-progress]').should('not.exist');
+
cy.get('[data-cy=collection-files-panel]').within(() => {
cy.get('[type="checkbox"]').first().check();
cy.get('[type="checkbox"]').last().check();
cy.loginAs(activeUser);
cy.visit(`/collections/${this.testCollection.uuid}`);
+ cy.get('[data-cy=linear-progress]').should('exist');
+ cy.get('[data-cy=linear-progress]').should('not.exist');
+
cy.get('[data-cy=virtual-file-tree] > div > i').first().click();
cy.get('[data-cy=collection-files-panel]')
.should('contain', 'foo');