-
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.
Merge branch 'main' into e2etest/PROD-JESSYG
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
petclinic-frontend/tests/productspage/shoppagetests.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,20 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
|
||
test('Admin View Vet Details from VetPage', 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: 'Shop' }).click(); | ||
await page.getByRole('heading', { name: 'Fish Tank Heater' }).nth(1).click(); | ||
await page.getByRole('button', { name: 'Edit' }).click(); | ||
await page.getByLabel('Product Name:').click(); | ||
await page.getByLabel('Product Name:').fill('Fish Tank'); | ||
await page.getByLabel('Product Sale Price:').click(); | ||
await page.getByLabel('Product Sale Price:').fill('19.99'); | ||
await page.getByRole('button', { name: 'Update Product' }).click(); | ||
await (expect(page.getByRole('heading', {name: 'Fish Tank'})).toBeVisible()); | ||
}); |
27 changes: 27 additions & 0 deletions
27
petclinic-frontend/tests/visitstestpage/addvisittest.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,27 @@ | ||
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(); | ||
await page.getByRole('button', { name: 'Make a Visit' }).click(); | ||
await page.locator('input[name="petId"]').click(); | ||
await page | ||
.locator('input[name="petId"]') | ||
.fill('0e4d8481-b611-4e52-baed-af16caa8bf8a'); | ||
await page.locator('input[name="visitStartDate"]').click(); | ||
await page.locator('input[name="visitStartDate"]').press('ArrowRight'); | ||
await page.locator('input[name="visitStartDate"]').press('ArrowRight'); | ||
await page.locator('input[name="visitStartDate"]').fill('2024-11-12T17:55'); | ||
await page.locator('input[name="description"]').click(); | ||
await page.locator('input[name="description"]').fill('doggo'); | ||
await page.locator('input[name="practitionerId"]').click(); | ||
await page | ||
.locator('input[name="practitionerId"]') | ||
.fill('69f85d2e-625b-11ee-8c99-0242ac120002'); | ||
await page.getByRole('button', { name: 'Add' }).click(); | ||
}); |
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,4 @@ | ||
{ | ||
"status": "failed", | ||
"failedTests": [] | ||
} |