Add profiler
This commit is contained in:
@@ -275,6 +275,29 @@ test('manually unloads an inactive route through the public API demo', async ({
|
||||
await expect(page.getByTestId('stories-view')).toHaveCount(0)
|
||||
})
|
||||
|
||||
test('records a navigation frame profile across route changes', async ({ page }) => {
|
||||
await page.goto('/settings')
|
||||
await page.getByTestId('profile-start').click()
|
||||
await expect(page.locator('.profiler-badge')).toBeVisible()
|
||||
|
||||
await page.getByRole('button', { name: 'Back' }).click()
|
||||
await expect(page).toHaveURL(/\/profile$/)
|
||||
await waitForTransition(page)
|
||||
await page.getByRole('link', { name: /Runtime stress lab/ }).click()
|
||||
await expect(page).toHaveURL(/\/profile\/runtime-lab$/)
|
||||
await page.getByRole('link', { name: /You/ }).click()
|
||||
await expect(page).toHaveURL(/\/profile$/)
|
||||
await waitForTransition(page)
|
||||
await page.getByRole('link', { name: /Navigation lab/ }).click()
|
||||
await expect(page).toHaveURL(/\/settings$/)
|
||||
await waitForTransition(page)
|
||||
|
||||
await page.getByTestId('profile-stop').click()
|
||||
await expect(page.locator('.profiler-badge')).toHaveCount(0)
|
||||
await expect(page.getByTestId('profile-status')).toContainText('navigations')
|
||||
await expect(page.getByTestId('profile-export')).toBeEnabled()
|
||||
})
|
||||
|
||||
test('opens and dismisses the compose sheet', async ({ page }) => {
|
||||
await page.goto('/inbox')
|
||||
await page.getByRole('button', { name: 'Compose' }).click()
|
||||
|
||||
Reference in New Issue
Block a user