Skip to content

Commit

Permalink
Merge pull request #349 from Progi1984/boCustomersViewPage
Browse files Browse the repository at this point in the history
Migrate `'@pages/BO/customers/view` from Core
  • Loading branch information
Progi1984 authored Jan 24, 2025
2 parents d109ae4 + bf4ab3d commit 2b016b3
Show file tree
Hide file tree
Showing 4 changed files with 404 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ export {default as boCurrenciesCreatePage} from '@pages/BO/international/localiz
export {default as boCurrenciesPage} from '@pages/BO/international/localization/currencies';
export {default as boCustomersPage} from '@pages/BO/customers';
export {default as boCustomersCreatePage} from '@pages/BO/customers/create';
export {default as boCustomersViewPage} from '@pages/BO/customers/view';
export {default as boCustomerServicePage} from '@pages/BO/customerService/customerService';
export {default as boDashboardPage} from '@pages/BO/dashboard';
export {default as boDbBackupPage} from '@pages/BO/advancedParameters/database/dbBackup';
Expand Down
20 changes: 20 additions & 0 deletions src/interfaces/BO/customers/view.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {BOBasePagePageInterface} from '@interfaces/BO';
import {type Frame, type Page} from '@playwright/test';

export interface BOCustomersViewPageInterface extends BOBasePagePageInterface {
readonly pageTitle: (customerName: string) => string;
readonly updateSuccessfulMessage: string;

clickOnTransformToCustomerAccount(page: Page): Promise<string>;
deleteVoucher(page: Page, row: number): Promise<string>;
getNumberOfElementFromTitle(page: Frame | Page, cardTitle: string): Promise<string>;
getPersonalInformationTitle(page: Page | Frame): Promise<string>;
getTextColumnFromTableCarts(page: Page, column: string, row?: number): Promise<string>;
getTextColumnFromTableLastConnections(page: Page, column: string, row?: number): Promise<string>;
getTextFromElement(page: Page, element: string): Promise<string>;
goToEditCustomerPage(page: Page): Promise<void>;
goToPage(page: Page, cardTitle: string, row?: number): Promise<void>;
isPrivateNoteBlockVisible(page: Frame | Page): Promise<boolean>;
isTransformToCustomerAccountButtonVisible(page: Page): Promise<boolean>;
setPrivateNote(page: Page, note: string): Promise<string>;
}
9 changes: 9 additions & 0 deletions src/pages/BO/customers/view.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {type BOCustomersViewPageInterface} from '@interfaces/BO/customers/view';

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

export default requirePage();
Loading

0 comments on commit 2b016b3

Please sign in to comment.