:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import { MOCK_DEFAULT_PROJECT } from 'lib/api.mock'
import { router } from 'kea-router'
import { expectLogic } from 'kea-test-utils'
import { projectLogic } from 'scenes/projectLogic'
import { urls } from 'scenes/urls'
import { initKeaTests } from '~/test/init'
import { navigation3000Logic } from './navigationLogic'
describe('navigation3000Logic', () => {
it.each([
[false, 'full'],
[true, 'minimal'],
])('on my tickets, a project with is_pending_deletion=%s shows %s navigation', async (isPendingDeletion, mode) => {
initKeaTests()
router.actions.push(urls.myTickets())
projectLogic.mount()
const logic = navigation3000Logic()
logic.mount()
projectLogic.actions.loadCurrentProjectSuccess({
...MOCK_DEFAULT_PROJECT,
is_pending_deletion: isPendingDeletion,
})
await expectLogic(logic).toFinishAllListeners()
expect(logic.values.mode).toEqual(mode)
})
})