Improve login test

This commit is contained in:
Matthias 2024-04-09 18:24:50 +02:00
parent 32219bdf21
commit d6e4b584f1

View File

@ -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();
});
});