From 0bfcb0721ab8c2d2cb90e3ee5d2d74863a5da23c Mon Sep 17 00:00:00 2001 From: ioannisp03 <131459571+ioannisp03@users.noreply.github.com> Date: Mon, 11 Nov 2024 22:32:15 -0500 Subject: [PATCH] e2etest --- .../visitstestpage/editvisit(ioannis).spec.ts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 petclinic-frontend/tests/visitstestpage/editvisit(ioannis).spec.ts diff --git a/petclinic-frontend/tests/visitstestpage/editvisit(ioannis).spec.ts b/petclinic-frontend/tests/visitstestpage/editvisit(ioannis).spec.ts new file mode 100644 index 000000000..0f2a29fb9 --- /dev/null +++ b/petclinic-frontend/tests/visitstestpage/editvisit(ioannis).spec.ts @@ -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('admin@admin.com'); + 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(); +});