wip avec résolution de conflits
This commit is contained in:
parent
63b2d2b256
commit
ef19ba2b72
208 changed files with 178625 additions and 192002 deletions
|
|
@ -42,7 +42,7 @@ export const test = base.extend<ProductsFixture>({
|
|||
const hasStock = (product: WCV3Product) => (product.stock_quantity ?? 0) > 0;
|
||||
const hasNoStock = (product: WCV3Product) => pipe(hasStock(product), not);
|
||||
|
||||
const allProducts = await response.json() as WCV3Products;
|
||||
const allProducts = (await response.json()) as WCV3Products;
|
||||
const simpleProducts = allProducts.filter(isSimpleProduct);
|
||||
const simpleProductsWithStock = simpleProducts.filter(hasStock);
|
||||
const simpleProductsWithoutStock = simpleProducts.filter(hasNoStock);
|
||||
|
|
@ -77,9 +77,7 @@ test("can add a Product without variation with stock to the Cart", async ({ prod
|
|||
await expect(addToCartButton, "The add to cart button must be enabled").toBeEnabled();
|
||||
|
||||
// Vérifie qu'au clic sur le bouton, l'ajout au Panier retourne un succès.
|
||||
const addToCartResponse: Promise<Response> = page.waitForResponse(
|
||||
new RegExp(".*/wp-json/wc/store/cart/add-item"),
|
||||
);
|
||||
const addToCartResponse: Promise<Response> = page.waitForResponse(new RegExp(".*/wp-json/wc/store/cart/add-item"));
|
||||
await addToCartButton.click();
|
||||
const addToCartStatus = (await addToCartResponse).ok();
|
||||
expect(addToCartStatus, "The cart addition must succeed").toBeTruthy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue