From 627562fe09351a4cc36135dd9cbdb34e0988fd35 Mon Sep 17 00:00:00 2001 From: Kruchinin Date: Tue, 1 Dec 2020 08:04:12 +0300 Subject: [PATCH] Apply comments. --- .../case_23_canvas_grid_feature.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/cypress/integration/actions_tasks_objects/case_23_canvas_grid_feature.js b/tests/cypress/integration/actions_tasks_objects/case_23_canvas_grid_feature.js index fe17bf02..61863a37 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_23_canvas_grid_feature.js +++ b/tests/cypress/integration/actions_tasks_objects/case_23_canvas_grid_feature.js @@ -43,11 +43,18 @@ context('Canvas grid feature', () => { }); }); it('Canvas has grid drawn, it is black, cells are 50x50px and it has 49% opacity.', () => { - cy.get('#cvat_canvas_grid_pattern') - .should('exist') // expected to exist in the DOM - .and('have.attr', 'width', settingsGridSize) // expected to have attribute width with the value '50' - .and('have.attr', 'height', settingsGridSize) // expected to have attribute height with the value '50' - .and('have.attr', 'style', `stroke: ${gridColor.toLowerCase()}; opacity: ${gridOpacity / 100};`); // expected to have attribute style with the value stroke: black; opacity: 0.49; + cy.get('#cvat_canvas_grid') + .should('be.visible') // expected to be visible + .within(() => { + cy.get('#cvat_canvas_grid_pattern') + .and('have.attr', 'width', settingsGridSize) // expected to have attribute width with the value '50' + .and('have.attr', 'height', settingsGridSize) // expected to have attribute height with the value '50' + .and( + 'have.attr', + 'style', + `stroke: ${gridColor.toLowerCase()}; opacity: ${gridOpacity / 100};`, + ); // expected to have attribute style with the value stroke: black; opacity: 0.49; + }); }); }); });