-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate
@pages/FO/{classic|hummingbird}/modal/blockCart
from Core
- Loading branch information
Showing
7 changed files
with
83 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type {FoModalBlockCartPageInterface} from '@interfaces/FO/modal/blockCart'; | ||
|
||
/* eslint-disable global-require, @typescript-eslint/no-require-imports */ | ||
function requirePage(): FoModalBlockCartPageInterface { | ||
return require('@versions/develop/pages/FO/hummingbird/modal/blockCart'); | ||
} | ||
/* eslint-enable global-require, @typescript-eslint/no-require-imports */ | ||
|
||
export default requirePage(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/versions/develop/pages/FO/hummingbird/modal/blockCart.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import {type FoModalBlockCartPageInterface} from '@interfaces/FO/modal/blockCart'; | ||
import {FoModalBlockCartPage as FoModalBlockCartPageClassic} from '@versions/develop/pages/FO/classic/modal/blockCart'; | ||
|
||
/** | ||
* Block cart modal, contains functions that can be used on the modal | ||
* @class | ||
* @extends BlockCartModal | ||
*/ | ||
class FoModalBlockCartPage extends FoModalBlockCartPageClassic implements FoModalBlockCartPageInterface { | ||
private readonly blockCartModalSummary: string; | ||
|
||
/** | ||
* @constructs | ||
* Setting up texts and selectors to use on home page | ||
*/ | ||
constructor() { | ||
super('hummingbird'); | ||
|
||
// Block Cart Modal | ||
this.cartModalCheckoutLink = `${this.blockCartModalDiv} div.cart-footer-actions a`; | ||
this.continueShoppingButton = `${this.blockCartModalDiv} div.cart-footer-actions button`; | ||
this.blockCartModalCloseButton = `${this.blockCartModalDiv} button.btn-close`; | ||
this.blockCartModalSummary = '.blockcart-modal__summery'; | ||
this.cartModalProductsCountBlock = `${this.blockCartModalSummary} p`; | ||
this.cartModalSubtotalBlock = `${this.blockCartModalSummary} .product-subtotal .subtotals.value`; | ||
this.cartModalShippingBlock = `${this.blockCartModalSummary} .product-shipping .shipping.value`; | ||
this.cartModalProductTaxInclBlock = `${this.blockCartModalSummary} .product-total .value`; | ||
} | ||
} | ||
|
||
module.exports = new FoModalBlockCartPage(); |