});
beforeEach(function () {
- cy.clearCookies();
- cy.clearLocalStorage();
-
cy.on('uncaught:exception', (err, runnable, promise) => {
Cypress.log({ message: `Application Error: ${err}`});
if (promise) {
downloadsFolder = Cypress.config("downloadsFolder");
});
- beforeEach(function () {
- cy.clearCookies();
- cy.clearLocalStorage();
- });
-
it('shows the appropriate buttons in the toolbar', () => {
const msButtonTooltips = [
);
});
- beforeEach(function () {
- cy.clearCookies();
- cy.clearLocalStorage();
- });
-
it('can create project with nested data', function () {
cy.createGroup(adminUser.token, {
group_class: "project",
);
});
- beforeEach(function () {
- cy.clearCookies();
- cy.clearLocalStorage();
- });
-
it('deletes all files from root dir', function () {
cy.createCollection(adminUser.token, {
name: `Test collection ${Math.floor(Math.random() * 999999)}`,
});
});
- beforeEach(function () {
- cy.clearCookies()
- cy.clearLocalStorage()
- });
-
it('creates and removes a public favorite', function () {
cy.loginAs(adminUser);
randomUser.password = 'topsecret';
})
- beforeEach(function() {
- cy.clearCookies()
- cy.clearLocalStorage()
- })
-
it('shows login page on first visit', function() {
cy.visit('/')
cy.get('div#root').should('contain', 'Please log in')
});
});
- beforeEach(function () {
- cy.clearCookies();
- cy.clearLocalStorage();
- });
-
it('exists in DOM in neutral state', () => {
cy.loginAs(activeUser);
cy.get('[data-cy=multiselect-toolbar]').should('exist');
);
});
- beforeEach(function() {
- cy.clearCookies()
- cy.clearLocalStorage()
- });
-
it('shows not found page', function() {
// when
cy.loginAs(adminUser);
});
});
- beforeEach(function () {
- cy.clearCookies();
- cy.clearLocalStorage();
- });
-
function setupDockerImage(image_name) {
// Create a collection that will be used as a docker image for the tests.
cy.createCollection(adminUser.token, {
});
});
- beforeEach(function () {
- cy.clearCookies();
- cy.clearLocalStorage();
- });
-
it("creates a new project with multiple properties", function () {
const projName = `Test project (${Math.floor(999999 * Math.random())})`;
cy.loginAs(activeUser);
});
});
- beforeEach(function () {
- cy.clearCookies();
- cy.clearLocalStorage();
- });
-
it("can search for old collection versions", function () {
const colName = `Versioned Collection ${Math.floor(Math.random() * Math.floor(999999))}`;
let colUuid = "";
});
})
- beforeEach(function () {
- cy.clearCookies()
- cy.clearLocalStorage()
- });
-
it('can create and delete sharing URLs on collections', () => {
const collName = 'shared-collection ' + new Date().getTime();
cy.createCollection(adminUser.token, {
);
})
- beforeEach(function() {
- cy.clearCookies()
- cy.clearLocalStorage()
- })
-
it('enables the +NEW side panel button on users home project', function() {
cy.loginAs(activeUser);
cy.get('[data-cy=side-panel-button]')
});
Cypress.Commands.add("loginAs", user => {
+ // This shouldn't be necessary unless we need to call loginAs multiple times
+ // in the same test.
cy.clearCookies();
- cy.clearLocalStorage();
+ cy.clearAllLocalStorage();
+ cy.clearAllSessionStorage();
cy.visit(`/token/?api_token=${user.token}`);
// Use waitUntil to avoid permafail race conditions with window.location being undefined
cy.waitUntil(() => cy.window().then(win =>