main
Kruchinin 5 years ago
parent 56fbb02df5
commit 906c3c0846

@ -27,15 +27,13 @@ context('Canvas color feature', () => {
for (let i = 0; i < colorPicker.length; i++) { for (let i = 0; i < colorPicker.length; i++) {
cy.get(colorPicker[i]) cy.get(colorPicker[i])
.click() .click()
.should('have.css', 'background') .should('have.css', 'background-color')
.then((colorPickerBgValue) => { .then((colorPickerBgValue) => {
cy.get('.cvat-canvas-container') cy.get('.cvat-canvas-container')
.should('have.css', 'background-color') .should('have.css', 'background-color')
.then((canvasBgColor) => { .then((canvasBgColor) => {
//For each color change, compare the value with the css value background-color of .cvat-canvas-container //For each color change, compare the value with the css value background-color of .cvat-canvas-container
expect(String(colorPickerBgValue.match(/^.*\d+, \d+, \d+\)/))).to.be.equal( expect(colorPickerBgValue).to.be.equal(canvasBgColor);
canvasBgColor,
);
}); });
}); });
} }

Loading…
Cancel
Save