test(e2e): admin creates two nodes via the UI
This commit is contained in:
25
frontend/tests/e2e/graph-flow.spec.ts
Normal file
25
frontend/tests/e2e/graph-flow.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test('admin creates a routing graph via the UI', async ({ page }) => {
|
||||
// login
|
||||
await page.goto('/login');
|
||||
await page.getByPlaceholder('Admin password').fill('hunter2');
|
||||
await page.getByRole('button', { name: /sign in/i }).click();
|
||||
await page.waitForURL(/^http:\/\/[^/]+\/$/);
|
||||
|
||||
// create first node
|
||||
await page.getByRole('button', { name: /add node/i }).click();
|
||||
await page.getByPlaceholder('Name', { exact: true }).fill('sender');
|
||||
await page.getByPlaceholder(/Stream name/i).fill('SENDER');
|
||||
await page.getByPlaceholder(/Subjects/i).fill('mail.inbox.test-sender.*');
|
||||
await page.getByRole('button', { name: /^create$/i }).click();
|
||||
await expect(page.getByText('SENDER')).toBeVisible({ timeout: 5000 });
|
||||
|
||||
// create second node
|
||||
await page.getByRole('button', { name: /add node/i }).click();
|
||||
await page.getByPlaceholder('Name', { exact: true }).fill('receiver');
|
||||
await page.getByPlaceholder(/Stream name/i).fill('RECEIVER');
|
||||
await page.getByPlaceholder(/Subjects/i).fill('mail.inbox.test-receiver.abcd');
|
||||
await page.getByRole('button', { name: /^create$/i }).click();
|
||||
await expect(page.getByText('RECEIVER')).toBeVisible({ timeout: 5000 });
|
||||
});
|
||||
Reference in New Issue
Block a user