Skip to content

Commit

Permalink
Merge pull request #391 from jolelievre/stabilize-add-product-to-cart
Browse files Browse the repository at this point in the history
Wait for ajax call to end when adding a product in order creation
  • Loading branch information
Progi1984 authored Feb 5, 2025
2 parents 19c8f0e + 3050e71 commit fed47c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/versions/develop/pages/BO/orders/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,10 @@ class BOOrderCreatePage extends BOBasePage implements BOOrdersCreatePageInterfac

// Add to cart
await page.locator(this.addtoCartButton).click();
// Wait for the ajax call to be over (no visible feedback sadly)
await page.waitForResponse('**/sell/orders/carts/**/products**');

await page.waitForTimeout(500);
// The table visible is required, but on second addition it is always visible anyway
await this.waitForVisibleSelector(page, this.productsTable);
}

Expand Down

0 comments on commit fed47c1

Please sign in to comment.