ljharb on master
[eslint config] [base] [patch] … [eslint config] [patch] extend … Merge pull request #1996 from r… (compare)
ljharb on master
[editorial] [react] fix typo [eslint config] [*] [deps] upda… (compare)
Hi all, how to check price2 > price1 using for loop? I have used array.push to store values but array values showing undefined.
expected
price 2 > price 1
price 3 > price 2
price 4 > price 3
cy.get(orderCard).find('.kbbrUi').then(listing => {
const listcount = Cypress.$(listing).length;
console.log('count', listcount);
var price_array = [];
for (var i = 1; i < listcount; i++) {
cy.get(orderValue).eq(i).invoke('text').then((label2) => {
const price = label2.replace(/[$]+/g, '');
//const price_2_int = parseInt(price_2);
console.log('price_2_int', price);
price_array.push(price);
})
}
for (var j = 0; j <= price_array.length; j++) {
for (var k = 1; k < j; k++) {
expect(price_array[k]).to.be.greaterThan(price_array[j])
}
}
})
.map
over the list, and get an array of promises, and Promise.all it
Hi guys, how to check Date.parse(d2) > Date.parse(d1)? I am getting data as below, could anyone plz help
data input:
Mon Jun 01 10:00 AM
Tue Jun 01 10:00 PM
Thr Jun 03 9:00 AM
Sat Jun 05 11:00 AM
expected:
Tue Jun 01 10:00 PM > Mon Jun 01 10:00 AM
Thr Jun 03 9:00 AM > Tue Jun 01 10:00 PM