Skip to content

Commit

Permalink
Add AfP tests for Payouts and Reports pages (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcatanese authored Oct 30, 2024
1 parent 5b94006 commit 67026be
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tests/afp/dashboard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,37 @@ test('Transactions', async ({ page }) => {
await expect(page.locator('text="My Transactions"')).toBeVisible();
});

test('Payouts', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(/AfP MyPlatform/);

await page.goto('/login');
await expect(page.locator('text="Login"')).toBeVisible();
// perform login
await page.fill('input[name="username"]', utilities.USERNAME);
await page.fill('input[name="password"]', "123");
await page.getByRole('button', { name: 'Submit' }).click();

await expect(page.locator('text="Dashboard"')).toBeVisible();

await page.goto('/payouts');
await expect(page.locator('text="My Payouts"')).toBeVisible();
});

test('Reports', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(/AfP MyPlatform/);

await page.goto('/login');
await expect(page.locator('text="Login"')).toBeVisible();
// perform login
await page.fill('input[name="username"]', utilities.USERNAME);
await page.fill('input[name="password"]', "123");
await page.getByRole('button', { name: 'Submit' }).click();

await expect(page.locator('text="Dashboard"')).toBeVisible();

await page.goto('/reports');
await expect(page.locator('text="My Reports"')).toBeVisible();
});

0 comments on commit 67026be

Please sign in to comment.