From 7699bd362f15543bc4495c7dbc0423f6dfc761d5 Mon Sep 17 00:00:00 2001 From: Dmitry Kruchinin <33020454+dvkruchinin@users.noreply.github.com> Date: Tue, 15 Jun 2021 08:12:04 +0300 Subject: [PATCH] Cypress. Case 44. Adding additional checks. (#3312) * Added classes * Test adaptation * Revert adding classes * Rework the test * Remove unnecessary comments --- .../case_44_changing_default_value_for_attribute.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/cypress/integration/actions_tasks3/case_44_changing_default_value_for_attribute.js b/tests/cypress/integration/actions_tasks3/case_44_changing_default_value_for_attribute.js index e1dde2c0..7f2860ab 100644 --- a/tests/cypress/integration/actions_tasks3/case_44_changing_default_value_for_attribute.js +++ b/tests/cypress/integration/actions_tasks3/case_44_changing_default_value_for_attribute.js @@ -38,6 +38,7 @@ context('Changing a default value for an attribute.', () => { cy.addNewLabel(additionalLabel, additionalAttrsLabel); cy.wait('@patchTask').its('response.statusCode').should('equal', 200); cy.wait('@getTask').its('response.statusCode').should('equal', 200); + cy.get('.cvat-constructor-viewer').should('exist').and('be.visible'); }); it('Open label editor. Change default values for text & checkbox attributes, press Done.', () => { @@ -45,11 +46,10 @@ context('Changing a default value for an attribute.', () => { cy.get('.cvat-constructor-viewer').within(() => { cy.contains(new RegExp(`^${additionalLabel}$`)) .parents('.cvat-constructor-viewer-item') + .should('be.visible') .find('[aria-label="edit"]') .should('be.visible') - .then((e) => { - cy.get(e).click(); - }); + .click(); }); cy.get('.cvat-label-constructor-updater').within(() => { @@ -74,6 +74,7 @@ context('Changing a default value for an attribute.', () => { )}.values'`, ).should('not.exist'); cy.wait('@patchTask').its('response.statusCode').should('equal', 200); + cy.get('.cvat-constructor-viewer').should('exist').and('be.visible'); }); it('Open a job, create an object. Attribute values are correct.', () => {