Skip to content

Commit

Permalink
@pages/BO/catalog/product/create : Added
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed May 2, 2024
1 parent 6e19559 commit ed33f4b
Show file tree
Hide file tree
Showing 36 changed files with 4,571 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ export {default as boModuleManagerPage} from '@pages/BO/modules/moduleManager';
export {default as boModuleManagerUninstalledModulesPage} from '@pages/BO/modules/moduleManager/uninstalledModules';
export {default as boOrdersPage} from '@pages/BO/orders';
export {default as boProductsPage} from '@pages/BO/catalog/products';
export {default as boProductsCreatePage} from '@pages/BO/catalog/products/create';
export {default as boProductsCreateTabCombinationsPage} from '@pages/BO/catalog/products/create/tabCombinations';
export {default as boProductsCreateTabDescriptionPage} from '@pages/BO/catalog/products/create/tabDescription';
export {default as boProductsCreateTabDetailsPage} from '@pages/BO/catalog/products/create/tabDetails';
export {default as boProductsCreateTabOptionsPage} from '@pages/BO/catalog/products/create/tabOptions';
export {default as boProductsCreateTabPackPage} from '@pages/BO/catalog/products/create/tabPack';
export {default as boProductsCreateTabPricingPage} from '@pages/BO/catalog/products/create/tabPricing';
export {default as boProductsCreateTabSeoPage} from '@pages/BO/catalog/products/create/tabSeo';
export {default as boProductsCreateTabShippingPage} from '@pages/BO/catalog/products/create/tabShipping';
export {default as boProductsCreateTabStocksPage} from '@pages/BO/catalog/products/create/tabStocks';
export {default as boProductsCreateTabVirtualProductPage} from '@pages/BO/catalog/products/create/tabVirtualProduct';
// Export Pages FO
export * as FOBasePage from '@pages/FO/FOBasePage';
// Export Pages FO/Classic
Expand Down
10 changes: 10 additions & 0 deletions src/interfaces/BO/catalog/products/create/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';
import { Page } from '@playwright/test';
import FakerProduct from '@data/faker/product';

export interface BOCatalogProductsCreatePageInterface extends BOBasePagePageInterface {
readonly pageTitle: string;
readonly saveProductButton: string;

setProduct(page: Page, productData: FakerProduct): Promise<string>;
}
4 changes: 4 additions & 0 deletions src/interfaces/BO/catalog/products/create/tabCombinations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';

export interface BOCatalogProductsCreateTabCombinationsPageInterface extends BOBasePagePageInterface {
}
7 changes: 7 additions & 0 deletions src/interfaces/BO/catalog/products/create/tabDescription.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';
import { Page } from '@playwright/test';
import FakerProduct from '@data/faker/product';

export interface BOCatalogProductsCreateTabDescriptionPageInterface extends BOBasePagePageInterface {
setProductDescription(page: Page, productData: FakerProduct): Promise<void>
}
7 changes: 7 additions & 0 deletions src/interfaces/BO/catalog/products/create/tabDetails.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';
import { Page } from '@playwright/test';
import FakerProduct from '@data/faker/product';

export interface BOCatalogProductsCreateTabDetailsPageInterface extends BOBasePagePageInterface {
setProductDetails(page: Page, productData: FakerProduct): Promise<void>;
}
4 changes: 4 additions & 0 deletions src/interfaces/BO/catalog/products/create/tabOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';

export interface BOCatalogProductsCreateTabOptionsPageInterface extends BOBasePagePageInterface {
}
7 changes: 7 additions & 0 deletions src/interfaces/BO/catalog/products/create/tabPack.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {type ProductPackItem} from '@data/types/product';
import {type BOBasePagePageInterface} from '@interfaces/BO';
import {type Page} from '@playwright/test';

export interface BOCatalogProductsCreateTabPackPageInterface extends BOBasePagePageInterface {
setPackOfProducts(page: Page, packData: ProductPackItem[]): Promise<void>
}
7 changes: 7 additions & 0 deletions src/interfaces/BO/catalog/products/create/tabPricing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';
import {type Page } from '@playwright/test';
import FakerProduct from '@data/faker/product';

export interface BOCatalogProductsCreateTabPricingPageInterface extends BOBasePagePageInterface {
setProductPricing(page: Page, productData: FakerProduct): Promise<void>
}
4 changes: 4 additions & 0 deletions src/interfaces/BO/catalog/products/create/tabSeo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';

export interface BOCatalogProductsCreateTabSeoPageInterface extends BOBasePagePageInterface {
}
4 changes: 4 additions & 0 deletions src/interfaces/BO/catalog/products/create/tabShipping.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';

export interface BOCatalogProductsCreateTabShippingPageInterface extends BOBasePagePageInterface {
}
7 changes: 7 additions & 0 deletions src/interfaces/BO/catalog/products/create/tabStocks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import FakerProduct from '@data/faker/product';
import {type BOBasePagePageInterface} from '@interfaces/BO';
import { Page } from '@playwright/test';

export interface BOCatalogProductsCreateTabStocksPageInterface extends BOBasePagePageInterface {
setProductStock(page: Page, productData: FakerProduct): Promise<void>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import FakerProduct from '@data/faker/product';
import {type BOBasePagePageInterface} from '@interfaces/BO';
import { Page } from '@playwright/test';

export interface BOCatalogProductsCreateTabVirtualProductPageInterface extends BOBasePagePageInterface {
setVirtualProduct(page: Page, productData: FakerProduct): Promise<void>;
}
10 changes: 9 additions & 1 deletion src/interfaces/BO/catalog/products/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@ import {type BOBasePagePageInterface} from '@interfaces/BO';
import { type Page } from '@playwright/test';

export interface BOCatalogProductsPageInterface extends BOBasePagePageInterface {
pageTitle: string;
readonly pageTitle: string;
readonly modalCreateProduct: string;

clickOnAddNewProduct(page: Page): Promise<void>;
clickOnConfirmDialogButton(page: Page): Promise<string>;
clickOnDeleteProductButton(page: Page, row?: number): Promise<boolean>;
clickOnNewProductButton(page: Page): Promise<boolean>;
filterProducts(page: Page, filterBy: string, value: string | ProductFilterMinMax, filterType: string): Promise<void>;
getNumberOfProductsFromList(page: Page): Promise<number>;
getTextColumn(page: Page, columnName: string, row: number): Promise<string | number | boolean>;
resetAndGetNumberOfLines(page: Page): Promise<number>;
resetFilter(page: Page): Promise<void>;
selectProductType(page: Page, productType: string): Promise<void>;
}
3 changes: 3 additions & 0 deletions src/interfaces/BO/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import type {CommonPageInterface} from '@interfaces/index';
import type {Frame, Page} from '@playwright/test';

export interface BOBasePagePageInterface extends CommonPageInterface {
successfulDeleteMessage: string;
successfulUpdateMessage: string;
readonly ordersParentLink: string;

readonly ordersLink: string;
Expand Down Expand Up @@ -135,6 +137,7 @@ export interface BOBasePagePageInterface extends CommonPageInterface {
readonly multistoreLink: string;

closeSfToolBar(page: Frame | Page): Promise<void>;
getAlertSuccessBlockParagraphContent(page: Frame | Page): Promise<string>;
goToSubMenu(page: Page, parentSelector: string, linkSelector: string): Promise<void>;
logoutBO(page: Page): Promise<void>;
viewMyShop(page: Page): Promise<Page>;
Expand Down
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/products/create/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { BOCatalogProductsCreatePageInterface } from '@interfaces/BO/catalog/products/create';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreatePageInterface {
return require('@versions/develop/pages/BO/catalog/products/create/index');
}
/* eslint-enable global-require, @typescript-eslint/no-var-requires */

export default requirePage();
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/products/create/tabCombinations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { BOCatalogProductsCreateTabCombinationsPageInterface } from "@interfaces/BO/catalog/products/create/tabCombinations";

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabCombinationsPageInterface {
return require('@versions/develop/pages/BO/catalog/products/create/tabCombinations');
}
/* eslint-enable global-require, @typescript-eslint/no-var-requires */

export default requirePage();
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/products/create/tabDescription.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { BOCatalogProductsCreateTabDescriptionPageInterface } from '@interfaces/BO/catalog/products/create/tabDescription';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabDescriptionPageInterface {
return require('@versions/develop/pages/BO/catalog/products/create/tabDescription');
}
/* eslint-enable global-require, @typescript-eslint/no-var-requires */

export default requirePage();
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/products/create/tabDetails.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { BOCatalogProductsCreateTabDetailsPageInterface } from "@interfaces/BO/catalog/products/create/tabDetails";

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabDetailsPageInterface {
return require('@versions/develop/pages/BO/catalog/products/create/tabDetails');
}
/* eslint-enable global-require, @typescript-eslint/no-var-requires */

export default requirePage();
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/products/create/tabOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { BOCatalogProductsCreateTabOptionsPageInterface } from "@interfaces/BO/catalog/products/create/tabOptions";

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabOptionsPageInterface {
return require('@versions/develop/pages/BO/catalog/products/create/tabOptions');
}
/* eslint-enable global-require, @typescript-eslint/no-var-requires */

export default requirePage();
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/products/create/tabPack.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { BOCatalogProductsCreateTabPackPageInterface } from '@interfaces/BO/catalog/products/create/tabPack';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabPackPageInterface {
return require('@versions/develop/pages/BO/catalog/products/create/tabPack');
}
/* eslint-enable global-require, @typescript-eslint/no-var-requires */

export default requirePage();
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/products/create/tabPricing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { BOCatalogProductsCreateTabPricingPageInterface } from "@interfaces/BO/catalog/products/create/tabPricing";

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabPricingPageInterface {
return require('@versions/develop/pages/BO/catalog/products/create/tabPricing');
}
/* eslint-enable global-require, @typescript-eslint/no-var-requires */

export default requirePage();
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/products/create/tabSeo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { BOCatalogProductsCreateTabSeoPageInterface } from "@interfaces/BO/catalog/products/create/tabSeo";

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabSeoPageInterface {
return require('@versions/develop/pages/BO/catalog/products/create/tabSeo');
}
/* eslint-enable global-require, @typescript-eslint/no-var-requires */

export default requirePage();
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/products/create/tabShipping.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { BOCatalogProductsCreateTabShippingPageInterface } from '@interfaces/BO/catalog/products/create/tabShipping';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabShippingPageInterface {
return require('@versions/develop/pages/BO/catalog/products/create/tabShipping');
}
/* eslint-enable global-require, @typescript-eslint/no-var-requires */

export default requirePage();
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/products/create/tabStocks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { BOCatalogProductsCreateTabStocksPageInterface } from '@interfaces/BO/catalog/products/create/tabStocks';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabStocksPageInterface {
return require('@versions/develop/pages/BO/catalog/products/create/tabStocks');
}
/* eslint-enable global-require, @typescript-eslint/no-var-requires */

export default requirePage();
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/products/create/tabVirtualProduct.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { BOCatalogProductsCreateTabVirtualProductPageInterface } from '@interfaces/BO/catalog/products/create/tabVirtualProduct';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabVirtualProductPageInterface {
return require('@versions/develop/pages/BO/catalog/products/create/tabVirtualProduct');
}
/* eslint-enable global-require, @typescript-eslint/no-var-requires */

export default requirePage();
Loading

0 comments on commit ed33f4b

Please sign in to comment.