Skip to content

Commit 1a84dbc

Browse files
author
Myron van Velsen
committed
Merge branch '282-main-branch-testing-suite-faalt' into 'main'
Resolve "main branch testing suite faalt" See merge request elgentos/magento2-playwright!45
2 parents 28cf77e + e172e72 commit 1a84dbc

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

tests/mainmenu.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ test.describe('Guest tests (not logged in)', () => {
7878
*/
7979
test('Open_the_minicart', { tag: ['@mainmenu', '@cold'] }, async ({page}) => {
8080
const mainMenu = new MainMenuPage(page);
81+
await page.goto(requireEnv('PLAYWRIGHT_BASE_URL'));
82+
await mainMenu.mainMenuMiniCartButton.waitFor();
83+
8184
await mainMenu.openMiniCart();
8285
});
8386

tests/poms/frontend/mainmenu.page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class MainMenuPage {
8888
await this.mainMenuAccountButton.click();
8989

9090
await this.mainMenuLoginItem.click();
91-
await this.page.waitForURL(`${slugs.account.loginSlug}/**`);
91+
await this.page.waitForURL(`${slugs.account.loginSlug}**`);
9292
await expect(loginHeader, 'Login header text is visible').toBeVisible();
9393
}
9494

@@ -160,7 +160,7 @@ class MainMenuPage {
160160
* Function for the test Open_the_minicart
161161
*/
162162
async openMiniCart() {
163-
await this.page.goto(requireEnv('PLAYWRIGHT_BASE_URL'));
163+
// await this.page.goto(requireEnv('PLAYWRIGHT_BASE_URL'));
164164
await this.mainMenuMiniCartButton.waitFor();
165165
// By adding 'force', we can bypass the 'aria-disabled' tag.
166166
await this.mainMenuMiniCartButton.click({force: true});

tests/poms/frontend/product.page.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,20 @@ class ProductPage {
3838
}
3939

4040
async addProductToWishlist(product:string, url: string){
41+
/**
42+
* Note that the test Add_product_to_wishlist is currently set to fixme
43+
*/
4144
let addedToWishlistNotification = `${product} ${outcomeMarker.wishListPage.wishListAddedNotification}`;
4245
await this.page.goto(url);
43-
await this.addToWishlistButton.click();
44-
await this.page.waitForLoadState();
46+
await this.addToWishlistButton.waitFor();
47+
this.addToWishlistButton.click();
4548

4649
await expect(async () => {
47-
await expect(this.page.getByText(addedToWishlistNotification)).toBeVisible();
50+
await this.page.waitForSelector(UIReference.general.messageLocator, { state: 'visible' });
4851
}).toPass();
4952

53+
await expect(this.page.getByText(addedToWishlistNotification), "Notification that product has been added is visible").toBeVisible();
54+
5055
let productNameInWishlist = this.page.locator(UIReference.wishListPage.wishListItemGridLabel).getByText(UIReference.productPage.simpleProductTitle, {exact: true});
5156

5257
await expect(this.page).toHaveURL(new RegExp(slugs.wishList.wishListRegex));

tests/product.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ test.describe('Product page tests',{ tag: '@product',}, () => {
1313
await productPage.addProductToCompare(UIReference.productPage.simpleProductTitle, slugs.productPage.simpleProductSlug);
1414
});
1515

16-
test('Add_product_to_wishlist',{ tag: '@cold'}, async ({page, browserName}) => {
16+
test.fixme('Add_product_to_wishlist',{ tag: '@cold'}, async ({page, browserName}) => {
17+
/**
18+
* This test is currently (October 2025) set to be fixed, since it causes regular timeouts.
19+
* Various fixes have been tried, unsuccessfully.
20+
*/
1721
await test.step('Log in with account', async () =>{
1822
const browserEngine = browserName?.toUpperCase() || "UNKNOWN";
1923
const emailInputValue = requireEnv(`MAGENTO_EXISTING_ACCOUNT_EMAIL_${browserEngine}`);

0 commit comments

Comments
 (0)