From 3f145fa7aa983b01ca48eb63a07d6a23b17a6069 Mon Sep 17 00:00:00 2001 From: khaira777 <777gurkirat@gmail.com> Date: Tue, 11 Aug 2026 00:18:03 -0400 Subject: [PATCH] test(e2e): select payment method before prepaid checkout --- frontend/e2e/prepaid-payment-reconciliation.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/e2e/prepaid-payment-reconciliation.spec.ts b/frontend/e2e/prepaid-payment-reconciliation.spec.ts index 8510b06e..deb9ee74 100644 --- a/frontend/e2e/prepaid-payment-reconciliation.spec.ts +++ b/frontend/e2e/prepaid-payment-reconciliation.spec.ts @@ -13,6 +13,8 @@ test('prepaid checkout uses the authoritative decimal bill total and settles in await expect(page.getByRole('button', { name: 'Tax ฿4.20' })).toBeVisible(); await expect(page.getByRole('button', { name: 'Confirm Payment · ฿64.20' })).toBeVisible(); await expect(page.getByText('Round off', { exact: true })).toHaveCount(0); + await page.getByRole('button', { name: 'Cash' }).click(); + await expect(page.getByRole('button', { name: 'Confirm Payment · ฿64.20' })).toBeEnabled(); const orderResponse = page.waitForResponse((response) => { const url = new URL(response.url()); @@ -53,6 +55,8 @@ test('prepaid checkout never reports success when the payment response is partia await page.getByRole('button', { name: 'Add to Cart - ฿60.00' }).click(); await page.getByRole('button', { name: 'Place Order' }).click(); await expect(page.getByRole('button', { name: 'Confirm Payment · ฿64.20' })).toBeVisible(); + await page.getByRole('button', { name: 'Cash' }).click(); + await expect(page.getByRole('button', { name: 'Confirm Payment · ฿64.20' })).toBeEnabled(); let paymentBatchRequests = 0; await page.route('**/api/bills/*/payments', async (route) => {