diff --git a/cypress/e2e/clusters/cluster-filter.cy.js b/cypress/e2e/clusters/cluster-filter.cy.js index 68c5aef379..6441699e00 100644 --- a/cypress/e2e/clusters/cluster-filter.cy.js +++ b/cypress/e2e/clusters/cluster-filter.cy.js @@ -58,10 +58,17 @@ describe('Testing cluster filters', () => { () => { cy.get('.q-virtual-scroll__content > :nth-child(2)').click({ force: true, + multiple: true, }) cy.fixture('data').then((data) => { cy.get('tbody').children().should('contain', data.cluster2) }) } ) + it('Close all the clusters', () => { + cy.dataCy('cluster-btn-closeall').click() + cy.get('[data-test=Cluster').each(($row) => { + cy.wrap($row).should('have.class', 'q-expansion-item--collapsed') + }) + }) }) diff --git a/cypress/e2e/clusters/cluster-multiple-search.cy.js b/cypress/e2e/clusters/cluster-multiple-search.cy.js index 06f6f28859..497f4d789c 100644 --- a/cypress/e2e/clusters/cluster-multiple-search.cy.js +++ b/cypress/e2e/clusters/cluster-multiple-search.cy.js @@ -60,4 +60,10 @@ describe('Add multiple clusters and search', () => { cy.get('tbody').children().should('contain', data.cluster2) }) }) + it('Close all the clusters', () => { + cy.dataCy('cluster-btn-closeall').click() + cy.get('[data-test=Cluster').each(($row) => { + cy.wrap($row).should('have.class', 'q-expansion-item--collapsed') + }) + }) }) diff --git a/cypress/e2e/clusters/cluster-search.cy.js b/cypress/e2e/clusters/cluster-search.cy.js index 4591d0c4d9..402e4ac33f 100644 --- a/cypress/e2e/clusters/cluster-search.cy.js +++ b/cypress/e2e/clusters/cluster-search.cy.js @@ -41,4 +41,23 @@ describe('Testing cluster search', () => { cy.get('tbody').children().should('contain', data.cluster2) }) }) + it('check individual cluster closing and opening', () => { + cy.get('[data-test=Cluster').each(($row) => { + cy.wrap($row).should('have.class', 'q-expansion-item--expanded') + }) + cy.dataCy('cluster-general').children().children().eq(0).click() + cy.dataCy('cluster-general').should( + 'have.class', + 'q-expansion-item--collapsed' + ) + cy.dataCy('cluster-general').children().children().eq(0).click() + cy.dataCy('cluster-general').should( + 'have.class', + 'q-expansion-item--expanded' + ) + cy.dataCy('cluster-btn-closeall').click() + cy.get('[data-test=Cluster').each(($row) => { + cy.wrap($row).should('have.class', 'q-expansion-item--collapsed') + }) + }) }) diff --git a/src/components/ZclClusterManager.vue b/src/components/ZclClusterManager.vue index f9027b65c4..21be16d0d7 100644 --- a/src/components/ZclClusterManager.vue +++ b/src/components/ZclClusterManager.vue @@ -57,6 +57,7 @@ limitations under the License. dense @update:model-value="changeDomainFilter($event)" data-test="filter-input" + data-cy="cluster-domain-filter" /> @@ -70,6 +71,7 @@ limitations under the License. @clear="changeFilterString('')" :model-value="filterString" data-test="search-clusters" + data-cy="cluster-text-filter" >