1 year ago

#331013

test-img

Mathias K

Prevent cypress from checking sort order with foreach?

Currently I have the current code:

And('the user sees {string}', (kpi: string, tableDef: TableDefinition) => {
asList(tableDef).forEach(color => {

Does the foreach in a cypress expression automatically leads to checking sort order? Because my test fails when testing over different environments due to timezone differences. I would like it to not check sort order but instead go over all applicable elements:

cy.get(`[data-cy="kpi-${color}"]`)

at each new color.

typescript

cucumber

cypress

e2e-testing

cypress-testing-library

0 Answers

Your Answer

Accepted video resources