@@ -7,9 +7,13 @@ import {Page} from '@playwright/test';
77 * @extends BOBasePage
88 */
99class SelectionPage extends BOBasePage implements ModuleManagerSelectionPageInterface {
10+ public readonly pageTitle : string ;
11+
1012 public readonly installMessageSuccessful : ( moduleTag : string ) => string ;
1113
12- private readonly subTabUninstalledModules : string ;
14+ protected subTabSelection : string ;
15+
16+ protected subTabInstalledModules : string ;
1317
1418 private readonly searchInput : string ;
1519
@@ -24,10 +28,13 @@ class SelectionPage extends BOBasePage implements ModuleManagerSelectionPageInte
2428 constructor ( ) {
2529 super ( ) ;
2630
31+ this . pageTitle = 'Module selection' ;
32+
2733 this . installMessageSuccessful = ( moduleTag : string ) => `Install action on module ${ moduleTag } succeeded.` ;
2834
2935 // Selectors
30- this . subTabUninstalledModules = '#subtab-AdminModulesCatalog' ;
36+ this . subTabSelection = '#subtab-AdminModulesCatalog' ;
37+ this . subTabInstalledModules = '#subtab-AdminModulesManage' ;
3138 this . searchInput = '#search-input-group input.pstaggerAddTagInput' ;
3239 this . searchButton = '#module-search-button' ;
3340 this . installModuleButton = ( moduleTag : string ) => `div[data-tech-name="${ moduleTag } "] button.module_action_menu_install` ;
@@ -42,8 +49,18 @@ class SelectionPage extends BOBasePage implements ModuleManagerSelectionPageInte
4249 * @returns {Promise<void> }
4350 */
4451 async goToTabSelection ( page : Page ) : Promise < void > {
45- await this . waitForSelectorAndClick ( page , this . subTabUninstalledModules ) ;
46- await this . waitForVisibleSelector ( page , `${ this . subTabUninstalledModules } .active` , 2000 ) ;
52+ await this . waitForSelectorAndClick ( page , this . subTabSelection ) ;
53+ await this . waitForVisibleSelector ( page , `${ this . subTabSelection } .active` , 2000 ) ;
54+ }
55+
56+ /**
57+ * Go to the "Selection" tab
58+ * @param {Page } page
59+ * @returns {Promise<void> }
60+ */
61+ async goToTabInstalledModules ( page : Page ) : Promise < void > {
62+ await this . waitForSelectorAndClick ( page , this . subTabInstalledModules ) ;
63+ await this . waitForVisibleSelector ( page , `${ this . subTabInstalledModules } .active` , 2000 ) ;
4764 }
4865
4966 /**
@@ -62,4 +79,5 @@ class SelectionPage extends BOBasePage implements ModuleManagerSelectionPageInte
6279 }
6380}
6481
65- module . exports = new SelectionPage ( ) ;
82+ const selectionPage = new SelectionPage ( ) ;
83+ export { selectionPage , SelectionPage } ;
0 commit comments