mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-11-02 14:31:14 +00:00
Bulk rename across 989 files: - Package names: posthog-js → @hanzo/insights, posthog-node → @hanzo/insights-node, etc. - Repository URLs: posthog/posthog-js → hanzoai/insights-js - Brand names: PostHog → Insights - File renames: 259 reference JSON files, source files, workflow files - Directory rename: eslint-plugin-posthog-js → eslint-plugin-insights Remaining: 8 refs to @posthog/rrweb-* (real npm deps, need fork+publish)
28 lines
823 B
TypeScript
28 lines
823 B
TypeScript
import { expect, test, WindowWithInsights } from './utils/insights-playwright-test-base'
|
|
import { start } from './utils/setup'
|
|
|
|
const startOptions = {
|
|
options: {
|
|
session_recording: {},
|
|
},
|
|
flagsResponseOverrides: {
|
|
sessionRecording: {
|
|
endpoint: '/ses/',
|
|
},
|
|
capturePerformance: true,
|
|
},
|
|
url: '/playground/cypress-full/index.html',
|
|
}
|
|
|
|
test.describe('User Agent Blocking', () => {
|
|
test('should pick up that our automated playwright tests are indeed bot traffic', async ({ page, context }) => {
|
|
await start(startOptions, page, context)
|
|
|
|
const isLikelyBot = await page.evaluate(() => {
|
|
const ph = (window as WindowWithInsights).insights
|
|
return ph?._is_bot()
|
|
})
|
|
expect(isLikelyBot).toEqual(true)
|
|
})
|
|
})
|