2025-05-30 04:35:02 +08:00
|
|
|
import { expect, test } from '@playwright/test';
|
2025-05-30 07:43:06 +08:00
|
|
|
import { BusterRoutes, createBusterRoute } from '@/routes';
|
2025-05-03 01:27:46 +08:00
|
|
|
|
|
|
|
const logsRoute = createBusterRoute({
|
|
|
|
route: BusterRoutes.APP_LOGS
|
|
|
|
});
|
|
|
|
|
2025-05-07 03:47:02 +08:00
|
|
|
test('Can navigate to a metric chart from the logs list', async ({ page }) => {
|
2025-05-03 01:27:46 +08:00
|
|
|
await page.goto('http://localhost:3000/app/home');
|
|
|
|
await page.getByRole('link', { name: 'Logs' }).click();
|
2025-05-07 03:47:02 +08:00
|
|
|
await page.waitForTimeout(1000);
|
|
|
|
await page.waitForSelector('text=Name', { timeout: 30000 });
|
|
|
|
await expect(page.getByText('Name', { exact: true })).toBeVisible({ timeout: 30000 });
|
2025-05-03 01:27:46 +08:00
|
|
|
|
|
|
|
await page.locator('.list-container').getByRole('link').first().click();
|
|
|
|
|
|
|
|
await page.waitForURL((url) => url.toString() !== logsRoute);
|
|
|
|
expect(page.url()).not.toEqual(logsRoute);
|
|
|
|
});
|