Skip to content

Commit

Permalink
✨ add diagnostic test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-lebeau committed Dec 3, 2024
1 parent 4ffe796 commit 24bdb10
Show file tree
Hide file tree
Showing 9 changed files with 38,805 additions and 2 deletions.
10 changes: 10 additions & 0 deletions developer-extension/src/common/extension.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ export type BackgroundToDevtoolsMessage = {
message: SdkMessage
}

export type BackgroundTestResult = {
id: string
name: string
status: 'running' | 'passed' | 'failed'
}

export type DevtoolsToBackgroundMessage = {
type: 'update-net-request-rules'
options: NetRequestRulesOptions
Expand Down Expand Up @@ -42,6 +48,10 @@ export type SdkMessage =
segment: BrowserSegmentMetadata
}
}
| {
type: 'test-result'
payload: BackgroundTestResult
}

export type EventCollectionStrategy = 'sdk' | 'requests'

Expand Down
3 changes: 2 additions & 1 deletion developer-extension/src/common/panelTabConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const enum PanelTabs {
Infos = 'infos',
Settings = 'settings',
Replay = 'replay',
Dignostics = 'diagnostics',
}

export const DEFAULT_PANEL_TAB = PanelTabs.Events
export const DEFAULT_PANEL_TAB = PanelTabs.Dignostics
2 changes: 1 addition & 1 deletion developer-extension/src/content-scripts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ declare global {
type SdkPublicApi = { [key: string]: (...args: any[]) => unknown }

function main() {
// Prevent multiple executions when the devetools are reconnecting
// Prevent multiple executions when the devtools are reconnecting
if (window.__ddBrowserSdkExtensionCallback) {
return
}
Expand Down
5 changes: 5 additions & 0 deletions developer-extension/src/panel/components/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { SettingsTab } from './tabs/settingsTab'
import { InfosTab } from './tabs/infosTab'
import { EventsTab, DEFAULT_COLUMNS } from './tabs/eventsTab'
import { ReplayTab } from './tabs/replayTab'
import { DiagnosticTab } from './tabs/diagnosticTab'

import * as classes from './panel.module.css'

Expand Down Expand Up @@ -65,6 +66,7 @@ export function Panel() {
>
Settings
</Tabs.Tab>
<Tabs.Tab value={PanelTabs.Dignostics}>Disgnostic</Tabs.Tab>
</div>
<Anchor
className={classes.link}
Expand Down Expand Up @@ -95,6 +97,9 @@ export function Panel() {
<Tabs.Panel value={PanelTabs.Settings} className={classes.tab}>
<SettingsTab />
</Tabs.Panel>
<Tabs.Panel value={PanelTabs.Dignostics} className={classes.tab}>
<DiagnosticTab />
</Tabs.Panel>
</Tabs>
)
}
Expand Down
Loading

0 comments on commit 24bdb10

Please sign in to comment.