File tree Expand file tree Collapse file tree
pages/FO/hummingbird/login
versions/develop/pages/FO Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ export {default as foClassicProductPage} from '@pages/FO/classic/product';
224224export { default as foClassicSearchResultsPage } from '@pages/FO/classic/searchResults' ;
225225// Export Pages FO/Hummingbird
226226export { default as foHummingbirdCategoryPage } from '@pages/FO/hummingbird/category' ;
227+ export { default as foHummingbirdLoginPage } from '@pages/FO/hummingbird/login' ;
227228export { default as foHummingbirdModalQuickViewPage } from '@pages/FO/hummingbird/modal/quickView' ;
228229export { default as foHummingbirdSearchResultsPage } from '@pages/FO/hummingbird/searchResults' ;
229230
Original file line number Diff line number Diff line change @@ -3,7 +3,14 @@ import {FOBasePagePageInterface} from '@interfaces/FO';
33import type { Page } from '@playwright/test' ;
44
55export interface FoLoginPageInterface extends FOBasePagePageInterface {
6+ readonly disabledAccountErrorText : string ;
7+ readonly loginErrorText : string ;
68 readonly pageTitle : string ;
79
810 customerLogin ( page : Page , customer : FakerCustomer , waitForNavigation ?: boolean ) : Promise < void > ;
11+ getLoginError ( page : Page ) : Promise < string > ;
12+ getPasswordType ( page : Page ) : Promise < string > ;
13+ goToCreateAccountPage ( page : Page ) : Promise < void > ;
14+ goToPasswordReminderPage ( page : Page ) : Promise < void > ;
15+ showPassword ( page : Page ) : Promise < string > ;
916}
Original file line number Diff line number Diff line change 1+ import type { FoLoginPageInterface } from '@interfaces/FO/login' ;
2+
3+ /* eslint-disable global-require */
4+ function requirePage ( ) : FoLoginPageInterface {
5+ return require ( '@versions/develop/pages/FO/hummingbird/login' ) ;
6+ }
7+ /* eslint-enable global-require */
8+
9+ export default requirePage ( ) ;
Original file line number Diff line number Diff line change 11import type FakerCustomer from '@data/faker/customer' ;
22import { FoLoginPageInterface } from '@interfaces/FO/login' ;
33import FOBasePage from '@pages/FO/FOBasePage' ;
4-
5- import type { Page } from 'playwright' ;
4+ import type { Page } from '@playwright/test' ;
65
76/**
87 * Login page, contains functions that can be used on the page
@@ -124,5 +123,5 @@ class LoginPage extends FOBasePage implements FoLoginPageInterface {
124123 }
125124}
126125
127- module . exports . LoginPage = LoginPage ;
128- module . exports . loginPage = new LoginPage ( ) ;
126+ const loginPage = new LoginPage ( ) ;
127+ export { loginPage , LoginPage } ;
Original file line number Diff line number Diff line change 1+ import { FoLoginPageInterface } from '@interfaces/FO/login' ;
2+ import { LoginPage as LoginPageVersion } from '@versions/develop/pages/FO/classic/login' ;
3+
4+ /**
5+ * Login page, contains functions that can be used on the page
6+ * @class
7+ * @extends FOBasePage
8+ */
9+ class LoginPage extends LoginPageVersion implements FoLoginPageInterface {
10+ /**
11+ * @constructs
12+ * Setting up texts and selectors to use on login page
13+ */
14+ constructor ( ) {
15+ super ( 'hummingbird' ) ;
16+
17+ this . displayRegisterFormLink = 'div a[data-link-action=\'display-register-form\']' ;
18+ this . passwordReminderLink = '.login__forgot-password a' ;
19+ this . alertDangerTextBlock = '.login .help-block .alert.alert-danger' ;
20+ }
21+ }
22+
23+ module . exports = new LoginPage ( ) ;
You can’t perform that action at this time.
0 commit comments