-
-
Notifications
You must be signed in to change notification settings - Fork 14
docs(qa): canonical user-story tracker and dialog landmarks #577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
032dcf5
docs(qa): add canonical user-story tracker and dialog landmarks
adamgell 9619578
fix(log): apply cached tab snapshot before folder restore
adamgell 5d74650
fix(qa): align tracker and File Open IME/dsregcmd paths
adamgell 58332b7
fix(qa): close CodeRabbit typecheck and tab-switch gaps
adamgell e06fc81
fix(timeline): keep empty folder opens as a no-op
adamgell 67e3d3f
fix(qa): close CodeRabbit review gaps for tracker
adamgell edf71c0
test: isolate SecureBoot platform fixture
adamgell 14da6cf
fix: close PR 577 review regressions
adamgell e8eaa1d
fix: close async source loading races
adamgell 87074a4
fix: isolate dropped path failures and stale restores
adamgell b1a06a5
fix: harden IPC responses and stale source loads
adamgell 8d4b4b9
test: stabilize remaining PR 577 fixtures
adamgell 6180f42
fix: validate every frontend command response
adamgell 28352ae
fix: align E2E association status fixture
adamgell dff078a
fix: keep workspace decoder IDs exhaustive
adamgell f2ef5b1
fix: derive IPC responses from decoder registry
adamgell 0aaa618
fix: harden workspace source loading
adamgell 306f8cc
fix: preserve stale source load semantics
adamgell 932857e
fix: close review gaps in source loading and timeline actions
adamgell 16fc8ad
fix: reset replacement and progress ownership synchronously
adamgell 4262a77
fix: close remaining review findings
adamgell 51f2aef
fix: propagate event log parse failures
adamgell c9e7331
fix: close remaining review findings
adamgell 6e584ef
test: close PR 577 review gaps
adamgell 6737f27
test: close remaining PR 577 review gaps
adamgell 75b0ea3
fix: close remaining PR 577 review gaps
adamgell 329fdcc
fix: close remaining PR 577 review gaps
adamgell b427fa9
test: close remaining PR 577 review gaps
adamgell de71d85
fix: close remaining PR 577 review gaps
adamgell 65a3504
fix: cover keyboard and selection review gaps
adamgell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
140 changes: 140 additions & 0 deletions
140
src/components/dialogs/CollectDiagnosticsDialog.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| import { cleanup, fireEvent, render, screen } from "@testing-library/react"; | ||
| import { afterEach, describe, expect, it, vi } from "vitest"; | ||
| import { CollectDiagnosticsDialog } from "./CollectDiagnosticsDialog"; | ||
| import { CollectionCompleteDialog } from "./CollectionCompleteDialog"; | ||
| import { useUiStore } from "../../stores/ui-store"; | ||
| import { COLLECTION_PRESETS } from "../../lib/collection-categories"; | ||
|
|
||
| const collectDiagnostics = vi.hoisted(() => vi.fn()); | ||
|
|
||
| vi.mock("../../lib/commands", () => ({ | ||
| collectDiagnostics, | ||
| })); | ||
|
|
||
| vi.mock("../../lib/log-source", () => ({ | ||
| loadPathAsLogSource: vi.fn(), | ||
| })); | ||
|
|
||
| describe("CollectDiagnosticsDialog", () => { | ||
| afterEach(() => { | ||
| cleanup(); | ||
| useUiStore.setState({ collectionProgress: null, collectionResult: null }); | ||
| }); | ||
|
|
||
| it("exposes a dialog landmark when open", () => { | ||
| render(<CollectDiagnosticsDialog isOpen onClose={() => {}} />); | ||
| const dialog = screen.getByRole("dialog", { name: "Collect Diagnostics" }); | ||
| expect(dialog).toHaveAttribute("aria-modal", "true"); | ||
| }); | ||
|
|
||
| it("shows presets, category checkboxes, and starts collection", async () => { | ||
| collectDiagnostics.mockResolvedValue({ | ||
| bundlePath: "C:/Users/Public/cmtrace-bundle", | ||
| bundleId: "bundle-1", | ||
| artifactCounts: { collected: 4, missing: 1, failed: 0, total: 5 }, | ||
| durationMs: 1200, | ||
| gaps: [{ artifactId: "cbs", category: "general", reason: "not present" }], | ||
| }); | ||
| const onClose = vi.fn(); | ||
| render(<CollectDiagnosticsDialog isOpen onClose={onClose} />); | ||
|
|
||
| expect(screen.getByText("Collect Diagnostics")).toBeInTheDocument(); | ||
| expect(screen.getByText("Quick Presets")).toBeInTheDocument(); | ||
| for (const preset of COLLECTION_PRESETS) { | ||
| expect(screen.getByRole("button", { name: preset.label })).toBeInTheDocument(); | ||
| } | ||
| expect(screen.getByText("Intune & MDM")).toBeInTheDocument(); | ||
| expect(screen.getByText("Autopilot & Provisioning")).toBeInTheDocument(); | ||
|
|
||
| fireEvent.click(screen.getByRole("button", { name: "Intune + Autopilot" })); | ||
| fireEvent.click(screen.getByRole("button", { name: "Collect" })); | ||
| expect(onClose).toHaveBeenCalled(); | ||
| expect(collectDiagnostics).toHaveBeenCalled(); | ||
| }); | ||
| }); | ||
|
|
||
| describe("CollectionCompleteDialog", () => { | ||
| afterEach(() => { | ||
| cleanup(); | ||
| }); | ||
|
|
||
| it("exposes a dialog landmark when complete", () => { | ||
| render( | ||
| <CollectionCompleteDialog | ||
| onClose={() => {}} | ||
| result={{ | ||
| bundlePath: "C:/Users/Public/cmtrace-bundle", | ||
| bundleId: "bundle-1", | ||
| artifactCounts: { collected: 4, missing: 1, failed: 0, total: 5 }, | ||
| durationMs: 1500, | ||
| gaps: [], | ||
| }} | ||
| />, | ||
| ); | ||
| const dialog = screen.getByRole("dialog", { name: "Collection Complete" }); | ||
| expect(dialog).toHaveAttribute("aria-modal", "true"); | ||
| }); | ||
|
|
||
| it("traps focus and restores the opener when closed", () => { | ||
| const opener = document.createElement("button"); | ||
| document.body.appendChild(opener); | ||
| opener.focus(); | ||
|
|
||
| const rendered = render( | ||
| <CollectionCompleteDialog | ||
| onClose={() => {}} | ||
| result={{ | ||
| bundlePath: "C:/Users/Public/cmtrace-bundle", | ||
| bundleId: "bundle-1", | ||
| artifactCounts: { collected: 1, missing: 0, failed: 0, total: 1 }, | ||
| durationMs: 100, | ||
| gaps: [], | ||
| }} | ||
| />, | ||
| ); | ||
| const dialog = screen.getByRole("dialog", { name: "Collection Complete" }); | ||
| const close = screen.getByRole("button", { name: "Close" }); | ||
| const openBundle = screen.getByRole("button", { name: "Open Bundle" }); | ||
|
|
||
| expect(dialog.contains(document.activeElement)).toBe(true); | ||
| expect(document.activeElement).toBe(close); | ||
|
|
||
| openBundle.focus(); | ||
| fireEvent.keyDown(window, { key: "Tab" }); | ||
| expect(document.activeElement).toBe(close); | ||
| fireEvent.keyDown(window, { key: "Tab", shiftKey: true }); | ||
| expect(document.activeElement).toBe(openBundle); | ||
|
|
||
| opener.focus(); | ||
| fireEvent.keyDown(window, { key: "Tab" }); | ||
| expect(document.activeElement).toBe(close); | ||
|
|
||
| rendered.rerender(<CollectionCompleteDialog onClose={() => {}} result={null} />); | ||
| expect(document.activeElement).toBe(opener); | ||
| opener.remove(); | ||
| }); | ||
|
|
||
| it("shows counts, gaps, Close, and Open Bundle", () => { | ||
| const onClose = vi.fn(); | ||
| render( | ||
| <CollectionCompleteDialog | ||
| onClose={onClose} | ||
| result={{ | ||
| bundlePath: "C:/Users/Public/cmtrace-bundle", | ||
| bundleId: "bundle-1", | ||
| artifactCounts: { collected: 4, missing: 1, failed: 0, total: 5 }, | ||
| durationMs: 1500, | ||
| gaps: [{ artifactId: "cbs", category: "general", reason: "CBS.log not present" }], | ||
| }} | ||
| />, | ||
| ); | ||
| expect(screen.getByText("Collection Complete")).toBeInTheDocument(); | ||
| expect(screen.getByText("Collected")).toBeInTheDocument(); | ||
| expect(screen.getByText("Missing")).toBeInTheDocument(); | ||
| expect(screen.getByText("Failed")).toBeInTheDocument(); | ||
| fireEvent.click(screen.getByRole("button", { name: /Show 1 missing/i })); | ||
| expect(screen.getByText(/CBS.log not present/)).toBeInTheDocument(); | ||
| expect(screen.getByRole("button", { name: "Close" })).toBeInTheDocument(); | ||
| expect(screen.getByRole("button", { name: "Open Bundle" })).toBeInTheDocument(); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.