cy.clearLocalStorage();
});
- it.only('allows to download mountain duck config for a collection', () => {
+ it('allows to download mountain duck config for a collection', () => {
cy.createCollection(adminUser.token, {
name: `Test collection ${Math.floor(Math.random() * 999999)}`,
owner_uuid: activeUser.user.uuid,
cy.get('[data-cy=context-menu]').contains('Open as network folder or S3 bucket').click();
cy.get('[data-cy=download-button').click();
- const filename = path.resolve(path.join(downloadsFolder, `${testCollection.name}.duck`));
+ const filename = path.join(downloadsFolder, `${testCollection.name}.duck`);
cy.readFile(filename, { timeout: 15000 })
.then((body) => {
expect(map['Username']).to.equal(activeUser.user.username);
expect(map['Port']).to.equal(port);
expect(map['Hostname']).to.equal(host);
+ if (map['Path']) {
+ expect(map['Path']).to.equal(`/c=${testCollection.uuid}`);
+ }
});
})
.then(() => cy.task('clearDownload', { filename }));
})
.as('testCollection').then(function () {
cy.loginAs(activeUser);
- cy.doSearch(`${this.testCollection.uuid}`);
+ cy.goToPath(`/collections/${this.testCollection.uuid}`);
// Key: Color (IDTAGCOLORS) - Value: Magenta (IDVALCOLORS3)
cy.get('[data-cy=resource-properties-form]').within(() => {
head_uuid: this.sharedGroup.uuid,
tail_uuid: activeUser.user.uuid
})
- cy.doSearch(`${this.testCollection.uuid}`);
+ cy.goToPath(`/collections/${this.testCollection.uuid}`);
// Check that name & uuid are correct.
cy.get('[data-cy=collection-info-panel]')
})
.as('testCollection').then(function () {
cy.loginAs(activeUser);
- cy.doSearch(`${this.testCollection.uuid}`);
+ cy.goToPath(`/collections/${this.testCollection.uuid}`);
const names = [
'bar', // initial name already set
})
.as('testCollection').then(function () {
cy.loginAs(activeUser);
- cy.doSearch(`${this.testCollection.uuid}`);
+ cy.goToPath(`/collections/${this.testCollection.uuid}`);
['subdir', 'G%C3%BCnter\'s%20file', 'table%&?*2'].forEach((subdir) => {
cy.get('[data-cy=collection-files-panel]')
})
.as('testCollection').then(function () {
cy.loginAs(activeUser);
- cy.doSearch(`${this.testCollection.uuid}`);
+ cy.goToPath(`/collections/${this.testCollection.uuid}`);
const illegalNamesFromUI = [
['.', "Name cannot be '.' or '..'"],
});
// Check the old version displays as what it is.
cy.loginAs(activeUser)
- cy.doSearch(`${oldVersionUuid}`);
+ cy.goToPath(`/collections/${oldVersionUuid}`);
cy.get('[data-cy=collection-info-panel]').should('contain', 'This is an old version');
cy.get('[data-cy=read-only-icon]').should('exist');
.as('collection').then(function () {
// Visit collection, check basic information
cy.loginAs(activeUser)
- cy.doSearch(`${this.collection.uuid}`);
+ cy.goToPath(`/collections/${this.collection.uuid}`);
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');
it('creates new collection on home project', function () {
cy.loginAs(activeUser);
- cy.doSearch(`${activeUser.user.uuid}`);
+ cy.goToPath(`/projects/${activeUser.user.uuid}`);
cy.get('[data-cy=breadcrumb-first]').should('contain', 'Projects');
cy.get('[data-cy=breadcrumb-last]').should('not.exist');
// Create new collection