feat: Record time difference in tests

This commit is contained in:
Sidharth Vinod
2024-01-26 00:52:56 +05:30
parent 3ecb841c1a
commit af53a968f6
7 changed files with 171 additions and 1 deletions

View File

@@ -110,6 +110,14 @@ export const openURLAndVerifyRendering = (
cy.visit(url);
cy.window().should('have.property', 'rendered', true);
cy.window().then((win) => {
cy.task('recordRenderTime', {
fileName: Cypress.spec.name,
testName: name,
// @ts-ignore Dynamically added property.
timeTaken: win.renderTime,
});
});
cy.get('svg').should('be.visible');
if (validation) {