Comment out progress bar validation function

This commit is contained in:
JennyNou 2025-08-01 13:34:35 -04:00
parent e6d602ec3d
commit 92a6bc141a

View file

@ -131,24 +131,24 @@ export class BasePage {
} }
async validateProgressBar(progressPercentage: string, timeout: number = 60000) { async validateProgressBar(progressPercentage: string, timeout: number = 60000) {
// This section has been commented out until progress bar work is completed for parity.
// await waitUntil(async () => {
await waitUntil(async () => { // let loaderElements = await this.page.locator('button .loader, .buy-loader, timeout, .modal-loader').all();
let loaderElements = await this.page.locator('button .loader, .buy-loader, timeout, .modal-loader').all(); // return !(await Promise.any(loaderElements.map(el => el.isVisible())).catch(() => false));
return !(await Promise.any(loaderElements.map(el => el.isVisible())).catch(() => false)); // });
});
// Take a screenshot of the page before validating the progress bar // // Take a screenshot of the page before validating the progress bar
await this.page.screenshot({ path: `test-results\\ortoni-data\\progress-bar-${Date.now()}.png`, fullPage: true }); // await this.page.screenshot({ path: `test-results\\ortoni-data\\progress-bar-${Date.now()}.png`, fullPage: true });
// Wait until the progress bar element is attached and visible // // Wait until the progress bar element is attached and visible
const actualProgressPercentage = await this.progressBar.evaluate( // const actualProgressPercentage = await this.progressBar.evaluate(
async (element) => { // async (element) => {
await new Promise(resolve => setTimeout(resolve, 200)); // await new Promise(resolve => setTimeout(resolve, 200));
return element.style.width || "Not Found"; // return element.style.width || "Not Found";
} // }
); // );
Soft.expect(actualProgressPercentage).toBe(progressPercentage); // Soft.expect(actualProgressPercentage).toBe(progressPercentage);
console.log(`Progress Bar Percentage: Actual - ${actualProgressPercentage} vs Expected - ${progressPercentage}`); // console.log(`Progress Bar Percentage: Actual - ${actualProgressPercentage} vs Expected - ${progressPercentage}`);
} }
} }