Confirm The Total Sum Shown Under The Table Of Prices

preview_player
Показать описание

We need to grab the prices from the 4 column of the table, sum the up, then confirm the value show under the table is correct

.then(function ($cells) {
const totals = $cells
.toArray()
.map(function (el) {
})
.map(function (s) {
})
.map(parseFloat)
const sum = Cypress._.sum(totals)
})

Рекомендации по теме
Комментарии
Автор

Thanks. I might be able to remove the dependency to dinero.js in my project with this approach. Given that adding floats always works as expected without rounding error.

schantin