-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from Progi1984/ps_cashOnDelivery
`ps_cashondelivery` : Adapt `foClassicHomePage` in multiple versions
- Loading branch information
Showing
5 changed files
with
46 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Import pages | ||
import type {FoHomePageInterface} from '@interfaces/FO/home'; | ||
import {FoHomePage} from '@versions/8.1/pages/FO/classic/home/index'; | ||
|
||
/** | ||
* Home page, contains functions that can be used on the page | ||
* @class | ||
*/ | ||
class FoHomePageVersion extends FoHomePage implements FoHomePageInterface { | ||
/** | ||
* @constructs | ||
* Setting up texts and selectors to use on order confirmation page | ||
*/ | ||
constructor(theme: string = 'classic') { | ||
super(theme); | ||
|
||
this.productArticle = (number: number) => `${this.productsBlockNth(2)} .products ` | ||
+ `article.product-miniature:nth-child(${number}) div`; | ||
} | ||
} | ||
|
||
module.exports = new FoHomePageVersion(); |
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 |
---|---|---|
@@ -1,22 +1,23 @@ | ||
// Import pages | ||
import type {FoHomePageInterface} from '@interfaces/FO/home'; | ||
import {HomePage} from '@versions/develop/pages/FO/classic/home/index'; | ||
import {FoHomePage} from '@versions/develop/pages/FO/classic/home/index'; | ||
|
||
/** | ||
* Order confirmation page, contains functions that can be used on the page | ||
* @class | ||
* @extends OrderConfirmationPage | ||
*/ | ||
class HomePageVersion extends HomePage implements FoHomePageInterface { | ||
class FoHomePageVersion extends FoHomePage implements FoHomePageInterface { | ||
/** | ||
* @constructs | ||
* Setting up texts and selectors to use on order confirmation page | ||
*/ | ||
constructor(theme: string = 'classic') { | ||
super(theme); | ||
|
||
this.productArticle = (number: number) => `${this.productsBlockNth(2)} .products article:nth-child(${number}) div`; | ||
this.productArticle = (number: number) => `${this.productsBlockNth(2)} .products div.product:nth-child(${number}) div`; | ||
} | ||
} | ||
|
||
module.exports = new HomePageVersion(); | ||
const foHomePage = new FoHomePageVersion(); | ||
export {foHomePage, FoHomePageVersion as FoHomePage}; |
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