fix: stabilize flaky checkout UI tests + quarantine geo Error Finishing test#202
Merged
Conversation
fdaciuk
approved these changes
May 29, 2026
Test-code fixes from PLANO_CORRECAO.md, each validated by running its spec(s) individually against the stable env. - completePurchase: assert `be.enabled` instead of the subject-changing `not.have.attr,'disabled'` (which yielded undefined to .click()); single chained get with a 30s timeout. - confirmPaymentApp: wait for the confirm button to be visible, then force-click past the .modal-backdrop fade-in animation. - chooseDate: locate the scheduled datepicker button by scoping to the toggle's .vtex-omnishipping-1-x-scheduledDeliveryList group instead of a name-based id substring filter that never matched the pickup button; click the first available day rather than the possibly-disabled --keyboard-selected one. - Delivery - Peru: stabilize the async state>city>neighborhood>street>number cascade (no detaching assertion on the neighborhood select; commit street and number via blur without force; settle the shipping recompute before going to payment).
Continues PLANO_CORRECAO.md (B2 + C). Each spec validated individually
against the stable env with `--config retries=0`.
- Pickup Peru (nogeo): the orderPlaced page renders in Spanish, so the pickup
label is "Recogida", not the Brazilian-Portuguese "Retirar". Add
PICKUP_TEXT_ES and assert it. The order was always placed correctly as
pickup; this was a locale assertion bug, not a pickup race.
- pac-item: add waitForPacItems()/selectPacItem(matchText?) and replace the
blind `cy.get('.pac-item').first()` calls. They wait for the Places dropdown
to render and stabilize before selecting, re-query between hover and click,
and (with text) pick a specific prediction. Text-match only where the string
is ASCII-stable (Saint Roman, Javier Prado, Irigoyen); first-item elsewhere
and in stub tests (GetPlaceDetails is stubbed, so any item works) — there the
interceptAutoCompleteResponse call now precedes the selection. chk-2201 keeps
.eq(1)/.first() intentionally and just gains waitForPacItems.
- Unblocking pac-item let several specs progress into later timing layers,
fixed with the same pattern as Delivery - Peru:
- goToPayment: re-assert visibility immediately before the click so a late
shippingData recompute that re-renders/detaches the button is retried
instead of throwing "detached from the DOM".
- Delivery - No number / Delivery - Peru (geo) / Paraguay: commit the last
field with .blur() + cy.wait(3000) so the recompute settles before
advancing; Paraguay also waits for #ship-receiverName to be enabled, since
it is transiently disabled mid-recompute.
chooseFirstPickupPoint clicked .first() and confirmed without waiting for the modal's click -> confirm -> commit cycle to settle, so the confirm intermittently committed the modal's default point (the free Botafogo) instead of the clicked closest point (Copacabana). This placed orders at the wrong pickup store and failed the 'Loja em Copacabana' assertions in the pickup tests (Delivery_Scheduled Pickup and siblings). Add settles after the point click and after confirm in the shared helper. Validated 5/5 clean runs of 'Delivery_Scheduled Pickup - vtexgame1'. Also gitignore .playwright-mcp (browser MCP artifacts).
Closes the last two residuals from PLANO_CORRECAO.md. Each validated
individually against the stable env 5x with `--config retries=0`.
- CHK-2201: after toggling the shipping-preview to delivery with no
delivery address set, the SRP renders a clickable address link
("null"), not an open input. Click `.srp-address-title` to open the
editor before typing into #ship-addressQuery. The test had assumed the
input appeared directly after the toggle (older SRP behavior); it was
failing 2/2, not flaky.
- Delivery - Geolocation Input: the second address entry (after
#force-shipping-fields) relied on the live Google geocode to fill the
house number, but it intermittently resolved to a street-level result
with no number, leaving #ship-number empty so shipping validation
blocked the advance to payment and the Boleto group never appeared.
Stub GetPlaceDetails (deterministic city/state matching the existing
"La Capital, Santa Fe" assertion) and fill #ship-number explicitly when
the editable input is present (the number's binding to the field is
flaky: when it binds the form collapses to a summary, when it doesn't
the input stays empty). Extracted the shared entry into a helper.
… app bug) The geolocation variant of "should validate form fields after error" fails ~half the time even with CI retries due to a pre-existing app defect (not a test bug): closing the declined-payment Bootstrap modal in this flow triggers an infinite focus recursion — RangeError: Maximum call stack size exceeded (Bootstrap 2.3.2 enforceFocus + jQuery 1.8.3) — that leaves the checkout stuck "finalizing" with the buy button hidden, so completePurchase can't find the submit button. Measured geo pass rate: ~20% isolated (1/5), ~49% even with 3 retries, 0/3 under full-suite load. Other accounts are unaffected (vtexgame1/clean pass; invoice/nolean flaky-but-pass, same root cause). Skip only the geo `it` via it.skip; re-enable once the Checkout app bug is fixed.
carolkrroo
requested changes
Jun 9, 2026
|
|
||
| ## [Unreleased] | ||
|
|
||
| ## [0.19.17] - 2026-05-29 |
Contributor
There was a problem hiding this comment.
Acho que falta adicionar um Changelog aqui para lançar uma versão com as novas mudanças.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
We had recent Localization changes on the checkout-confirmation-ui, so this PR updates the scheduled tests accordingly.
Test scenarios
Flaky / failing test stabilization
This branch also stabilizes the failing & flaky checkout UI tests. Each fix was validated individually against the
stableenv with--config retries=0, then the full suite was run in batches (255/255 specs → 254 green, 1 quarantined).Highlights (each validated with repeated clean runs):
.srp-address-title, showing "null") instead of an open input; the test now clicks it to reveal#ship-addressQuerybefore typing.chooseFirstPickupPoint.force-shipping-fieldsre-entry relied on the live Google geocode (which intermittently dropped the house number, blocking the advance to payment); now stubsGetPlaceDetailsfor a deterministic address and conditionally fills#ship-number.completePurchase/confirmPaymentApp/ datepicker / Peru-cascade hardening.⏸️ Quarantined test — why we're skipping it
Payment - Credit card - Error Finishing Transaction→ "should validate form fields after error", geolocation account (vtexgame1geo) only. Skipped viait.skip— the other accounts still run.It is skipped because it fails due to a pre-existing app defect, not a test bug:
RangeError: Maximum call stack size exceeded(Bootstrap 2.3.2enforceFocus↔ jQuery 1.8.3). The checkout then gets stuck "finalizando sua compra" with the buy buttondisplay:none, socompletePurchasenever finds the submit button.vtexgame1/cleanpass;invoice/noleanare flaky-but-pass (same modal, same family).Action item (Checkout team): fix the modal focus recursion, then remove the
it.skipforvtexgame1geoto re-enable the test.