@@ -10,8 +10,8 @@ const VULNERABILITIES_TABLE_NAME = "vulnerability table";
1010Given (
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(
2020When (
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
2828When (
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
5154Then (
5255 "The vulnerabilities table total results is {int}" ,
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- // );
0 commit comments