import { render, screen } from '@testing-library/react'
import { ConsoleAnalyticsRuntime } from '../console-analytics-runtime'
import { WebAppAnalyticsRuntime } from '../web-app-analytics-runtime'
vi.mock('../cookieyes-consent-bridge', () => ({
CookieYesConsentBridge: () => ,
}))
vi.mock('@/app/components/base/amplitude', () => ({
default: () => ,
}))
vi.mock('@/app/components/base/amplitude/WebAppAmplitudeProvider', () => ({
WebAppAmplitudeProvider: () => ,
}))
vi.mock('@/app/components/base/amplitude/registration-consent-coordinator', () => ({
RegistrationConsentCoordinator: () => ,
}))
vi.mock('@/app/components/external-attribution-recorder', () => ({
default: () => ,
}))
describe('analytics runtimes', () => {
it('mounts full analytics consumers for the console', () => {
render()
expect(screen.getByTestId('cookieyes-consent-bridge')).toBeInTheDocument()
expect(screen.getByTestId('console-amplitude-provider')).toBeInTheDocument()
expect(screen.getByTestId('registration-consent-coordinator')).toBeInTheDocument()
expect(screen.getByTestId('external-attribution-recorder')).toBeInTheDocument()
expect(screen.queryByTestId('web-app-amplitude-provider')).toBeNull()
})
it('mounts only consent and custom-event Amplitude for WebApps', () => {
render()
expect(screen.getByTestId('cookieyes-consent-bridge')).toBeInTheDocument()
expect(screen.getByTestId('web-app-amplitude-provider')).toBeInTheDocument()
expect(screen.queryByTestId('console-amplitude-provider')).toBeNull()
expect(screen.queryByTestId('registration-consent-coordinator')).toBeNull()
expect(screen.queryByTestId('external-attribution-recorder')).toBeNull()
})
})