Skip to content

Commit

Permalink
Merge pull request #265 from Progi1984/foHummingbirdMyWishlistsViewPage
Browse files Browse the repository at this point in the history
`foHummingbirdMyWishlistsViewPage` : Added new page
  • Loading branch information
Progi1984 authored Nov 25, 2024
2 parents bc05e46 + c7fdf8d commit 8ab9299
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ export {default as foHummingbirdLoginPage} from '@pages/FO/hummingbird/login';
export {default as foHummingbirdModalQuickViewPage} from '@pages/FO/hummingbird/modal/quickView';
export {default as foHummingbirdMyAccountPage} from '@pages/FO/hummingbird/myAccount';
export {default as foHummingbirdMyWishlistsPage} from '@pages/FO/hummingbird/myAccount/myWishlists';
export {default as foHummingbirdMyWishlistsViewPage} from '@pages/FO/hummingbird/myAccount/myWishlists/view';
export {default as foHummingbirdPasswordReminderPage} from '@pages/FO/hummingbird/passwordReminder';
export {default as foHummingbirdProductPage} from '@pages/FO/hummingbird/product';
export {default as foHummingbirdSearchResultsPage} from '@pages/FO/hummingbird/searchResults';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/FO/classic/myAccount/myWishlists/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {FoMyWishlistsViewPageInterface} from '@interfaces/FO/myAccount/myWi

/* eslint-disable global-require, @typescript-eslint/no-require-imports */
function requirePage(): FoMyWishlistsViewPageInterface {
return require('@versions/develop/pages/FO/classic/myAccount/myWishlists/view');
return require('@versions/develop/pages/FO/classic/myAccount/myWishlists/view').myWishlistViewPage;
}
/* eslint-enable global-require, @typescript-eslint/no-require-imports */

Expand Down
9 changes: 9 additions & 0 deletions src/pages/FO/hummingbird/myAccount/myWishlists/view.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type {FoMyWishlistsViewPageInterface} from '@interfaces/FO/myAccount/myWishlists/view';

/* eslint-disable global-require, @typescript-eslint/no-require-imports */
function requirePage(): FoMyWishlistsViewPageInterface {
return require('@versions/develop/pages/FO/hummingbird/myAccount/myWishlists/view');
}
/* eslint-enable global-require, @typescript-eslint/no-require-imports */

export default requirePage();
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {type FoMyWishlistsPageInterface} from '@interfaces/FO/myAccount/myWishlists';
import FOBasePage from '@pages/FO/FOBasePage';
import foClassicMyWishlistsViewPage from '@versions/develop/pages/FO/classic/myAccount/myWishlists/view';
import type {Page} from 'playwright';
import foClassicMyWishlistsViewPage from '@pages/FO/classic/myAccount/myWishlists/view';
import {type Page} from '@playwright/test';

/**
* My Wishlists page, contains functions that can be used on the page
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import {type FoMyWishlistsViewPageInterface} from '@interfaces/FO/myAccount/myWishlists/view';
import FOBasePage from '@pages/FO/FOBasePage';

import type {Page} from 'playwright';
import {type Page} from '@playwright/test';

/**
* My Wishlists View page, contains functions that can be used on the page
* @class
* @extends FOBasePage
*/
class WishlistViewPage extends FOBasePage implements FoMyWishlistsViewPageInterface {
class MyWishlistViewPage extends FOBasePage implements FoMyWishlistsViewPageInterface {
public readonly messageSuccessfullyRemoved: string;

private readonly headerTitle: string;
Expand Down Expand Up @@ -198,5 +197,5 @@ class WishlistViewPage extends FOBasePage implements FoMyWishlistsViewPageInterf
}
}

export default new WishlistViewPage();
module.exports = new WishlistViewPage();
const myWishlistViewPage = new MyWishlistViewPage();
export {myWishlistViewPage, MyWishlistViewPage};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {type FoMyWishlistsViewPageInterface} from '@interfaces/FO/myAccount/myWishlists/view';
import {MyWishlistViewPage as MyWishlistViewPageVersion} from '@versions/develop/pages/FO/classic/myAccount/myWishlists/view';

/**
* @class
* @extends FOBasePage
*/
class MyWishlistViewPage extends MyWishlistViewPageVersion implements FoMyWishlistsViewPageInterface {
/**
* @constructs
* Setting up texts and selectors to use
*/
constructor() {
super('hummingbird');
}
}

module.exports = new MyWishlistViewPage();

0 comments on commit 8ab9299

Please sign in to comment.