test(e2e): admin creates two nodes via the UI

This commit is contained in:
VolcanicCore
2026-08-27 13:19:55 +00:00
parent 55adec643e
commit f6328b17f3

View 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 });
});