Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Commit 570ec1f

Browse files
author
Rajan Ravi
committed
updated waitfor element
Signed-off-by: Rajan Ravi <rravi@rravi-thinkpadp1gen4i.bengluru.csb>
1 parent a31d5cf commit 570ec1f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/ui/helpers/DetailsPage.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export class DetailsPage {
4343

4444
//Wait for Loading Spinner to detach from the DOM
4545
async waitForData() {
46-
const spinner = this.page.getByLabel("Contents");
47-
await spinner.waitFor({ state: "detached" });
46+
const spinner = this.page.locator(`xpath=//table`);
47+
await spinner.waitFor({ state: "visible", timeout: 50000 });
4848
}
4949

5050
//Verifies the Page loads with data
@@ -62,7 +62,7 @@ export class DetailsPage {
6262
const totalVuln = `xpath=//*[name()='svg']/*[name()='text']//*[name()='tspan'][1]`;
6363

6464
const panelVulnSev = await this.getCountFromLabels(pieVulnSevLabel, ":");
65-
const sumPanelVulnSev = Object.values(panelVulnSev).reduce(
65+
const sumPanelVulnSev = await Object.values(panelVulnSev).reduce(
6666
(sum, value) => sum + value,
6767
0
6868
);
@@ -71,7 +71,7 @@ export class DetailsPage {
7171
var mismatch = false;
7272
await expect(
7373
parseInt(totalVulnPanel!, 10),
74-
`Total Vulnerabilities count ${totalVuln} mismatches with sum of individual ${sumPanelVulnSev}. Individual values are ${panelVulnSev}`
74+
`Total Vulnerabilities count ${totalVulnPanel} mismatches with sum of individual ${sumPanelVulnSev}`
7575
).toEqual(sumPanelVulnSev);
7676

7777
for (const severity in tableVulnSev) {

0 commit comments

Comments
 (0)