-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6ce8c5
commit 0bfcb07
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
petclinic-frontend/tests/visitstestpage/editvisit(ioannis).spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); |