wip avec résolution de conflits

This commit is contained in:
gcch 2026-02-27 14:38:50 +01:00
commit ef19ba2b72
208 changed files with 178625 additions and 192002 deletions

View file

@ -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();