Skip to content

Commit

Permalink
Added a test for the rows' css class
Browse files Browse the repository at this point in the history
  • Loading branch information
rmanaem committed Dec 9, 2023
1 parent be651ef commit 7519071
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions cypress/component/annot-tool-single.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,28 @@ describe("Annotation tool component", () => {
});

});
it("Displays rows in the table with the correct background color", () => {
cy.mount(annotSingleTool, {
propsData: props
});
cy.get('table')
.find('tr')
.eq(1)
.then(row => {
cy.wrap(row).should('have.class', 'column1-color1');
});
cy.get('table')
.find('tr')
.eq(2)
.then(row => {
cy.wrap(row).should('have.class', 'column2-color2');
});
cy.get('table')
.find('tr')
.eq(3)
.then(row => {
cy.wrap(row).should('have.class', 'column2-color1');
});
});

});

0 comments on commit 7519071

Please sign in to comment.