Skip to content

Commit 0e87a6e

Browse files
committed
test(ui): Add a very simple front page test
Login to the ORT Server UI as an admin, and assert that some elements from the front page are rendered. This works as a crude smoke test for the UI; if something totally breaks the UI, the front page won't even load, and the test will fail. Resolves #3789. Signed-off-by: Jyrki Keisala <jyrki.keisala@doubleopen.org>
1 parent 90ecf35 commit 0e87a6e

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

ui/tests/smoke-test.spec.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { expect, test } from '@playwright/test';
2+
3+
test('test', async ({ page }) => {
4+
await page.goto('http://localhost:5173');
5+
await expect(
6+
page.getByRole('heading', { name: 'Sign in to your account' })
7+
).toBeVisible();
8+
await page.getByRole('textbox', { name: 'Username or email' }).click();
9+
await page.getByRole('textbox', { name: 'Username or email' }).fill('admin');
10+
await page.getByRole('textbox', { name: 'Username or email' }).press('Tab');
11+
await page.getByRole('textbox', { name: 'Password' }).fill('admin');
12+
await page.getByRole('button', { name: 'Sign In' }).click();
13+
await expect(
14+
page.getByText('Browse your organizations or create a new one')
15+
).toBeVisible();
16+
await expect(
17+
page.getByRole('link', { name: 'Add organization' })
18+
).toBeVisible();
19+
});

0 commit comments

Comments
 (0)