|
1 | 1 | import BOBasePage from '@pages/BO/BOBasePage';
|
2 | 2 |
|
3 | 3 | import FakerProduct from '@data/faker/product';
|
4 |
| -import type {ProductSpecificPrice} from '@data/types/product'; |
| 4 | +import type {ProductPricingCatalogPriceRule, ProductPricingSummary, ProductSpecificPrice} from '@data/types/product'; |
5 | 5 | import type {BOProductsCreateTabPricingPageInterface} from '@interfaces/BO/catalog/products/create/tabPricing';
|
6 | 6 |
|
7 | 7 | import type {Page} from 'playwright';
|
@@ -265,18 +265,18 @@ class PricingTab extends BOBasePage implements BOProductsCreateTabPricingPageInt
|
265 | 265 | }
|
266 | 266 |
|
267 | 267 | /**
|
268 |
| - * Get summary |
269 |
| - * @param page {Page} Browser tab |
270 |
| - * @returns {Promise<object>} |
271 |
| - */ |
272 |
| - async getSummary(page: Page): Promise<object> { |
| 268 | + * Get summary |
| 269 | + * @param page {Page} Browser tab |
| 270 | + * @returns {Promise<ProductPricingSummary>} |
| 271 | + */ |
| 272 | + async getSummary(page: Page): Promise<ProductPricingSummary> { |
273 | 273 | await this.waitForSelectorAndClick(page, this.pricingTabLink);
|
274 | 274 | return {
|
275 | 275 | priceTaxExcludedValue: await this.getTextContent(page, this.priceTaxExcludedValue),
|
276 | 276 | priceTaxIncludedValue: await this.getTextContent(page, this.priceTaxIncludedValue),
|
277 | 277 | marginValue: await this.getTextContent(page, this.marginValue),
|
278 | 278 | marginRateValue: await this.getTextContent(page, this.marginRateValue),
|
279 |
| - WholesalePriceValue: await this.getTextContent(page, this.wholeSalePriceValue), |
| 279 | + wholesalePriceValue: await this.getTextContent(page, this.wholeSalePriceValue), |
280 | 280 | };
|
281 | 281 | }
|
282 | 282 |
|
@@ -404,7 +404,7 @@ class PricingTab extends BOBasePage implements BOProductsCreateTabPricingPageInt
|
404 | 404 | * @param page {Page} Browser tab
|
405 | 405 | * @param row {number} Row of catalog price rule
|
406 | 406 | */
|
407 |
| - async getCatalogPriceRuleData(page: Page, row: number) :Promise<object> { |
| 407 | + async getCatalogPriceRuleData(page: Page, row: number): Promise<ProductPricingCatalogPriceRule> { |
408 | 408 | return {
|
409 | 409 | id: await this.getTextContent(page, this.catalogPriceRuleRowColumn(row, 'catalog-price-rule-id')),
|
410 | 410 | name: await this.getTextContent(page, this.catalogPriceRuleRowColumn(row, 'name')),
|
|
0 commit comments