mirror of
https://github.com/plausible/analytics.git
synced 2024-12-24 18:12:44 +03:00
43bf7dd09f
* Use user-agent instead of screen_width to get device type Co-authored-by: eriknakata <erik.nakata5@gmail.com> * Fix credo * Log on unhandled UAInspector device type * Make 'browser' the default tab in devices report * Remove device tooltip * Remove screen_width from ingestion completely * Remove browserstack harness, run playwright directly * Select meta key based on OS platform * Run CI tests in parallel * Improve device match readability * Add changelog --------- Co-authored-by: eriknakata <erik.nakata5@gmail.com>
14 lines
511 B
JavaScript
14 lines
511 B
JavaScript
const { mockRequest } = require('./support/test-utils')
|
|
const { expect, test } = require('@playwright/test');
|
|
|
|
test.describe('Basic installation', () => {
|
|
test('Sends pageview automatically', async ({ page }) => {
|
|
const plausibleRequestMock = mockRequest(page, '/api/event')
|
|
await page.goto('/simple.html');
|
|
|
|
const plausibleRequest = await plausibleRequestMock;
|
|
expect(plausibleRequest.url()).toContain('/api/event')
|
|
expect(plausibleRequest.postDataJSON().n).toEqual('pageview')
|
|
});
|
|
});
|