Skip to content

Commit

Permalink
Improve login test
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Apr 9, 2024
1 parent 32219bd commit d6e4b58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions e2e/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ test.describe('Login', () => {
await expect(loginButton).toContainText('Submit');
await expect(page.getByText('Name and Password are required.')).not.toBeVisible();
await expect(page.getByText('Connected to bot, however Login failed,')).not.toBeVisible();
await expect(page.getByText('Invalid Password')).not.toBeVisible();

await Promise.all([loginButton.click(), page.waitForResponse('**/api/v1/token/login')]);
await expect(page.getByText('Name and Password are required.')).toBeVisible();
await expect(page.getByText('Invalid Password')).toBeVisible();
await expect(page.getByText('Connected to bot, however Login failed,')).toBeVisible();
});
});

0 comments on commit d6e4b58

Please sign in to comment.