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
10 changes: 6 additions & 4 deletions e2e/tests/dashboard/behaviours.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ test('goals breakdown', async ({ page, request }) => {
scrollPercentage: 75
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const goalsTabButton = tabButton(report, 'Goals')

Expand Down Expand Up @@ -186,7 +186,9 @@ test('goals breakdown', async ({ page, request }) => {
})

await test.step('listing goals without revenue', async () => {
await page.goto('/' + domain + '?f=has_not_done,goal,purchase')
await page.goto('/' + domain + '?f=has_not_done,goal,purchase', {
waitUntil: 'commit'
})

await goalsTabButton.scrollIntoViewIfNeeded()
await expect(goalsTabButton).toHaveAttribute('data-active', 'true')
Expand Down Expand Up @@ -286,7 +288,7 @@ test('props breakdown', async ({ page, request }) => {

await addAllCustomProps({ page, domain })

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const propsTabButton = tabButton(report, 'Properties')

Expand Down Expand Up @@ -427,7 +429,7 @@ test('funnels', async ({ page, request }) => {
})
}

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const funnelsTabButton = tabButton(report, 'Funnels')

Expand Down
18 changes: 11 additions & 7 deletions e2e/tests/dashboard/breakdowns.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test('sources breakdown', async ({ page, request }) => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const report = page.getByTestId('report-sources')

Expand Down Expand Up @@ -409,7 +409,7 @@ test('pages breakdown', async ({ page, request }) => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const report = page.getByTestId('report-pages')

Expand Down Expand Up @@ -523,7 +523,7 @@ test('pages breakdown modal', async ({ page, request }) => {
events: pageEvents
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const report = page.getByTestId('report-pages')

Expand Down Expand Up @@ -683,7 +683,9 @@ test('pages breakdown with a pageview goal filter applied', async ({
const report = page.getByTestId('report-pages')

await test.step('custom goal filter applied', async () => {
await page.goto('/' + domain + '?f=is,goal,create_site')
await page.goto('/' + domain + '?f=is,goal,create_site', {
waitUntil: 'commit'
})

const pagesTabButton = tabButton(report, 'Conversion pages')
await pagesTabButton.scrollIntoViewIfNeeded()
Expand Down Expand Up @@ -718,7 +720,9 @@ test('pages breakdown with a pageview goal filter applied', async ({
})

await test.step('revenue goal filter applied', async () => {
await page.goto('/' + domain + '?f=is,goal,purchase')
await page.goto('/' + domain + '?f=is,goal,purchase', {
waitUntil: 'commit'
})

const pagesTabButton = tabButton(report, 'Conversion pages')
await pagesTabButton.scrollIntoViewIfNeeded()
Expand Down Expand Up @@ -789,7 +793,7 @@ test('locations breakdown', async ({ page, request }) => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const report = page.getByTestId('report-locations')

Expand Down Expand Up @@ -950,7 +954,7 @@ test('devices breakdown', async ({ page, request }) => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const report = page.getByTestId('report-devices')

Expand Down
26 changes: 13 additions & 13 deletions e2e/tests/dashboard/filtering.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test.describe('page filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const pageFilterRow = filterRow(page, 'page')
const pageInput = page.getByPlaceholder('Select a Page')
Expand Down Expand Up @@ -84,7 +84,7 @@ test.describe('page filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const pageFilterRow = filterRow(page, 'page')
const pageInput = page.getByPlaceholder('Select a Page')
Expand Down Expand Up @@ -199,7 +199,7 @@ test.describe('page filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const entryPageFilterRow = filterRow(page, 'entry_page')
const entryPageInput = page.getByPlaceholder('Select an Entry Page')
Expand Down Expand Up @@ -236,7 +236,7 @@ test.describe('page filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const exitPageFilterRow = filterRow(page, 'exit_page')
const exitPageInput = page.getByPlaceholder('Select an Exit Page')
Expand Down Expand Up @@ -273,7 +273,7 @@ test.describe('hostname filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const hostnameFilterRow = filterRow(page, 'hostname')
const hostnameInput = page.getByPlaceholder('Select a Hostname')
Expand Down Expand Up @@ -310,7 +310,7 @@ test.describe('acquisition filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await test.step('filtering by source', async () => {
const sourceFilterRow = filterRow(page, 'source')
Expand Down Expand Up @@ -415,7 +415,7 @@ test.describe('acquisition filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await test.step('filtering by UTM medium', async () => {
const utmMediumFilterRow = filterRow(page, 'utm_medium')
Expand Down Expand Up @@ -574,7 +574,7 @@ test.describe('location filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await test.step('filtering by country', async () => {
const countryFilterRow = filterRow(page, 'country')
Expand Down Expand Up @@ -658,7 +658,7 @@ test.describe('screen size filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const screenSizeFilterRow = filterRow(page, 'screen')
const screenSizeInput = page.getByPlaceholder('Select a Screen size')
Expand Down Expand Up @@ -698,7 +698,7 @@ test.describe('browser filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await test.step('filtering by browser type', async () => {
const browserFilterRow = filterRow(page, 'browser')
Expand Down Expand Up @@ -769,7 +769,7 @@ test.describe('operating system filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await test.step('filtering by operating system type', async () => {
const operatingSystemFilterRow = filterRow(page, 'os')
Expand Down Expand Up @@ -840,7 +840,7 @@ test.describe('goal filtering tests', () => {
await addPageviewGoal({ page, domain, pathname: '/page1' })
await addPageviewGoal({ page, domain, pathname: '/page2' })

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const goalFilterRow = filterRow(page, 'goal')
const goalInput = goalFilterRow.getByPlaceholder('Select a Goal')
Expand Down Expand Up @@ -915,7 +915,7 @@ test.describe('property filtering tests', () => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

const propFilterRow = filterRow(page, 'props')
const propNameInput = propFilterRow.getByPlaceholder('Property')
Expand Down
18 changes: 9 additions & 9 deletions e2e/tests/dashboard/general.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test('dashboard renders for logged in user', async ({ page, request }) => {
const { domain } = await setupSite({ page, request })
await populateStats({ request, domain, events: [{ name: 'pageview' }] })

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await expect(page).toHaveTitle(/Plausible/)

Expand All @@ -24,7 +24,7 @@ test('dashboard renders for anonymous viewer', async ({ page, request }) => {
await populateStats({ request, domain, events: [{ name: 'pageview' }] })
await logout(page)

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await expect(page).toHaveTitle(/Plausible/)

Expand All @@ -44,15 +44,15 @@ test('dashboard renders via shared link', async ({ page, request }) => {
await logout(page)

await test.step('public link', async () => {
await page.goto(link)
await page.goto(link, { waitUntil: 'commit' })

await expect(page.getByRole('button', { name: domain })).toBeVisible()

await expect(page.locator('#visitors')).toHaveText('1')
})

await test.step('password protected link', async () => {
await page.goto(passwordLink)
await page.goto(passwordLink, { waitUntil: 'commit' })

await page.locator('input#password').fill('secret')

Expand Down Expand Up @@ -81,7 +81,7 @@ test('dashboard renders with imported data', async ({ page, request }) => {
]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await test.step('with imported data included', async () => {
await expect(page.locator('#visitors')).toHaveText('4')
Expand Down Expand Up @@ -109,11 +109,11 @@ test('tab selection user preferences are preserved across reloads', async ({
const { domain } = await setupSite({ page, request })
await populateStats({ request, domain, events: [{ name: 'pageview' }] })

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await page.getByRole('button', { name: 'Entry pages' }).click()

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

let currentTab = await page.evaluate(
(domain) => localStorage.getItem('pageTab__' + domain),
Expand All @@ -124,7 +124,7 @@ test('tab selection user preferences are preserved across reloads', async ({

await page.getByRole('button', { name: 'Exit pages' }).click()

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

currentTab = await page.evaluate(
(domain) => localStorage.getItem('pageTab__' + domain),
Expand All @@ -142,7 +142,7 @@ test('back navigation closes the modal', async ({ page, request, baseURL }) => {
events: [{ name: 'pageview' }]
})

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await page.getByRole('button', { name: 'Filter' }).click()

Expand Down
12 changes: 6 additions & 6 deletions e2e/tests/dashboard/segments.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const createPersonalSegment = async (page: Page, name: string) => {
test('saving a segment', async ({ page, request }) => {
const { domain } = await setupSiteAndStats({ page, request })

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await test.step('creating personal segment using defaults', async () => {
await addSourceFilter(page, 'Facebook')
Expand Down Expand Up @@ -220,7 +220,7 @@ test('creating a segment from a combination of segment and a filter is not allow
}) => {
const { domain } = await setupSiteAndStats({ page, request })

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await addSourceFilter(page, 'Google')
await createPersonalSegment(page, 'Traffic from Google')
Expand Down Expand Up @@ -249,7 +249,7 @@ test('creating a segment from a combination of segment and a filter is not allow
test('editing an existing segment', async ({ page, request }) => {
const { domain } = await setupSiteAndStats({ page, request })

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await addSourceFilter(page, 'Google')
await createPersonalSegment(page, 'Traffic from Google')
Expand Down Expand Up @@ -294,7 +294,7 @@ test('editing an existing segment', async ({ page, request }) => {
test('saving edited segment as new', async ({ page, request }) => {
const { domain } = await setupSiteAndStats({ page, request })

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await addSourceFilter(page, 'Google')
await createPersonalSegment(page, 'Traffic from Google')
Expand Down Expand Up @@ -348,7 +348,7 @@ test('saving edited segment as new', async ({ page, request }) => {
test('deleting segment', async ({ page, request }) => {
const { domain } = await setupSiteAndStats({ page, request })

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await addSourceFilter(page, 'Google')
await createPersonalSegment(page, 'Traffic from Google')
Expand Down Expand Up @@ -377,7 +377,7 @@ test('deleting segment', async ({ page, request }) => {
test('closing edited segment without saving', async ({ page, request }) => {
const { domain } = await setupSiteAndStats({ page, request })

await page.goto('/' + domain)
await page.goto('/' + domain, { waitUntil: 'commit' })

await addSourceFilter(page, 'Google')
await createPersonalSegment(page, 'Traffic from Google')
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/dashboard/team-setup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test('submitting team name via Enter key does not crash', async ({
request
}) => {
await setupSite({ page, request })
await page.goto('/team/setup')
await page.goto('/team/setup', { waitUntil: 'commit' })

await expectLiveViewConnected(page)

Expand Down
Loading
Loading