fix regex
This commit is contained in:
parent
c361da5dc8
commit
9bb20551f9
1 changed files with 6 additions and 2 deletions
|
@ -179,8 +179,12 @@ describe("User authorization", () => {
|
|||
totalAmount = totalAmount
|
||||
.toFixed(2)
|
||||
.toString()
|
||||
.replace(".", "[,.]");
|
||||
const regexp = new RegExp(`\\D*${totalAmount}\\D*`);
|
||||
.split(".");
|
||||
totalAmount = `\\D*${totalAmount[0].replace(
|
||||
/(\d)(?=(\d{3})+(?!\d))/g,
|
||||
"$1[,.]*"
|
||||
)}[,.]${totalAmount[1]}\\D*`;
|
||||
const regexp = new RegExp(totalAmount);
|
||||
cy.visit(urlList.homePage);
|
||||
homePageSteps.changeChannel(defaultChannel.name);
|
||||
cy.contains(HOMEPAGE_SELECTORS.sales, regexp).should("be.visible");
|
||||
|
|
Loading…
Reference in a new issue