Browse Source

Playwright: added ID to spinbutton

playwright-pwa-install-test
Jose Olarte III 1 month ago
parent
commit
bcc0fac0a8
  1. 1
      src/components/GiftedDialog.vue
  2. 2
      test-playwright/30-record-gift.spec.ts

1
src/components/GiftedDialog.vue

@ -24,6 +24,7 @@
<fa icon="chevron-left" /> <fa icon="chevron-left" />
</div> </div>
<input <input
id="inputGivenAmount"
type="number" type="number"
class="border border-r-0 border-slate-400 px-2 py-2 text-center w-20" class="border border-r-0 border-slate-400 px-2 py-2 text-center w-20"
v-model="amountInput" v-model="amountInput"

2
test-playwright/30-record-gift.spec.ts

@ -27,7 +27,7 @@ test('Record something given', async ({ page }) => {
await page.goto('./'); await page.goto('./');
await page.getByRole('heading', { name: 'Unnamed/Unknown' }).click(); await page.getByRole('heading', { name: 'Unnamed/Unknown' }).click();
await page.getByPlaceholder('What was given').fill(finalTitle); await page.getByPlaceholder('What was given').fill(finalTitle);
await page.getByRole('spinbutton').fill(randomNonZeroNumber.toString()); await page.getByRole('spinbutton', { id: 'inputGivenAmount' }).fill(randomNonZeroNumber.toString());
await page.getByRole('button', { name: 'Sign & Send' }).click(); await page.getByRole('button', { name: 'Sign & Send' }).click();
await expect(page.getByText('That gift was recorded.')).toBeVisible(); await expect(page.getByText('That gift was recorded.')).toBeVisible();

Loading…
Cancel
Save