Skip to content

Commit

Permalink
Successful test in downloading a bill in PDF format
Browse files Browse the repository at this point in the history
  • Loading branch information
MercuryAtom31 committed Nov 11, 2024
1 parent 42ee892 commit 953f95f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions petclinic-frontend/tests/billspage/test-1.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { test, expect } from '@playwright/test';

test('test', async ({ page }) => {
await page.goto('http://localhost:3000/users/login');
await page.getByPlaceholder('Enter your email').click();
await page.getByPlaceholder('Enter your email').fill('[email protected]');
await page.getByPlaceholder('Enter your email').press('Tab');
await page.getByPlaceholder('Enter your password').fill('pwd');
await page.getByRole('button', { name: 'Login' }).click();
await page.getByRole('link', { name: 'Bills' }).click();
const downloadPromise = page.waitForEvent('download');
await page.getByRole('row', { name: 'a7c71008-30d9-4166-8344-' }).getByRole('button').click();
const download = await downloadPromise;
});

0 comments on commit 953f95f

Please sign in to comment.