Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functional Tests : Enable Tests after #280 #290

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading