Skip to content

Commit

Permalink
e2etest
Browse files Browse the repository at this point in the history
  • Loading branch information
ioannisp03 committed Nov 12, 2024
1 parent f6ce8c5 commit 0bfcb07
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions petclinic-frontend/tests/visitstestpage/editvisit(ioannis).spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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 password').click();
await page.getByPlaceholder('Enter your password').fill('pwd');
await page.getByRole('button', { name: 'Login' }).click();
await page.getByRole('link', { name: 'Visits' }).click();

//this times out. I assume because its not accurate enough. (dont have time to fix right now)
await page
.getByRole('row', { name: 'visitId1 11/30/2022, 8:00:00' })
.getByRole('button')
.nth(1)
.click();
await page.locator('input[name="visitStartDate"]').click();
await page.locator('input[name="visitStartDate"]').fill('2022-11-17T13:00');
await page.locator('input[name="description"]').click();
await page
.locator('input[name="description"]')
.fill('This is new text222123');
await page.locator('input[name="description"]').click();
await page
.locator('input[name="description"]')
.fill('This is new text222123123123123');
await page.getByRole('button', { name: 'Update' }).click();
});

0 comments on commit 0bfcb07

Please sign in to comment.