datalens-ui/tests/suites/dash/statistics/collectDashStats.test.ts
2026-06-24 21:10:34 +05:00

23 lines
821 B
TypeScript

import {Page} from '@playwright/test';
import {RobotChartsDashboardUrls} from '../../../utils/constants';
import datalensTest from '../../../utils/playwright/globalTestDefinition';
import {openTestPage} from '../../../utils';
const URLS = {
collectDashStats: '/gateway/root/mix/collectDashStats',
};
datalensTest.describe('Dashboards - Statistics', () => {
datalensTest('Dashboard statistics collection request sent', async ({page}: {page: Page}) => {
const responsePromise = page.waitForResponse((response) => {
const responseUrl = new URL(response.url());
return responseUrl.pathname === URLS.collectDashStats && response.ok();
});
await openTestPage(page, RobotChartsDashboardUrls.DashboardWithChartInnerControl);
await responsePromise;
});
});