mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
16 lines
428 B
JavaScript
16 lines
428 B
JavaScript
import { Then } from "cypress-cucumber-preprocessor/steps";
|
|
|
|
Then('I can see the following table:', table => {
|
|
const headers = table.raw()[0]
|
|
headers.forEach((expected, i) => {
|
|
cy.get('thead th')
|
|
.eq(i)
|
|
.should('contain', expected)
|
|
})
|
|
const flattened = [].concat.apply([], table.rows())
|
|
flattened.forEach((expected, i) => {
|
|
cy.get('tbody td')
|
|
.eq(i)
|
|
.should('contain', expected)
|
|
})
|
|
}) |