Skip to content

Commit

Permalink
Fixed ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed May 24, 2024
1 parent 2b9a955 commit 22a78bf
Show file tree
Hide file tree
Showing 33 changed files with 52 additions and 52 deletions.
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@faker-js/faker": "^8.3.1",
"@playwright/test": "^1.40.1",
"csv-writer": "^1.6.0",
"jpeg-js": "^0.4.4",
"js-image-generator": "^1.0.4",
"pdfjs-dist": "^3.4.120",
"semver": "^7.5.4"
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export {default as FakerTitle} from '@data/faker/title';
export {default as FakerZone} from '@data/faker/zone';

// Export common
export {default as opsBOCatalogProduct} from '@ops/BO/catalog/product'
export {default as opsBOCatalogProduct} from '@ops/BO/catalog/product';

// Export Pages
export * as CommonPage from '@pages/commonPage';
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/BO/catalog/products/create/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';
import { Page } from '@playwright/test';
import {Page} from '@playwright/test';
import FakerProduct from '@data/faker/product';

export interface BOCatalogProductsCreatePageInterface extends BOBasePagePageInterface {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';
import { Page } from '@playwright/test';
import {Page} from '@playwright/test';
import FakerProduct from '@data/faker/product';

export interface BOCatalogProductsCreateTabDescriptionPageInterface extends BOBasePagePageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/BO/catalog/products/create/tabDetails.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';
import { Page } from '@playwright/test';
import {Page} from '@playwright/test';
import FakerProduct from '@data/faker/product';

export interface BOCatalogProductsCreateTabDetailsPageInterface extends BOBasePagePageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/BO/catalog/products/create/tabPricing.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {type BOBasePagePageInterface} from '@interfaces/BO';
import {type Page } from '@playwright/test';
import {type Page} from '@playwright/test';
import FakerProduct from '@data/faker/product';

export interface BOCatalogProductsCreateTabPricingPageInterface extends BOBasePagePageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/BO/catalog/products/create/tabStocks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FakerProduct from '@data/faker/product';
import {type BOBasePagePageInterface} from '@interfaces/BO';
import { Page } from '@playwright/test';
import {Page} from '@playwright/test';

export interface BOCatalogProductsCreateTabStocksPageInterface extends BOBasePagePageInterface {
setProductStock(page: Page, productData: FakerProduct): Promise<void>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FakerProduct from '@data/faker/product';
import {type BOBasePagePageInterface} from '@interfaces/BO';
import { Page } from '@playwright/test';
import {Page} from '@playwright/test';

export interface BOCatalogProductsCreateTabVirtualProductPageInterface extends BOBasePagePageInterface {
setVirtualProduct(page: Page, productData: FakerProduct): Promise<void>;
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces/BO/catalog/products/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type ProductFilterMinMax } from '@data/types/product';
import {type ProductFilterMinMax} from '@data/types/product';
import {type BOBasePagePageInterface} from '@interfaces/BO';
import { type Page } from '@playwright/test';
import {type Page} from '@playwright/test';

export interface BOCatalogProductsPageInterface extends BOBasePagePageInterface {
readonly pageTitle: string;
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/FO/product/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {FOBasePagePageInterface} from '@interfaces/FO';
import { type Page } from '@playwright/test';
import {type Page} from '@playwright/test';

export interface FoProductPageInterface extends FOBasePagePageInterface {
hasBlockMailAlert(page: Page): Promise<boolean>;
Expand Down
14 changes: 6 additions & 8 deletions src/ops/BO/catalog/product.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import test, { Page, expect } from '@playwright/test';
import test, {Page, expect} from '@playwright/test';
import FakerProduct from '@data/faker/product';
import boProductsPage from '@pages/BO/catalog/products';
import boProductsCreatePage from '@pages/BO/catalog/products/create';
import boDashboardPage from '@pages/BO/dashboard';
import boLoginPage from '@pages/BO/login';
import utilsTest from '@utils/test';

let numberOfProducts: number;

export default {
/**
* Function to create standard product
Expand Down Expand Up @@ -128,12 +126,12 @@ export default {
});
},

/**
/**
* Function to bulk delete product
* @param productName {string} Value to set on product name input
* @param baseContext {string} String to identify the test
*/
/*
/*
function bulkDeleteProductsTest(productName: string, baseContext: string = 'commonTests-bulkDeleteProductsTest'): void {
describe('POST-TEST: Bulk delete created products', async () => {
let numberOfProductsAfterFilter: number;
Expand All @@ -150,10 +148,10 @@ function bulkDeleteProductsTest(productName: string, baseContext: string = 'comm
await test.step('should login in BO', async () => {
await utilsTest.addContextItem(test.info(), 'testIdentifier', 'loginBO', baseContext);
await boLoginPage.goTo(page, global.BO.URL);
await boLoginPage.successLogin(page, global.BO.EMAIL, global.BO.PASSWD);
const pageTitle = await boDashboardPage.getPageTitle(page);
expect(pageTitle).toContain(boDashboardPage.pageTitle);
});
Expand Down Expand Up @@ -222,4 +220,4 @@ function bulkDeleteProductsTest(productName: string, baseContext: string = 'comm
});
}*/

};
};
2 changes: 1 addition & 1 deletion src/pages/BO/catalog/products/create/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BOCatalogProductsCreatePageInterface } from '@interfaces/BO/catalog/products/create';
import type {BOCatalogProductsCreatePageInterface} from '@interfaces/BO/catalog/products/create';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreatePageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/BO/catalog/products/create/tabCombinations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BOCatalogProductsCreateTabCombinationsPageInterface } from "@interfaces/BO/catalog/products/create/tabCombinations";
import {BOCatalogProductsCreateTabCombinationsPageInterface} from '@interfaces/BO/catalog/products/create/tabCombinations';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabCombinationsPageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/BO/catalog/products/create/tabDescription.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BOCatalogProductsCreateTabDescriptionPageInterface } from '@interfaces/BO/catalog/products/create/tabDescription';
import type {BOCatalogProductsCreateTabDescriptionPageInterface} from '@interfaces/BO/catalog/products/create/tabDescription';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabDescriptionPageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/BO/catalog/products/create/tabDetails.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BOCatalogProductsCreateTabDetailsPageInterface } from "@interfaces/BO/catalog/products/create/tabDetails";
import type {BOCatalogProductsCreateTabDetailsPageInterface} from '@interfaces/BO/catalog/products/create/tabDetails';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabDetailsPageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/BO/catalog/products/create/tabOptions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BOCatalogProductsCreateTabOptionsPageInterface } from "@interfaces/BO/catalog/products/create/tabOptions";
import type {BOCatalogProductsCreateTabOptionsPageInterface} from '@interfaces/BO/catalog/products/create/tabOptions';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabOptionsPageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/BO/catalog/products/create/tabPack.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BOCatalogProductsCreateTabPackPageInterface } from '@interfaces/BO/catalog/products/create/tabPack';
import type {BOCatalogProductsCreateTabPackPageInterface} from '@interfaces/BO/catalog/products/create/tabPack';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabPackPageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/BO/catalog/products/create/tabPricing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BOCatalogProductsCreateTabPricingPageInterface } from "@interfaces/BO/catalog/products/create/tabPricing";
import type {BOCatalogProductsCreateTabPricingPageInterface} from '@interfaces/BO/catalog/products/create/tabPricing';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabPricingPageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/BO/catalog/products/create/tabSeo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BOCatalogProductsCreateTabSeoPageInterface } from "@interfaces/BO/catalog/products/create/tabSeo";
import type {BOCatalogProductsCreateTabSeoPageInterface} from '@interfaces/BO/catalog/products/create/tabSeo';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabSeoPageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/BO/catalog/products/create/tabShipping.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BOCatalogProductsCreateTabShippingPageInterface } from '@interfaces/BO/catalog/products/create/tabShipping';
import type {BOCatalogProductsCreateTabShippingPageInterface} from '@interfaces/BO/catalog/products/create/tabShipping';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabShippingPageInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/BO/catalog/products/create/tabStocks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BOCatalogProductsCreateTabStocksPageInterface } from '@interfaces/BO/catalog/products/create/tabStocks';
import type {BOCatalogProductsCreateTabStocksPageInterface} from '@interfaces/BO/catalog/products/create/tabStocks';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabStocksPageInterface {
Expand Down
3 changes: 2 additions & 1 deletion src/pages/BO/catalog/products/create/tabVirtualProduct.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { BOCatalogProductsCreateTabVirtualProductPageInterface } from '@interfaces/BO/catalog/products/create/tabVirtualProduct';
import {type BOCatalogProductsCreateTabVirtualProductPageInterface}
from '@interfaces/BO/catalog/products/create/tabVirtualProduct';

/* eslint-disable global-require, @typescript-eslint/no-var-requires */
function requirePage(): BOCatalogProductsCreateTabVirtualProductPageInterface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import type ProductData from '@data/faker/product';
import type {ProductHeaderSummary} from '@data/types/product';

import type {Frame, Page} from 'playwright';
import { BOCatalogProductsCreatePageInterface } from '@interfaces/BO/catalog/products/create';
import {BOCatalogProductsCreatePageInterface} from '@interfaces/BO/catalog/products/create';

/**
* Create Product V2 page, contains functions that can be used on the page
* @class
* @extends BOBasePage
*/
class CreateProductPage extends BOBasePage implements BOCatalogProductsCreatePageInterface{
class CreateProductPage extends BOBasePage implements BOCatalogProductsCreatePageInterface {
public readonly pageTitle: string;

public readonly saveAndPublishButtonName: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ProductCombinationOptions,
ProductStockMovement,
} from '@data/types/product';
import { BOCatalogProductsCreateTabCombinationsPageInterface } from '@interfaces/BO/catalog/products/create/tabCombinations';
import {BOCatalogProductsCreateTabCombinationsPageInterface} from '@interfaces/BO/catalog/products/create/tabCombinations';
import BOBasePage from '@pages/BO/BOBasePage';
import {expect, type Frame, type Page} from '@playwright/test';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {ProductImageInformation} from '@data/types/product';
import FakerProduct from '@data/faker/product';
import { BOCatalogProductsCreateTabDescriptionPageInterface } from '@interfaces/BO/catalog/products/create/tabDescription';
import {BOCatalogProductsCreateTabDescriptionPageInterface} from '@interfaces/BO/catalog/products/create/tabDescription';
import BOBasePage from '@pages/BO/BOBasePage';
import { Page } from '@playwright/test';
import {Page} from '@playwright/test';

/**
* Description tab on new product V2 page, contains functions that can be used on the page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import type ProductData from '@data/faker/product';
import {ProductFeatures} from '@data/types/product';

import type {Frame, Page} from 'playwright';
import { BOCatalogProductsCreateTabDetailsPageInterface } from '@interfaces/BO/catalog/products/create/tabDetails';
import { expect } from '@playwright/test';
import {BOCatalogProductsCreateTabDetailsPageInterface} from '@interfaces/BO/catalog/products/create/tabDetails';
import {expect} from '@playwright/test';

/**
* Details tab on new product V2 page, contains functions that can be used on the page
* @class
* @extends BOBasePage
*/
class DetailsTab extends BOBasePage implements BOCatalogProductsCreateTabDetailsPageInterface{
class DetailsTab extends BOBasePage implements BOCatalogProductsCreateTabDetailsPageInterface {
public readonly featureCustomValueNotDefaultLanguageMessage: string;

private readonly detailsTabLink: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {ProductPackInformation, ProductPackItem} from '@data/types/product'

import type {Locator, Page} from 'playwright';
import {ProductPackOptions, ProductStockMovement} from '@data/types/product';
import { BOCatalogProductsCreateTabPackPageInterface } from '@interfaces/BO/catalog/products/create/tabPack';
import {BOCatalogProductsCreateTabPackPageInterface} from '@interfaces/BO/catalog/products/create/tabPack';

/**
* Pack tab on new product V2 page, contains functions that can be used on the page
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type FakerProduct from '@data/faker/product';
import type {ProductSpecificPrice} from '@data/types/product';
import { BOCatalogProductsCreateTabPricingPageInterface } from '@interfaces/BO/catalog/products/create/tabPricing';
import {BOCatalogProductsCreateTabPricingPageInterface} from '@interfaces/BO/catalog/products/create/tabPricing';
import BOBasePage from '@pages/BO/BOBasePage';
import { Page } from '@playwright/test';
import {Page} from '@playwright/test';

/**
* Pricing tab on new product V2 page, contains functions that can be used on the page
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type FakerProduct from '@data/faker/product';
import type {ProductStockMovement} from '@data/types/product';
import { BOCatalogProductsCreateTabStocksPageInterface } from '@interfaces/BO/catalog/products/create/tabStocks';
import {BOCatalogProductsCreateTabStocksPageInterface} from '@interfaces/BO/catalog/products/create/tabStocks';
import BOBasePage from '@pages/BO/BOBasePage';
import { type Page } from '@playwright/test';
import {type Page} from '@playwright/test';

/**
* Stocks tab on new product V2 page, contains functions that can be used on the page
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import FakerProduct from '@data/faker/product';
import { BOCatalogProductsCreateTabVirtualProductPageInterface } from '@interfaces/BO/catalog/products/create/tabVirtualProduct';
import {BOCatalogProductsCreateTabVirtualProductPageInterface} from '@interfaces/BO/catalog/products/create/tabVirtualProduct';
import BOBasePage from '@pages/BO/BOBasePage';
import { type Page } from '@playwright/test';
import {type Page} from '@playwright/test';

/**
* Virtual product tab on new product V2 page, contains functions that can be used on the page
Expand Down
8 changes: 4 additions & 4 deletions src/versions/develop/pages/BO/catalog/products/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {ProductFilterMinMax} from '@data/types/product';
import { BOCatalogProductsPageInterface } from '@interfaces/BO/catalog/products';
import {BOCatalogProductsPageInterface} from '@interfaces/BO/catalog/products';
import BOBasePage from '@pages/BO/BOBasePage';
import {
expect,
type Frame,
type Page
expect,
type Frame,
type Page,
} from '@playwright/test';

/**
Expand Down
3 changes: 1 addition & 2 deletions src/versions/develop/pages/FO/classic/product/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

import ProductReviewData from '@data/faker/productReview';
import {
ProductAttribute, ProductImageUrls, ProductInformations,
} from '@data/types/product';
import { FoProductPageInterface } from '@interfaces/FO/product';
import {FoProductPageInterface} from '@interfaces/FO/product';
import FOBasePage from '@pages/FO/FOBasePage';
import type {Page} from '@playwright/test';

Expand Down

0 comments on commit 22a78bf

Please sign in to comment.