File tree Expand file tree Collapse file tree
develop/pages/FO/hummingbird Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ function requirePage(): FoModalQuickViewPageInterface {
99 if ( semver . lt ( psVersion , '9.1.0' ) ) {
1010 return require ( '@versions/9.0/pages/FO/hummingbird/modal/quickView' ) . foModalQuickViewPage ;
1111 }
12+ if ( semver . lt ( psVersion , '9.2.0' ) ) {
13+ return require ( '@versions/9.1/pages/FO/hummingbird/modal/quickView' ) . foModalQuickViewPage ;
14+ }
1215 return require ( '@versions/develop/pages/FO/hummingbird/modal/quickView' ) . foModalQuickViewPage ;
1316}
1417/* eslint-enable global-require, @typescript-eslint/no-require-imports */
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ function requirePage(): FoMyAccountPageInterface {
99 if ( semver . lt ( psVersion , '9.1.0' ) ) {
1010 return require ( '@versions/9.0/pages/FO/hummingbird/myAccount' ) . foMyAccountPage ;
1111 }
12+ if ( semver . lt ( psVersion , '9.2.0' ) ) {
13+ return require ( '@versions/9.1/pages/FO/hummingbird/myAccount' ) . foMyAccountPage ;
14+ }
1215 return require ( '@versions/develop/pages/FO/hummingbird/myAccount' ) . myAccountPage ;
1316}
1417/* eslint-enable global-require, @typescript-eslint/no-require-imports */
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ function requirePage(): FoProductHummingbirdPageInterface {
99 if ( semver . lt ( psVersion , '9.1.0' ) ) {
1010 return require ( '@versions/9.0/pages/FO/hummingbird/product' ) . foProductPage ;
1111 }
12+ if ( semver . lt ( psVersion , '9.2.0' ) ) {
13+ return require ( '@versions/9.1/pages/FO/hummingbird/product' ) . foProductPage ;
14+ }
1215 return require ( '@versions/develop/pages/FO/hummingbird/product' ) . foProductPage ;
1316}
1417/* eslint-enable global-require, @typescript-eslint/no-require-imports */
Original file line number Diff line number Diff line change 1+ import { type FoModalQuickViewPageInterface } from '@interfaces/FO/modal/quickView' ;
2+ import { FoModalQuickViewPage as FoModalQuickViewPageVersion } from '@versions/develop/pages/FO/hummingbird/modal/quickView' ;
3+
4+ /**
5+ * Quick view modal, contains functions that can be used on the page
6+ * @class
7+ * @extends FoModalQuickViewPageVersion
8+ */
9+ class FoModalQuickViewPage extends FoModalQuickViewPageVersion implements FoModalQuickViewPageInterface {
10+ /**
11+ * @constructs
12+ * Setting up texts and selectors to use on quick view modal
13+ */
14+ constructor ( ) {
15+ super ( ) ;
16+
17+ // Quick view modal
18+ // Before Hummingbird wrapped each thumbnail button in `li.product__thumbnails-item`,
19+ // the button was a direct child of `ul.product__thumbnails-list`.
20+ this . quickViewThumbImagePosition = ( position : number ) => `${ this . quickViewModalDiv } ul.product__thumbnails-list `
21+ + `button:nth-child(${ position } ) img` ;
22+ }
23+ }
24+
25+ const foModalQuickViewPage = new FoModalQuickViewPage ( ) ;
26+ export { foModalQuickViewPage , FoModalQuickViewPage } ;
Original file line number Diff line number Diff line change 1+ import { FoMyAccountPageInterface } from '@interfaces/FO/myAccount' ;
2+ import { MyAccountPage as MyAccountPageVersion } from '@versions/develop/pages/FO/hummingbird/myAccount' ;
3+
4+ /**
5+ * My account page, contains functions that can be used on the page
6+ * @class
7+ * @extends MyAccountPageVersion
8+ */
9+ class FoMyAccountPage extends MyAccountPageVersion implements FoMyAccountPageInterface {
10+ /**
11+ * @constructs
12+ * Setting up texts and selectors to use on my account page
13+ */
14+ constructor ( ) {
15+ super ( ) ;
16+
17+ // Selectors
18+ this . myWishlistsLink = '.account-menu__nav #wishlist_link' ;
19+ this . psgdprLink = '.account-menu__nav #psgdpr_link' ;
20+ }
21+ }
22+
23+ const foMyAccountPage = new FoMyAccountPage ( ) ;
24+ export { foMyAccountPage , FoMyAccountPage } ;
Original file line number Diff line number Diff line change 1+ import { type FoProductHummingbirdPageInterface } from '@interfaces/FO/product' ;
2+ import { FoProductPage as FoProductPageVersion } from '@versions/develop/pages/FO/hummingbird/product' ;
3+
4+ /**
5+ * Product page, contains functions that can be used on the page
6+ * @class
7+ * @extends FoProductPageVersion
8+ */
9+ class FoProductPage extends FoProductPageVersion implements FoProductHummingbirdPageInterface {
10+ /**
11+ * @constructs
12+ * Setting up texts and selectors to use on product page
13+ */
14+ constructor ( ) {
15+ super ( ) ;
16+
17+ // Before Hummingbird wrapped each thumbnail button in `li.product__thumbnails-item`,
18+ // the button (`.product__thumbnail`) was a direct child of `ul.product__thumbnails-list`.
19+ this . productImageRow = ( row : number ) => '.product__images .product__thumbnails-list '
20+ + `.product__thumbnail:nth-child(${ row } )` ;
21+ }
22+ }
23+
24+ const foProductPage = new FoProductPage ( ) ;
25+ export { foProductPage , FoProductPage } ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class FoModalQuickViewPage extends FoModalQuickViewPageClassic implements FoModa
3434 this . quickViewProductColor = `${ this . quickViewProductVariants } div[id^="group_2"]` ;
3535 this . quickViewCloseButton = `${ this . quickViewModalDiv } .quickview__header button.btn-close` ;
3636 this . quickViewThumbImagePosition = ( position : number ) => `${ this . quickViewModalDiv } ul.product__thumbnails-list `
37- + `button :nth-child(${ position } ) img` ;
37+ + `li.product__thumbnails-item :nth-child(${ position } ) button img` ;
3838 }
3939
4040 /**
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ class MyAccountPage extends MyAccountPageVersion implements FoMyAccountPageInter
2424 this . orderSlipsLink = '#order-slips_link' ;
2525 this . successMessageAlert = 'div.alert' ;
2626 this . logoutFooterLink = '#footer_customeraccountlinks a.logout' ;
27- this . myWishlistsLink = '.account-menu__nav #wishlist_link ' ;
28- this . psgdprLink = '.account-menu__nav #psgdpr_link ' ;
27+ this . myWishlistsLink = '.account-menu__nav .account-menu__link--wishlist ' ;
28+ this . psgdprLink = '.account-menu__nav .account-menu__link--psgdpr ' ;
2929 }
3030}
3131
Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ class FoProductPage extends FoProductPageClassic implements FoProductHummingbird
4747 this . productCoverImgProductModal = `${ this . productCarouselImageItem } .active img` ;
4848 this . carouselControlProductModal = ( direction : string ) => '#product-modal .product-images-modal__body'
4949 + ` button.carousel-control-${ direction } ` ;
50- this . productImageRow = ( row : number ) => `.product__images .product__thumbnails-list .product__thumbnail:nth-child(${ row } )` ;
50+ this . productImageRow = ( row : number ) => '.product__images .product__thumbnails-list '
51+ + `.product__thumbnails-item:nth-child(${ row } ) .product__thumbnail` ;
5152 this . thumbImg = ( row : number ) => `${ this . productImageRow ( row ) } picture img.js-thumb` ;
5253 this . zoomIcon = '.product__images .product__carousel .product__zoom' ;
5354 this . productName = '#wrapper .product__name' ;
You can’t perform that action at this time.
0 commit comments