Skip to content

Commit

Permalink
e2etest/invt-ilyassg: Added E2E test for deleting supplies in invento…
Browse files Browse the repository at this point in the history
…ries (#1048)

Added E2E test for deleting supplies in inventories (Ilyass)

Co-authored-by: Ilyass Gouriny <[email protected]>
Co-authored-by: Jessy Gjerek <[email protected]>
Co-authored-by: cgerard321 <[email protected]>
  • Loading branch information
4 people authored Nov 12, 2024
1 parent f009541 commit 6e3ff59
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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 expect(page.getByRole('button', { name: 'Login' })).toBeVisible();
await page.getByRole('button', { name: 'Login' }).click();
await expect(page.getByRole('link', { name: 'Inventories' })).toBeVisible();
await page.getByRole('link', { name: 'Inventories' }).click();
await page.getByText('Vaccines').click();
await expect(page.getByRole('button', { name: 'Delete' }).first()).toBeVisible();
await page.getByRole('button', { name: 'Delete' }).first().click();
await expect(page.getByRole('button', { name: 'Confirm' })).toBeVisible();
await page.getByRole('button', { name: 'Confirm' }).click();
});

0 comments on commit 6e3ff59

Please sign in to comment.