You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
setShop saves the shop while the category tree is reloading #1129
page.waitForSelector: Timeout 10000ms exceeded.
- waiting for locator('div.alert.alert-success') to be visible
The failure screenshot shows the error "You need to select at least the root category." and the form displayed again: the shop was not created.
Cause
setShop (src/versions/develop/pages/BO/advancedParameters/multistore/shop/create.ts:66) selects the root category with selectByVisibleText(page, '#id_category', ...) (:72) even when it is already selected. That fires change.
Each change on #id_category reloads the category tree by ajax and replaces it. The new checkboxes are checked afterwards by JavaScript.
The save button is clicked right away (:80). When the click lands after the tree was replaced but before its boxes are checked, the form is posted without categoryBox[] and the controller rejects it.
A longer timeout would not help: the shop creation never starts.
Suggested fix
In setShop, change the root category only when it differs from the current one; otherwise, or after changing it, wait for the tree ajax request to finish and for #categories-tree input[name="categoryBox[]"]:checked before saving.
Seen again on a 9.2.x run, same "You need to select at least the root category" signature, on several campaigns that share setShop:
04_filterSortAndPaginationShops.ts > Create 19 shops > should create shop n°6 / n°10 / n°12 / n°18 (different index on each attempt)
03_CRUDShops.ts > Update shop > should edit shop and check result
08_multistoreOptions.ts > PRE-TEST > should create shop (reported above)
setShop is also used by 07_editUrlOptions.ts, 03_catalog/01_products/20_multistore.ts, 37_psgdpr/02_configuration/07_multistore.ts and 06_patchProductIdShops.ts. The 19-shop loop in 04 makes the race close to certain on a slow runner. The fix stays in setShop, no campaign change needed.
Activity
mattgoud commentedon Oct 19, 2026
Seen again on a 9.2.x run, same "You need to select at least the root category" signature, on several campaigns that share
setShop:04_filterSortAndPaginationShops.ts> Create 19 shops > should create shop n°6 / n°10 / n°12 / n°18 (different index on each attempt)03_CRUDShops.ts> Update shop > should edit shop and check result08_multistoreOptions.ts> PRE-TEST > should create shop (reported above)setShopis also used by07_editUrlOptions.ts,03_catalog/01_products/20_multistore.ts,37_psgdpr/02_configuration/07_multistore.tsand06_patchProductIdShops.ts. The 19-shop loop in 04 makes the race close to certain on a slow runner. The fix stays insetShop, no campaign change needed.