Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
update name test
Browse files Browse the repository at this point in the history
  • Loading branch information
gigitux committed Nov 29, 2022
1 parent 421435f commit ab6fb58
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
addProductQueryBlock,
block,
configurateProductQueryBlock,
getClassicProductsName,
getProductQueryProductsName,
getProductsNameFromClassicTemplate,
getProductsNameFromProductQuery,
} from './utils';

describe( `${ block.name } Block`, () => {
Expand All @@ -44,9 +44,9 @@ describe( `${ block.name } Block`, () => {
} );
} );

it( 'should render the same products', async () => {
const classicProducts = await getClassicProductsName();
const products = await getProductQueryProductsName();
it( 'should render the same products in the same position of the classic template', async () => {
const classicProducts = await getProductsNameFromClassicTemplate();
const products = await getProductsNameFromProductQuery();

expect(
classicProducts.every( ( val, idx ) => val === products[ idx ] )
Expand All @@ -72,9 +72,9 @@ describe( `${ block.name } Block`, () => {
} );
} );

it( 'should render the same products', async () => {
const classicProducts = await getClassicProductsName();
const products = await getProductQueryProductsName();
it( 'should render the same products in the same position of the classic template', async () => {
const classicProducts = await getProductsNameFromClassicTemplate();
const products = await getProductsNameFromProductQuery();

expect(
classicProducts.every( ( val, idx ) => val === products[ idx ] )
Expand All @@ -99,9 +99,9 @@ describe( `${ block.name } Block`, () => {
} );
} );

it( 'should render the same products', async () => {
const classicProducts = await getClassicProductsName();
const products = await getProductQueryProductsName();
it( 'should render the same products in the same position of the classic template', async () => {
const classicProducts = await getProductsNameFromClassicTemplate();
const products = await getProductsNameFromProductQuery();

expect(
classicProducts.every( ( val, idx ) => val === products[ idx ] )
Expand All @@ -126,9 +126,9 @@ describe( `${ block.name } Block`, () => {
} );
} );

it( 'should render the same products', async () => {
const classicProducts = await getClassicProductsName();
const products = await getProductQueryProductsName();
it( 'should render the same products in the same position of the classic template', async () => {
const classicProducts = await getProductsNameFromClassicTemplate();
const products = await getProductsNameFromProductQuery();

expect(
classicProducts.every( ( val, idx ) => val === products[ idx ] )
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/specs/shopper/product-query/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const configurateProductQueryBlock = async () => {
await enableInheritQueryFromTemplateSetting();
};

export const getClassicProductsName = async () => {
export const getProductsNameFromClassicTemplate = async () => {
const products = await page.$$(
block.selectors.frontend.classicProductsListName
);
Expand All @@ -55,7 +55,7 @@ export const getClassicProductsName = async () => {
);
};

export const getProductQueryProductsName = async () => {
export const getProductsNameFromProductQuery = async () => {
const products = await page.$$(
block.selectors.frontend.productQueryProductsListName
);
Expand Down

0 comments on commit ab6fb58

Please sign in to comment.