Skip to content

Add bUnit tests for DatabaseToolsModal + tabs (deferred from PR #544) #545

@jschick04

Description

@jschick04

Deferred from PR #544 (Copilot review comment).

Scope

Add bUnit test coverage for DatabaseToolsModal and its tabs, matching the shape of the existing DebugLogModalTests.cs precedent. The modal currently has significant UI behavior with no unit tests:

  • Tab roving focus (Arrow/Home/End keys via the inline JS shim)
  • Async cancel-confirm flow when AnyTabIsRunning is true
  • [CascadingParameter] VerboseLogging propagation from modal to each tab
  • Log view rendering + auto-scroll pin tracking
  • Per-tab request-building and dispatch to IDatabaseToolsService

Suggested test cases (minimum)

  • Modal mounts; default active tab is Show Providers
  • Tab keydown (ArrowRight) switches _activeTab
  • Close attempt with AnyTabIsRunning=true shows cancel confirmation alert
  • Close attempt with AnyTabIsRunning=false closes immediately
  • VerboseLogging cascading parameter reaches each DatabaseToolsTabBase<T>
  • Each tab's BuildRequest() returns the expected record shape for valid inputs

Out of scope

  • Integration coverage exists in tests/Integration/EventLogExpert.DatabaseTools.IntegrationTests
  • Win32 file picker behavior (platform-specific)

Context

Copilot raised this as part of PR #544 review (round 18, comment T1). Deferred via G4 routed-deferred-with-tracker-and-ask_user so PR #544 (already through 18 rounds) can ship.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions