File tree Expand file tree Collapse file tree 10 files changed +218
-0
lines changed
interfaces/BO/advancedParameters/security
pages/BO/advancedParameters/security
versions/develop/pages/BO/advancedParameters/security Expand file tree Collapse file tree 10 files changed +218
-0
lines changed Original file line number Diff line number Diff line change @@ -279,6 +279,9 @@ export {default as boRolesCreatePage} from '@pages/BO/advancedParameters/team/ro
279279export { default as boSearchPage } from '@pages/BO/shopParameters/search' ;
280280export { default as boSearchAliasPage } from '@pages/BO/shopParameters/search/alias' ;
281281export { default as boSearchAliasCreatePage } from '@pages/BO/shopParameters/search/alias/create' ;
282+ export { default as boSecurityPage } from '@pages/BO/advancedParameters/security' ;
283+ export { default as boEmployeeSessionsPage } from '@pages/BO/advancedParameters/security/employeeSessions' ;
284+ export { default as boCustomerSessionsPage } from '@pages/BO/advancedParameters/security/customerSessions' ;
282285export { default as boShopParametersPage } from '@pages/BO/shopParameters/general' ;
283286export { default as boShoppingCartsPage } from '@pages/BO/orders/shoppingCarts' ;
284287export { default as boShoppingCartsViewPage } from '@pages/BO/orders/shoppingCarts/view' ;
Original file line number Diff line number Diff line change 1+ import { BOBasePagePageInterface } from '@interfaces/BO' ;
2+
3+ export interface BOCustomerSessionsPageInterface extends BOBasePagePageInterface {
4+ readonly pageTitle : string ;
5+
6+ }
Original file line number Diff line number Diff line change 1+ import { BOBasePagePageInterface } from '@interfaces/BO' ;
2+
3+ export interface BOEmployeeSessionsPageInterface extends BOBasePagePageInterface {
4+ readonly pageTitle : string ;
5+
6+ }
Original file line number Diff line number Diff line change 1+ import { BOBasePagePageInterface } from '@interfaces/BO' ;
2+ import { type Page } from '@playwright/test' ;
3+
4+ export interface BOSecurityPageInterface extends BOBasePagePageInterface {
5+ readonly pageTitle : string ;
6+
7+ goToCustomerSessionsPage ( page : Page ) : Promise < void > ;
8+ goToEmployeeSessionsPage ( page : Page ) : Promise < void > ;
9+ }
Original file line number Diff line number Diff line change 1+ import type { BOCustomerSessionsPageInterface } from '@interfaces/BO/advancedParameters/security/customerSessions' ;
2+
3+ /* eslint-disable global-require, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
4+ function requirePage ( ) : BOCustomerSessionsPageInterface {
5+ return require ( '@versions/develop/pages/BO/advancedParameters/security/customerSessions' ) ;
6+ }
7+
8+ /* eslint-enable global-require, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
9+
10+ export default requirePage ( ) ;
Original file line number Diff line number Diff line change 1+ import type { BOEmployeeSessionsPageInterface } from '@interfaces/BO/advancedParameters/security/employeeSessions/index' ;
2+
3+ /* eslint-disable global-require, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
4+ function requirePage ( ) : BOEmployeeSessionsPageInterface {
5+ return require ( '@versions/develop/pages/BO/advancedParameters/security/employeeSessions/index' ) ;
6+ }
7+
8+ /* eslint-enable global-require, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
9+
10+ export default requirePage ( ) ;
Original file line number Diff line number Diff line change 1+ import { type BOSecurityPageInterface } from '@interfaces/BO/advancedParameters/security' ;
2+
3+ /* eslint-disable global-require, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
4+ function requirePage ( ) : BOSecurityPageInterface {
5+ return require ( '@versions/develop/pages/BO/advancedParameters/security' ) ;
6+ }
7+ /* eslint-enable global-require, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */
8+
9+ export default requirePage ( ) ;
Original file line number Diff line number Diff line change 1+ import { type BOCustomerSessionsPageInterface } from '@interfaces/BO/advancedParameters/security/customerSessions' ;
2+ import BOBasePage from '@pages/BO/BOBasePage' ;
3+ import { type Page } from '@playwright/test' ;
4+
5+ /**
6+ * Customer sessions page, contains functions that can be used on customer sessions page
7+ * @class
8+ * @extends BOBasePage
9+ */
10+ class BOCustomerSessionsPage extends BOBasePage implements BOCustomerSessionsPageInterface {
11+ public readonly pageTitle : string ;
12+
13+ private readonly securityPage : string ;
14+
15+ private readonly employeeSessionsPage : string ;
16+
17+ /**
18+ * @constructs
19+ * Setting up texts and selectors to use on customer sessions page
20+ */
21+ constructor ( ) {
22+ super ( ) ;
23+
24+ this . pageTitle = 'Customer sessions •' ;
25+
26+ // Header links
27+ this . securityPage = '#subtab-AdminSecurity' ;
28+ this . employeeSessionsPage = '#subtab-AdminSecuritySessionEmployee' ;
29+ }
30+
31+ /*
32+ Methods
33+ */
34+
35+ // Tab methods
36+ /**
37+ * Go to Employee Sessions page
38+ * @param page {Page} Browser tab
39+ * @returns {Promise<void> }
40+ */
41+ async goToEmployeeSessionsPage ( page : Page ) : Promise < void > {
42+ await this . clickAndWaitForURL ( page , this . employeeSessionsPage ) ;
43+ }
44+
45+ /**
46+ * Go back to Security tab
47+ * @param page {Page} Browser tab
48+ * @returns {Promise<void> }
49+ */
50+ async goToSecurityPage ( page : Page ) : Promise < void > {
51+ await this . clickAndWaitForURL ( page , this . securityPage ) ;
52+ }
53+ }
54+
55+ module . exports = new BOCustomerSessionsPage ( ) ;
Original file line number Diff line number Diff line change 1+ import { type BOEmployeeSessionsPageInterface } from '@interfaces/BO/advancedParameters/security/employeeSessions' ;
2+ import BOBasePage from '@pages/BO/BOBasePage' ;
3+ import { type Page } from '@playwright/test' ;
4+
5+ /**
6+ * Employee sessions page, contains functions that can be used on employee sessions page
7+ * @class
8+ * @extends BOBasePage
9+ */
10+ class BOEmployeeSessionsPage extends BOBasePage implements BOEmployeeSessionsPageInterface {
11+ public readonly pageTitle : string ;
12+
13+ private readonly customerSessionsPage : string ;
14+
15+ private readonly securityPage : string ;
16+
17+ /**
18+ * @constructs
19+ * Setting up texts and selectors to use on security page
20+ */
21+ constructor ( ) {
22+ super ( ) ;
23+
24+ this . pageTitle = 'Employee sessions •' ;
25+
26+ // Header links
27+ this . customerSessionsPage = '#subtab-AdminSecuritySessionCustomer' ;
28+ this . securityPage = '#subtab-AdminSecurity' ;
29+ }
30+
31+ /*
32+ Methods
33+ */
34+
35+ // Tab methods
36+ /**
37+ * Go to Customer Sessions page
38+ * @param page {Page} Browser tab
39+ * @returns {Promise<void> }
40+ */
41+ async goToCustomerSessionsPage ( page : Page ) : Promise < void > {
42+ await this . clickAndWaitForURL ( page , this . customerSessionsPage ) ;
43+ }
44+
45+ /**
46+ * Go back to Security tab
47+ * @param page {Page} Browser tab
48+ * @returns {Promise<void> }
49+ */
50+ async goToSecurityPage ( page : Page ) : Promise < void > {
51+ await this . clickAndWaitForURL ( page , this . securityPage ) ;
52+ }
53+ }
54+
55+ module . exports = new BOEmployeeSessionsPage ( ) ;
Original file line number Diff line number Diff line change 1+ import { type BOSecurityPageInterface } from '@interfaces/BO/advancedParameters/security' ;
2+ import BOBasePage from '@pages/BO/BOBasePage' ;
3+ import { type Page } from '@playwright/test' ;
4+
5+ /**
6+ * Security page, contains functions that can be used on security page
7+ * @class
8+ * @extends BOBasePage
9+ */
10+ class BOSecurityPage extends BOBasePage implements BOSecurityPageInterface {
11+ public readonly pageTitle : string ;
12+
13+ private readonly customerSessionsPage : string ;
14+
15+ private readonly employeeSessionsPage : string ;
16+
17+ /**
18+ * @constructs
19+ * Setting up texts and selectors to use on security page
20+ */
21+ constructor ( ) {
22+ super ( ) ;
23+
24+ this . pageTitle = 'Security •' ;
25+
26+ // Header links
27+ this . customerSessionsPage = '#subtab-AdminSecuritySessionCustomer' ;
28+ this . employeeSessionsPage = '#subtab-AdminSecuritySessionEmployee' ;
29+ }
30+
31+ /*
32+ Methods
33+ */
34+
35+ // Tab methods
36+ /**
37+ * Go to Customer Sessions page
38+ * @param page {Page} Browser tab
39+ * @returns {Promise<void> }
40+ */
41+ async goToCustomerSessionsPage ( page : Page ) : Promise < void > {
42+ await this . clickAndWaitForURL ( page , this . customerSessionsPage ) ;
43+ }
44+
45+ /**
46+ * Go to Employee Sessions tab
47+ * @param page {Page} Browser tab
48+ * @returns {Promise<void> }
49+ */
50+ async goToEmployeeSessionsPage ( page : Page ) : Promise < void > {
51+ await this . clickAndWaitForURL ( page , this . employeeSessionsPage ) ;
52+ }
53+ }
54+
55+ module . exports = new BOSecurityPage ( ) ;
You can’t perform that action at this time.
0 commit comments