Repository navigation
Wait for the stock list and the bulk update request in the stock bulk edit [OS-146] - #1141
Conversation
jolelievre
left a comment
There was a problem hiding this comment.
Thanks but to validate and merge this one we need a test PR
Please create a PR on the core that integrates this library branch and run a full UI tests campaign, this will both validate it doesn't break the existing tests And we should be able to see if the related campaign is more stable via the number of retries
| */ | ||
| private async applyBulkEditQuantity(page: Page): Promise<string> { | ||
| // The button is only enabled once the new quantity is taken into account | ||
| await this.waitForVisibleSelector(page, `${this.applyQuantityButton}:not([disabled])`); |
There was a problem hiding this comment.
Move the selector to selector list.
|
ok @jolelievre, test PR on the core: PrestaShop/PrestaShop#43374 |
|
Great, once @Progi1984 validates this PR and the ui tests are all green on develop, we can merge this one and update the 9.2.x branch with the latest content of the lib, this should stabilize the future campaigns |
|
PR merged, well done! Message to @PrestaShop/committers: do not forget to milestone it before the merge. |
|
@jolelievre the full campaign on 9.2.x with this fix is green: https://github.com/mattgoud/ga.tests.ui.pr/actions/runs/41077769683 (stock bulk edit tests passed in all 3 attempts, the retries were unrelated flaky tests). The bump on 9.2.x is PrestaShop/PrestaShop#43378. |
GET api/stocks/), and until the answer comes the table only holds a placeholder row.bulkEditQuantityWithInputselected all products, typed the quantity and clicked "Apply" right away: when the list was not loaded yet, nothing was selected, no update request was sent, and the method waited 120 s for anapi/stocks/productsresponse that never came (it also accepted any response of that URL, and only started listening after the click). Both bulk edit methods now wait for a real product row before selecting, then a sharedapplyBulkEditQuantitywaits for the "Apply" button to be enabled, listens for thePOST api/stocks/productsbefore clicking, and reads the alert. The unusedbutton.update-qtyselector (which also matched the row buttons) is replaced by the existing product actions one. The stock page and its bulk update are the same on 8.2.x, 9.2.x and develop.bulkEditQuantityWithInputright away: before, 5 out of 5 waited 120 s and failed withpage.waitForResponse: Timeout 120000ms exceeded; after, 10 out of 10 got "Stock successfully updated" in less than 1.5 s.