chore: Fix failing tests

This commit is contained in:
Sidharth Vinod
2025-01-25 14:09:09 +05:30
parent dc513ec211
commit 5747009c8f
2 changed files with 12 additions and 5 deletions

View File

@@ -132,3 +132,10 @@ export const verifyScreenshot = (name: string): void => {
cy.matchImageSnapshot(name);
}
};
export const verifyNumber = (value: number, expected: number, deltaPercent = 10): void => {
expect(value).to.be.within(
expected * (1 - deltaPercent / 100),
expected * (1 + deltaPercent / 100)
);
};