Skip to content

Commit 27b54bb

Browse files
Fix lint errors
1 parent 9fc24e2 commit 27b54bb

File tree

4 files changed

+19
-21
lines changed

4 files changed

+19
-21
lines changed

src/pages/BO/BOBasePage.ts

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ export default class BOBasePage extends CommonPage implements BOBasePagePageInte
738738
*/
739739
async goToSubMenu(page: Page, parentSelector: string, linkSelector: string): Promise<void> {
740740
const shopVersion = testContext.getPSVersion();
741+
741742
if (semver.lt(shopVersion, '7.4.0')) {
742743
await page.hover(parentSelector);
743744
await this.clickAndWaitForURL(page, linkSelector);
@@ -1002,14 +1003,13 @@ export default class BOBasePage extends CommonPage implements BOBasePagePageInte
10021003
const args = {selector: iFrameSelector, vl: value, hasP: hasParagraph};
10031004
// eslint-disable-next-line no-eval
10041005
const fn: { fnSetValueOnTinymceInput: PageFunction<{ selector: string, vl: string, hasP: boolean }, void> } = eval(`({
1005-
async fnSetValueOnTinymceInput(args) {
1006-
/* eslint-env browser */
1007-
const iFrameElement = await document.querySelector(args.selector);
1008-
const iFrameHtml = iFrameElement.contentDocument.documentElement;
1009-
const textElement = await iFrameHtml.querySelector(args.hasP ? 'body p' : 'body');
1010-
textElement.textContent = args.vl;
1011-
}
1012-
})`);
1006+
async fnSetValueOnTinymceInput(args) {
1007+
/* eslint-env browser */
1008+
const iFrameElement = await document.querySelector(args.selector);
1009+
const iFrameHtml = iFrameElement.contentDocument.documentElement;
1010+
const textElement = await iFrameHtml.querySelector(args.hasP ? 'body p' : 'body');
1011+
textElement.textContent = args.vl;
1012+
}})`);
10131013
await page.evaluate(fn.fnSetValueOnTinymceInput, args);
10141014
}
10151015

@@ -1035,15 +1035,14 @@ export default class BOBasePage extends CommonPage implements BOBasePagePageInte
10351035
const args = {selector, value, onChange};
10361036
// eslint-disable-next-line no-eval
10371037
const fn: { fnSetValueOnDTPickerInput: PageFunction<{ selector: string, value: string, onChange: boolean }, void> } = eval(`({
1038-
async fnSetValueOnDTPickerInput(args) {
1039-
/* eslint-env browser */
1040-
const textElement = await document.querySelector(args.selector);
1041-
textElement.value = args.value;
1042-
if (args.onChange) {
1043-
textElement.dispatchEvent(new Event('change'));
1044-
}
1045-
}
1046-
})`);
1038+
async fnSetValueOnDTPickerInput(args) {
1039+
/* eslint-env browser */
1040+
const textElement = await document.querySelector(args.selector);
1041+
textElement.value = args.value;
1042+
if (args.onChange) {
1043+
textElement.dispatchEvent(new Event('change'));
1044+
}
1045+
}})`);
10471046
await page.evaluate(fn.fnSetValueOnDTPickerInput, args);
10481047
}
10491048

src/pages/BO/catalog/products/create/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const psVersion = testContext.getPSVersion();
88
function requirePage(): BOProductsCreatePageInterface {
99
if (semver.lt(psVersion, '7.4.0')) {
1010
return require('@versions/1.7.3/pages/BO/catalog/products/create').createProduct;
11-
}
11+
}
1212
if (semver.lt(psVersion, '7.6.0')) {
1313
return require('@versions/1.7.5/pages/BO/catalog/products/create').createProduct;
1414
}

src/versions/1.7.3/pages/BO/catalog/products/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Import pages
22
import type {BOProductsPageInterface} from '@interfaces/BO/catalog/products';
33
import {ProductsPage} from '@versions/1.7.5/pages/BO/catalog/products';
4-
import {type Page} from '@playwright/test';
54

65
/**
76
* Bo products page, contains functions that can be used on the page
@@ -32,4 +31,4 @@ class BOProductsVersion extends ProductsPage implements BOProductsPageInterface
3231
}
3332

3433
const productsPage = new BOProductsVersion();
35-
export {productsPage, BOProductsVersion as ProductsPage};
34+
export {productsPage, BOProductsVersion as ProductsPage};

src/versions/develop/pages/BO/catalog/products/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ class ProductsPage extends BOBasePage implements BOProductsPageInterface {
765765
// Do nothing
766766
}
767767
// click on search
768-
await page.mouse.click(100,100);
768+
await page.mouse.click(100, 100);
769769
await this.clickAndWaitForLoadState(page, this.filterSearchButton, 'networkidle', 10000);
770770
}
771771

0 commit comments

Comments
 (0)