@@ -17,9 +17,18 @@ test.describe.serial(`Left Filters:`, () => {
1717
1818 test . beforeAll ( async ( { browser } ) => {
1919 page = await browser . newPage ( ) ;
20+
21+ const responsePromise = page . waitForResponse ( '**/services/-/latest**' , {
22+ timeout : 30000
23+ } ) ;
24+
2025 loginPageFixture = new LoginPage ( page , productUrl ) ;
2126 const role = await loginPageFixture . login ( user . email , user . password ) ;
2227 expect ( role ) . toBe ( user . role ) ;
28+
29+ await responsePromise ;
30+
31+ await page . getByTestId ( "servicesTabBtn" ) . click ( ) ;
2332 } ) ;
2433
2534 test . afterAll ( async ( { browser } ) => {
@@ -29,14 +38,27 @@ test.describe.serial(`Left Filters:`, () => {
2938 } ) ;
3039
3140 test ( `Filters` , async ( ) => {
32- const contextTree = page . getByTestId ( "contextTree" ) ;
33- await expect ( contextTree ) . toBeVisible ( {
41+ const sharedWithFilters = page . getByTestId ( "service-sharedWithFilterItem" ) ;
42+ await expect ( sharedWithFilters ) . toBeVisible ( {
43+ timeout : 30000 // it will take some time to load the Study Browser
44+ } ) ;
45+
46+ const countSharedWith = await sharedWithFilters . count ( ) ;
47+ // All Services
48+ // My Services
49+ // Shared with Me
50+ // Shared with Everyone
51+ expect ( countSharedWith === 4 ) . toBeTruthy ( ) ;
52+
53+
54+ const serviceTypeFilters = page . getByTestId ( "service-serviceTypeFilterItem" ) ;
55+ await expect ( serviceTypeFilters ) . toBeVisible ( {
3456 timeout : 30000 // it will take some time to load the Study Browser
3557 } ) ;
3658
37- const workspacesAndFoldersTreeItems = page . getByTestId ( "workspacesAndFoldersTreeItem" ) ;
38- const count = await workspacesAndFoldersTreeItems . count ( ) ;
39- // at least two: My Workspace and Shared Workspaces
40- expect ( count > 1 ) . toBeTruthy ( ) ;
59+ const countServiceType = await serviceTypeFilters . count ( ) ;
60+ // Computational
61+ // Interactive
62+ expect ( countServiceType === 2 ) . toBeTruthy ( ) ;
4163 } ) ;
4264} ) ;
0 commit comments