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

Commit 643189a

Browse files
committed
Fixed some references to dedicatedSearch in Advisory Explorer steps and some CSS.
1 parent 0129ee4 commit 643189a

File tree

3 files changed

+29
-92
lines changed

3 files changed

+29
-92
lines changed

tests/ui/features/@advisory-explorer/advisory-explorer.step.ts

Lines changed: 12 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const VULNERABILITIES_TABLE_NAME = "vulnerability table";
1010
Given(
1111
"User visits Advisory details Page of {string}",
1212
async ({ page }, advisoryID) => {
13-
const searchPage = new SearchPage(page);
14-
await searchPage.dedicatedSearch("Advisories", advisoryID);
13+
const searchPage = new SearchPage(page, "Advisories");
14+
await searchPage.dedicatedSearch(advisoryID);
1515
await page.getByRole("link", { name: advisoryID }).click();
1616
}
1717
);
@@ -20,16 +20,16 @@ Given(
2020
When(
2121
"User searches for an advisory named {string} in the general search bar",
2222
async ({ page }, item) => {
23-
const searchPage = new SearchPage(page);
23+
const searchPage = new SearchPage(page, "Dashboard");
2424
await searchPage.generalSearch("Advisories", item);
2525
}
2626
);
2727

2828
When(
2929
"User searches for {string} in the dedicated search bar",
3030
async ({ page }, advisoryID) => {
31-
const searchPage = new SearchPage(page);
32-
await searchPage.dedicatedSearch("Advisories", advisoryID);
31+
const searchPage = new SearchPage(page, "Advisories");
32+
await searchPage.dedicatedSearch(advisoryID);
3333
}
3434
);
3535

@@ -43,10 +43,13 @@ Then(
4343
);
4444

4545
// Advisory Explorer
46-
Then("The vulnerabilities table is sorted by {string}", async ({ page }, columnName) => {
47-
const toolbarTable = new ToolbarTable(page, VULNERABILITIES_TABLE_NAME);
48-
await toolbarTable.verifyTableIsSortedBy(columnName);
49-
});
46+
Then(
47+
"The vulnerabilities table is sorted by {string}",
48+
async ({ page }, columnName) => {
49+
const toolbarTable = new ToolbarTable(page, VULNERABILITIES_TABLE_NAME);
50+
await toolbarTable.verifyTableIsSortedBy(columnName);
51+
}
52+
);
5053

5154
Then(
5255
"The vulnerabilities table total results is {int}",
@@ -63,77 +66,3 @@ Then(
6366
await toolbarTable.verifyColumnContainsText(columnName, expectedValue);
6467
}
6568
);
66-
67-
68-
// // SBOMS
69-
70-
// Then("The SBOMs table is sorted by {string}", async ({ page }, columnName) => {
71-
// const toolbarTable = new ToolbarTable(page, SBOM_TABLE_NAME);
72-
// await toolbarTable.verifyTableIsSortedBy(columnName);
73-
// });
74-
75-
// Then(
76-
// "The SBOMs table total results is {int}",
77-
// async ({ page }, totalResults) => {
78-
// const toolbarTable = new ToolbarTable(page, SBOM_TABLE_NAME);
79-
// await toolbarTable.verifyPaginationHasTotalResults(totalResults);
80-
// }
81-
// );
82-
83-
// Then(
84-
// "The SBOMs table total results is greather than {int}",
85-
// async ({ page }, totalResults) => {
86-
// const toolbarTable = new ToolbarTable(page, SBOM_TABLE_NAME);
87-
// await toolbarTable.verifyPaginationHasTotalResultsGreatherThan(
88-
// totalResults
89-
// );
90-
// }
91-
// );
92-
93-
// Then(
94-
// "The {string} column of the SBOM table contains {string}",
95-
// async ({ page }, columnName, expectedValue) => {
96-
// const toolbarTable = new ToolbarTable(page, SBOM_TABLE_NAME);
97-
// await toolbarTable.verifyColumnContainsText(columnName, expectedValue);
98-
// }
99-
// );
100-
101-
// // Advisories
102-
103-
// Then("User selects the Tabs {string}", async ({ page }, tabName) => {
104-
// await page.getByText(tabName).click();
105-
// });
106-
107-
// Then(
108-
// "The Advisory table is sorted by {string}",
109-
// async ({ page }, columnName) => {
110-
// const toolbarTable = new ToolbarTable(page, ADVISORY_TABLE_NAME);
111-
// await toolbarTable.verifyTableIsSortedBy(columnName);
112-
// }
113-
// );
114-
115-
// Then(
116-
// "The Advisory table total results is {int}",
117-
// async ({ page }, totalResults) => {
118-
// const toolbarTable = new ToolbarTable(page, ADVISORY_TABLE_NAME);
119-
// await toolbarTable.verifyPaginationHasTotalResults(totalResults);
120-
// }
121-
// );
122-
123-
// Then(
124-
// "The Advisory table total results is greather than {int}",
125-
// async ({ page }, totalResults) => {
126-
// const toolbarTable = new ToolbarTable(page, ADVISORY_TABLE_NAME);
127-
// await toolbarTable.verifyPaginationHasTotalResultsGreatherThan(
128-
// totalResults
129-
// );
130-
// }
131-
// );
132-
133-
// Then(
134-
// "The {string} column of the Advisory table contains {string}",
135-
// async ({ page }, columnName, expectedValue) => {
136-
// const toolbarTable = new ToolbarTable(page, ADVISORY_TABLE_NAME);
137-
// await toolbarTable.verifyColumnContainsText(columnName, expectedValue);
138-
// }
139-
// );

tests/ui/helpers/DetailsPage.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,23 @@ export class DetailsPage {
2424

2525
async clickOnPageButton(buttonName: string) {
2626
await this.page.getByRole("button", { name: buttonName }).click();
27-
}
27+
}
2828

2929
async verifyPageHeader(header: string) {
3030
await expect(this.page.getByRole("heading")).toContainText(header);
3131
}
3232

3333
async verifyButtonIsVisible(button: string) {
34-
await expect(this.page.getByRole('button', { name: button })).toBeVisible();
34+
await expect(this.page.getByRole("button", { name: button })).toBeVisible();
3535
}
3636

3737
async verifyPanelIsVisible(panel: string) {
38-
await expect(this.page.locator('.pf-v5-c-card__title-text').filter({ hasText: panel }).first()).toBeVisible();
38+
await expect(
39+
this.page
40+
.locator(".pf-v6-c-card__title-text")
41+
.filter({ hasText: panel })
42+
.first()
43+
).toBeVisible();
3944
}
4045

4146
async verifyTabIsSelected(tabName: string) {

tests/ui/steps/details-page.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ Then("Tab {string} is not visible", async ({ page }, tabName) => {
3434
await pageWithTabs.verifyTabIsNotVisible(tabName);
3535
});
3636

37-
Then("File with the name {string} is downloaded", async ({ page }, expectedFilename) => {
38-
const downloadPromise = page.waitForEvent("download");
39-
const download = await downloadPromise;
40-
const actualFilename = download.suggestedFilename();
41-
expect(actualFilename).toEqual(expectedFilename);
42-
});
37+
Then(
38+
"File with the name {string} is downloaded",
39+
async ({ page }, expectedFilename) => {
40+
const downloadPromise = page.waitForEvent("download");
41+
const download = await downloadPromise;
42+
const actualFilename = download.suggestedFilename();
43+
expect(actualFilename).toEqual(expectedFilename);
44+
}
45+
);
4346

4447
When("User selects the Tab {string}", async ({ page }, tabName) => {
4548
const detailsPage = new DetailsPage(page);

0 commit comments

Comments
 (0)