From c44924f4f08c56db1cba40c7975322144a0a42f3 Mon Sep 17 00:00:00 2001 From: aspecter Date: Wed, 18 Jan 2023 22:24:15 +0100 Subject: [PATCH] Fix dimmable light test. (#889) --- .../clusters/dimmable-light.spec.js | 78 +++++++++---------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/cypress/integration/clusters/dimmable-light.spec.js b/cypress/integration/clusters/dimmable-light.spec.js index 439de28a44..1b279c3547 100644 --- a/cypress/integration/clusters/dimmable-light.spec.js +++ b/cypress/integration/clusters/dimmable-light.spec.js @@ -5,47 +5,47 @@ Cypress.on('uncaught:exception', (err, runnable) => { return false }) -describe('Testing Dimmable Light workflow', () => { - it('create a Dimmable Light endpoint', () => { - cy.fixture('baseurl').then((data) => { - cy.visit(data.baseurl) +describe( + 'Testing Dimmable Light workflow', + { defaultCommandTimeout: 6000, retries: { runMode: 2, openMode: 2 } }, + () => { + it('create a Dimmable Light endpoint', () => { + cy.fixture('baseurl').then((data) => { + cy.visit(data.baseurl) + }) + cy.setZclProperties() + cy.get('[data-test="add-new-endpoint"]').click() + cy.fixture('data').then((data) => { + cy.get('[data-test="select-endpoint-input"]') + .click() + .clear({ force: true }) + .type('dimmable', { force: true }) + cy.get('div').contains(data.endpoint6).click({ force: true }) + }) + cy.get('button').contains('Create').click() }) - cy.setZclProperties() - cy.get('[data-test="add-new-endpoint"]').click() - cy.fixture('data').then((data) => { - cy.get( - '[data-test="select-endpoint-input"]' - ) - .click() - .clear({ force: true }) - .type('dimmable', { force: true }) - cy.get('div').contains(data.endpoint6).click({ force: true }) + it('Search for the cluster', () => { + cy.fixture('data').then((data) => { + cy.get('[data-test="search-clusters"]') + .clear({ force: true }) + .type(data.cluster4) + }) }) - cy.get('button').contains('Create').click() - }) - it('Search for the cluster', () => { - cy.fixture('data').then((data) => { + it('Enabling Client & Server', () => { cy.get( - '[data-test="search-clusters"]' - ) - .clear({ force: true }) - .type(data.cluster4) - }) - }) - it('Enabling Client & Server', () => { - cy.get( - ':nth-child(6) > .q-field > .q-field__inner > .q-field__control' - ).click({ force: true }) - cy.fixture('data').then((data) => { - cy.get('.q-item__section > .q-item__label').contains(data.server2).click() + ':nth-child(6) > .q-field > .q-field__inner > .q-field__control' + ).click({ force: true }) + cy.fixture('data').then((data) => { + cy.get('.q-menu').contains(data.server2).click() + }) }) - }) - it('Check Configuration page', () => { - cy.get( - ':nth-child(7) > .q-btn > .q-btn__wrapper > .q-btn__content > .notranslate' - ).click({ force: true }) - cy.fixture('data').then((data) => { - cy.get('tr.table_body').contains(data.attribute3).should('be.visible') + it('Check Configuration page', () => { + cy.get( + ':nth-child(7) > .q-btn > .q-btn__wrapper > .q-btn__content > .notranslate' + ).click({ force: true }) + cy.fixture('data').then((data) => { + cy.get('tr.table_body').contains(data.attribute3).should('be.visible') + }) }) - }) -}) + } +)