Skip to content

Commit

Permalink
Functional Tests : Enable Tests after #280
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Oct 3, 2024
1 parent 71c16c1 commit 953c8d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { test, expect, Page, BrowserContext } from '@playwright/test';
const baseContext: string = 'modules_blockwishlist_configuration_statisticsTabSettings';

test.describe('Wishlist module - Statistics tab settings', () => {
const numProducts: number = 3;

let browserContext: BrowserContext;
let page: Page;

Expand Down Expand Up @@ -129,7 +131,7 @@ test.describe('Wishlist module - Statistics tab settings', () => {
expect(isCategoryPageVisible).toEqual(true);
});

for (let idxProduct: number = 1; idxProduct <= 3; idxProduct++) {
for (let idxProduct: number = 1; idxProduct <= numProducts; idxProduct++) {
// eslint-disable-next-line no-loop-func
test(`should add product #${idxProduct} to wishlist`, async () => {
await utilsTest.addContextItem(test.info(), 'testIdentifier', `addToFavorite${idxProduct}`, baseContext);
Expand Down Expand Up @@ -160,16 +162,15 @@ test.describe('Wishlist module - Statistics tab settings', () => {
expect(pageTitle).toContain(modBlockwishlistBoStatistics.pageTitle);
});

// @todo : https://github.com/PrestaShop/PrestaShop/issues/33374
test('should click on the refresh button', async () => {
await utilsTest.addContextItem(test.info(), 'testIdentifier', 'clickOnRefreshButton', baseContext);

test.skip(true, 'https://github.com/PrestaShop/PrestaShop/issues/33374');

await modBlockwishlistBoStatistics.refreshStatistics(page);

// Check statistics
const pageTitle = await modBlockwishlistBoStatistics.getPageTitle(page);
expect(pageTitle).toContain(modBlockwishlistBoStatistics.pageTitle);

const numProductsInTable = await modBlockwishlistBoStatistics.getNumProducts(page);
expect(numProductsInTable).toEqual(numProducts);
});
});
8 changes: 3 additions & 5 deletions tests/UI/package-lock.json

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

0 comments on commit 953c8d9

Please sign in to comment.