|
| 1 | +import { pathWithQueryParams } from '../../../src/services/query-string-builder' |
| 2 | + |
| 3 | +describe('Drawer menu icons', () => { |
| 4 | + beforeEach(() => { |
| 5 | + cy.login() |
| 6 | + cy.visit(pathWithQueryParams({ path: '/', newParams: { repoUrl: Cypress.env('repoUrl') } })) |
| 7 | + }) |
| 8 | + |
| 9 | + it('clicking on the Search icon on the drawer should open the Search page', () => { |
| 10 | + cy.get('[data-test="Search"]').as('searchIcon') |
| 11 | + cy.get('@searchIcon').should('not.have.class', 'Mui-selected') |
| 12 | + cy.get('@searchIcon').click() |
| 13 | + cy.get('@searchIcon').should('have.class', 'Mui-selected') |
| 14 | + }) |
| 15 | + |
| 16 | + it('clicking on the content icon on the drawer should open the Content page', () => { |
| 17 | + cy.get('[data-test="Content"]').as('contentIcon') |
| 18 | + cy.get('@contentIcon').should('not.have.class', 'Mui-selected') |
| 19 | + cy.get('@contentIcon').click() |
| 20 | + cy.get('@contentIcon').should('have.class', 'Mui-selected') |
| 21 | + }) |
| 22 | + |
| 23 | + it('clicking on the Users and groups icon on the drawer should open the Users and groups page', () => { |
| 24 | + cy.get('[data-test="Users and groups"]').as('UsersAndGroupsIcon') |
| 25 | + cy.get('@UsersAndGroupsIcon').should('not.have.class', 'Mui-selected') |
| 26 | + cy.get('@UsersAndGroupsIcon').click() |
| 27 | + cy.get('@UsersAndGroupsIcon').should('have.class', 'Mui-selected') |
| 28 | + }) |
| 29 | + |
| 30 | + it('clicking on the Trash icon on the drawer should open the Trash page', () => { |
| 31 | + cy.get('[data-test="Trash"]').as('trashIcon') |
| 32 | + cy.get('@trashIcon').should('not.have.class', 'Mui-selected') |
| 33 | + cy.get('@trashIcon').click() |
| 34 | + cy.get('@trashIcon').should('have.class', 'Mui-selected') |
| 35 | + }) |
| 36 | + |
| 37 | + it('clicking on the Content Types icon on the drawer should open the Content Types page', () => { |
| 38 | + cy.get('[data-test="Content Types"]').as('contentTypesIcon') |
| 39 | + cy.get('@contentTypesIcon').should('not.have.class', 'Mui-selected') |
| 40 | + cy.get('@contentTypesIcon').click() |
| 41 | + cy.get('@contentTypesIcon').should('have.class', 'Mui-selected') |
| 42 | + }) |
| 43 | + |
| 44 | + it('clicking on the Localization icon on the drawer should open the Localization page', () => { |
| 45 | + cy.get('[data-test="Localization"]').as('localizationIcon') |
| 46 | + cy.get('@localizationIcon').should('not.have.class', 'Mui-selected') |
| 47 | + cy.get('@localizationIcon').click() |
| 48 | + cy.get('@localizationIcon').should('have.class', 'Mui-selected') |
| 49 | + }) |
| 50 | + |
| 51 | + it('clicking on the Setup icon on the drawer should open the Setup page', () => { |
| 52 | + cy.get('[data-test="Setup"]').as('setupIcon') |
| 53 | + cy.get('@setupIcon').should('not.have.class', 'Mui-selected') |
| 54 | + cy.get('@setupIcon').click() |
| 55 | + cy.get('@setupIcon').should('have.class', 'Mui-selected') |
| 56 | + }) |
| 57 | +}) |
0 commit comments