Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions apps/start/e2e/overview-siblings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,14 @@ for (const projectId of PROJECT_IDS) {
await page.setViewportSize({ width: 1440, height: 1000 });

await page.goto(`/acme/${projectId}/realtime`);
for (const title of [
'Unique visitors last 30 min',
'Geo',
'Referrals',
'Paths',
]) {
for (const title of ['Online now', 'Last 30 minutes', 'New sessions']) {
await expect(
page.getByText(title, { exact: true }).locator('visible=true').first()
).toBeVisible();
}
await expect(
page.getByRole('region', { name: 'Events', exact: true })
).toBeVisible();
await page.waitForLoadState('networkidle');
await page.waitForTimeout(2000);
await shot(page, `siblings-${projectId}-realtime`);
Expand Down Expand Up @@ -69,7 +67,9 @@ for (const projectId of PROJECT_IDS) {
await expect(
page.getByRole('heading', { name: 'Insights', level: 1 })
).toBeVisible();
await expect(page.getByPlaceholder('Search insights...')).toBeVisible();
await expect(
page.getByPlaceholder('Search insights', { exact: true })
).toBeVisible();
await page.waitForLoadState('networkidle');
await shot(page, `siblings-${projectId}-insights`);
await expect(page.locator('body')).not.toContainText(
Expand Down Expand Up @@ -129,25 +129,29 @@ test('insights: filters keep their state in the URL and the empty state is shown
page.getByRole('heading', { name: 'Insights', level: 1 })
).toBeVisible();
await page.waitForLoadState('networkidle');
await page.getByPlaceholder('Search insights...').fill('google');
await page
.getByPlaceholder('Search insights', { exact: true })
.fill('google');
await expect(page).toHaveURL(/search=google/);
for (const [trigger, option] of [
['All Windows', '7 Days'],
['All Severity', 'Severe'],
['All Directions', 'Increasing'],
['Time window', '7 days'],
['Severity', 'Severe'],
['Direction', 'Increasing'],
] as const) {
await page
.getByRole('combobox')
.filter({ hasText: new RegExp(trigger, 'i') })
.getByRole('button', { name: new RegExp(`^${trigger}:`) })
.click();
await page.getByRole('option', { name: option, exact: true }).click();
await page.getByRole('menuitem', { name: option, exact: true }).click();
}
await expect(page).toHaveURL(/window=rolling_7d/);
await expect(page).toHaveURL(/severity=severe/);
await expect(page).toHaveURL(/direction=up/);
await shot(page, 'siblings-insights-filtered', false);
const url = page.url();
await page.reload();
await expect(page.getByPlaceholder('Search insights...')).toHaveValue(
'google'
);
await expect(
page.getByPlaceholder('Search insights', { exact: true })
).toHaveValue('google');
expect(new URL(page.url()).search).toBe(new URL(url).search);
});

Expand Down
27 changes: 10 additions & 17 deletions apps/start/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -531,26 +531,19 @@ button {
}

@theme inline {
--color-chart-1: var(----chart-1);
--color-chart-2: var(----chart-2);
--color-chart-3: var(----chart-3);
--color-chart-4: var(----chart-4);
--color-chart-5: var(----chart-5);
--color-chart-background: var(----chart-background);
--color-chart-foreground: var(----chart-foreground);
--color-chart-foreground-muted: var(----chart-foreground-muted);
--chart-line-primary: var(----chart-line-primary);
--chart-line-secondary: var(----chart-line-secondary);
--color-chart-crosshair: var(----chart-crosshair);
--color-chart-grid: var(----chart-grid);
--color-chart-background: var(--chart-background);
--color-chart-foreground: var(--chart-foreground);
--color-chart-foreground-muted: var(--chart-foreground-muted);
--color-chart-crosshair: var(--chart-crosshair);
--color-chart-grid: var(--chart-grid);
--color-chart-tooltip-background: var(--chart-tooltip-background);
--color-chart-tooltip-foreground: var(--chart-tooltip-foreground);
--color-chart-tooltip-muted: var(--chart-tooltip-muted);
--color-chart-marker-background: var(----chart-marker-background);
--color-chart-marker-border: var(----chart-marker-border);
--color-chart-marker-foreground: var(----chart-marker-foreground);
--color-chart-ring-background: var(----chart-ring-background);
--color-chart-label: var(----chart-label);
--color-chart-marker-background: var(--chart-marker-background);
--color-chart-marker-border: var(--chart-marker-border);
--color-chart-marker-foreground: var(--chart-marker-foreground);
--color-chart-ring-background: var(--chart-ring-background);
--color-chart-label: var(--chart-label);
}

/* Dashboard grid: only tiles making room animate; the one under the pointer
Expand Down
Loading