I'm new to Cypress and I need to compare theese two numbers: 1045,92 and 1045,92
<div class="header-icon__text" data-pl-cart-in-
total>1 045,92 р.</div>
<span>1 045,92 р.</span>
I try like this
cy.xpath("").invoke('text').then((text1) => {
cy.xpath("").invoke('text').then((text2) => {
expect(text1).to.deep.equal(text2);
But:
AssertionError:
expected '1 045,92 р.' to deeply equal '1 045,92 р.'
And I try like this:
cy.xpath("").invoke('text').then((text1) => {
cy.xpath("").invoke('text').then((text2) => {
expect(Math.floor(text1)).to.deep.equal(Math.floor(text2));
assert
expected NaN
to deeply equal NaN
But:
I'm not sure that NaN
is 1 045,92