Skip to content

Commit

Permalink
Merge branch 'main' into e2etest/PROD-JESSYG
Browse files Browse the repository at this point in the history
  • Loading branch information
J91-cloud authored Nov 11, 2024
2 parents ff333e2 + 30c076d commit da7b96a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
20 changes: 20 additions & 0 deletions petclinic-frontend/tests/productspage/shoppagetests.spec.ts
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 petclinic-frontend/tests/visitstestpage/addvisittest.spec.ts
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();
});
4 changes: 4 additions & 0 deletions test-results/.last-run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"status": "failed",
"failedTests": []
}

0 comments on commit da7b96a

Please sign in to comment.