Adds testConfirmarEPagarWithCreditCardOpensCardSelectionWithoutSubmitting: selecting Cartão de Crédito and tapping "Confirmar e Pagar" opens CardSelectionSheet (a separate struct in CheckoutView.swift) rather than submitting an order - confirmed by reading CheckoutView+Logic.handleConfirmPaymentTap(), which returns early before any order-creation code when useInAppPayment && paymentMethod == .creditCard. Dismissed via the sheet's own close button, never selects a card or submits anything, consistent with the earlier explicit user direction not to create real order data during this coverage push. Real bug found and fixed: reachCheckoutWithOneItem's product "+" button selector (app.buttons.matching(identifier: "plus")) is the same class of bug already fixed for the tab bar's cart icon - once a product's quantity is > 0, its outer Button's identifier moves off itself onto a nested Image (the row's own quantity Text takes over the Button's accessible identity). This broke today specifically because the standing QA account's cart has genuinely accumulated real quantities across many runs, eventually leaving no untouched (quantity == 0) product for the old selector to find - confirmed via screenshot showing the "+" controls clearly rendered on screen while the buttons-only query found nothing. Fixed by targeting the nested Image's identifier directly (app.images.matching(identifier: "plus")), same fix pattern as the cart-tab icon. This is shared by all three tests in the file via reachCheckoutWithOneItem. Also bumped two real-network timeouts based on trace evidence (not guesses): store-detail load 15s -> 25s, OTP-request-to-Verificação-screen 15s -> 25s in UITestSupport.ensureLoggedIn. Verified: the new test passes consistently in isolation and alongside the other two tests in the class. One remaining flake (testAddProductToCartAndReachCheckout hitting "Login never completed" when run back-to-back with two other real-login tests in the same invocation) confirmed via isolated rerun to be real backend load from three consecutive real login/logout cycles, not a code regression - passes cleanly alone.
175 lines
9.0 KiB
Swift
175 lines
9.0 KiB
Swift