- it('creates new collection on home project', function() {
- cy.loginAs(activeUser);
- cy.visit(`/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
- cy.get('[data-cy=side-panel-button]').click();
- cy.get('[data-cy=side-panel-new-collection]').click();
- const collName = `Test collection (${Math.floor(999999 * Math.random())})`;
- cy.get('[data-cy=form-dialog]')
- .should('contain', 'New collection')
- .within(() => {
- cy.get('[data-cy=parent-field]').within(() => {
- cy.get('input').should('have.value', 'Home project');
- })
- cy.get('[data-cy=name-field]').within(() => {
- cy.get('input').type(collName);
- })
- })
- cy.get('[data-cy=form-submit-btn]').click();
- // Confirm that the user was taken to the newly created thing
- cy.get('[data-cy=form-dialog]').should('not.exist');
- cy.get('[data-cy=breadcrumb-first]').should('contain', 'Projects');
- cy.get('[data-cy=breadcrumb-last]').should('contain', collName);
+ it('disables the +NEW side panel button when viewing filter group', function() {
+ cy.loginAs(adminUser);
+ cy.createGroup(adminUser.token, {
+ name: `my-favorite-filter-group`,
+ group_class: 'filter',
+ properties: {filters: []},
+ }).as('myFavoriteFilterGroup').then(function (myFavoriteFilterGroup) {
+ cy.contains('Refresh').click();
+ cy.goToPath(`/projects/${myFavoriteFilterGroup.uuid}`);
+ cy.get('[data-cy=breadcrumb-last]').should('contain', 'my-favorite-filter-group');
+
+ cy.get('[data-cy=side-panel-button]')
+ .should('exist')
+ .and(`be.disabled`);
+ })