Skip to content

Commit

Permalink
e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
ChalkyMuffin committed Jun 15, 2024
1 parent d7485af commit 7530fa2
Show file tree
Hide file tree
Showing 3 changed files with 1,203 additions and 10 deletions.
19 changes: 19 additions & 0 deletions saraia/__tests__/app/e2e.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
describe('E2E Test for Login Functionality', () => {
beforeAll(async () => {
await page.goto('https://example.com/login');
});

it('should log in successfully with valid credentials', async () => {
await page.type('input[name="username"]', 'validUsername');
await page.type('input[name="password"]', 'validPassword');
await page.click('button[type="submit"]');

// Wait for navigation
await page.waitForNavigation();

// Verify that the user is redirected to the dashboard
expect(await page.url()).toContain('/dashboard');
await expect(page).toMatch('Welcome, validUsername');
});
});

Loading

0 comments on commit 7530fa2

Please sign in to comment.