Skip to content

Commit

Permalink
Merge pull request #353 from Progi1984/boAddressesPage
Browse files Browse the repository at this point in the history
Migrate `@pages/BO/customers/addresses` from Core
  • Loading branch information
Progi1984 authored Jan 24, 2025
2 parents e9bc2ec + cab0eed commit f9f6a72
Show file tree
Hide file tree
Showing 4 changed files with 407 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ export {default as opsBOProducts} from '@ops/BO/catalog/product';
export * as CommonPage from '@pages/commonPage';
// Export Pages BO
export * as BOBasePage from '@pages/BO/BOBasePage';
export {default as boAdministrationPage} from '@pages/BO/advancedParameters/administration';
export {default as boAddressesPage} from '@pages/BO/customers/addresses';
export {default as boAddressesCreatePage} from '@pages/BO/customers/addresses/create';
export {default as boAdministrationPage} from '@pages/BO/advancedParameters/administration';
export {default as boApiClientsPage} from '@pages/BO/advancedParameters/apiclients';
export {default as boApiClientsCreatePage} from '@pages/BO/advancedParameters/apiclients/create';
export {default as boAttributesPage} from '@pages/BO/catalog/attributes';
Expand Down
22 changes: 22 additions & 0 deletions src/interfaces/BO/customers/addresses/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {BOBasePagePageInterface} from '@interfaces/BO';
import {type Page} from '@playwright/test';

export interface BOAddressesPageInterface extends BOBasePagePageInterface {
readonly pageTitle: string;

deleteAddress(page: Page, row: number): Promise<string>;
deleteAddressesBulkActions(page: Page): Promise<string>;
filterAddresses(page: Page, filterType: string, filterBy: string, value?: string): Promise<void>;
getAllRowsColumnContent(page: Page, column: string): Promise<string[]>;
getNumberOfElementInGrid(page: Page): Promise<number>;
getTextColumnFromTableAddresses(page: Page, row: number, column: string): Promise<string>;
goToAddNewAddressPage(page: Page): Promise<void>;
goToEditAddressPage(page: Page, row: number): Promise<void>;
paginationNext(page: Page): Promise<string>;
paginationPrevious(page: Page): Promise<string>;
resetAndGetNumberOfLines(page: Page): Promise<number>;
resetFilter(page: Page): Promise<void>;
selectPaginationLimit(page: Page, number: number): Promise<string>;
setRequiredFields(page: Page, id: number, valueWanted?: boolean): Promise<string>;
sortTable(page: Page, sortBy: string, sortDirection: string): Promise<void>;
}
9 changes: 9 additions & 0 deletions src/pages/BO/customers/addresses/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {type BOAddressesPageInterface} from '@interfaces/BO/customers/addresses';

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

export default requirePage();
Loading

0 comments on commit f9f6a72

Please sign in to comment.