Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate @pages/BO/catalog/discounts/add from Core #352

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export {default as boBrandsPage} from '@pages/BO/catalog/brands';
export {default as boCarriersPage} from '@pages/BO/shipping/carriers';
export {default as boCarriersCreatePage} from '@pages/BO/shipping/carriers/create';
export {default as boCartRulesPage} from '@pages/BO/catalog/discounts';
export {default as boCartRulesCreatePage} from '@pages/BO/catalog/discounts/create';
export {default as boCountriesPage} from '@pages/BO/international/locations/countries';
export {default as boCountriesCreatePage} from '@pages/BO/international/locations/countries/create';
export {default as boCreditSlipsPage} from '@pages/BO/orders/creditSlips';
Expand Down
17 changes: 17 additions & 0 deletions src/interfaces/BO/catalog/discounts/create.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type FakerCartRule from '@data/faker/cartRule';
import {BOBasePagePageInterface} from '@interfaces/BO';
import {type Frame, type Page} from '@playwright/test';

export interface BOCartRulesCreatePageInterface extends BOBasePagePageInterface {
readonly editPageTitle: string;
readonly pageTitle: string;

clickOnCancelButton(page: Page): Promise<void>;
createEditCartRules(page: Frame | Page, cartRuleData: FakerCartRule, waitForNavigation?: boolean): Promise<string | null>;
fillInformationForm(page: Frame | Page, cartRuleData: FakerCartRule): Promise<void>;
getAmountValue(page: Page): Promise<string | null>;
getGenerateButtonName(page: Page): Promise<string>;
getLimitSingleCustomer(page: Page): Promise<string | null>;
getTitleOfExcludeDiscountedProduct(page: Page): Promise<string>;
saveCartRule(page: Frame | Page): Promise<string>;
}
2 changes: 2 additions & 0 deletions src/interfaces/BO/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export interface BOBasePagePageInterface extends CommonPageInterface {
readonly translationsLink: string;
readonly webserviceLink: string;

addCurrentPageToQuickAccess(page: Page, pageName: string): Promise<string | null>;
chooseShop(page: Page, shopNumber: number): Promise<void>;
clickOnMultiStoreHeader(page: Page): Promise<void>;
clickOnNotification(page: Page, tabName: string, row?: number): Promise<void>;
Expand Down Expand Up @@ -118,6 +119,7 @@ export interface BOBasePagePageInterface extends CommonPageInterface {
quickAccessToPage(page: Page, linkName: string): Promise<void>;
quickAccessToPageNewWindow(page: Page, linkName: string): Promise<Page>;
quickAccessToPageWithFrame(page: Page, linkName: string): Promise<void>;
removeLinkFromQuickAccess(page: Page): Promise<string | null>;
resize(page: Page, mobileSize: boolean): Promise<void>;
search(page: Page, query: string): Promise<void>;
setSidebarCollapsed(page: Page, isCollapsed: boolean): Promise<void>;
Expand Down
9 changes: 9 additions & 0 deletions src/pages/BO/catalog/discounts/create.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {type BOCartRulesCreatePageInterface} from '@interfaces/BO/catalog/discounts/create';

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

export default requirePage();
Loading
Loading