@bbearai/core 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +248 -2
- package/dist/index.d.ts +248 -2
- package/dist/index.js +536 -0
- package/dist/index.mjs +536 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -161,6 +161,15 @@ interface BugBearTheme {
|
|
|
161
161
|
}
|
|
162
162
|
type TestTemplate = 'steps' | 'checklist' | 'rubric' | 'freeform';
|
|
163
163
|
type RubricMode = 'pass_fail' | 'rating';
|
|
164
|
+
/** Skip reason for skipped test assignments */
|
|
165
|
+
type SkipReason = 'blocked' | 'not_ready' | 'dependency' | 'other';
|
|
166
|
+
/** Test group (folder) for organizing test cases */
|
|
167
|
+
interface TestGroup {
|
|
168
|
+
id: string;
|
|
169
|
+
name: string;
|
|
170
|
+
description?: string;
|
|
171
|
+
sortOrder: number;
|
|
172
|
+
}
|
|
164
173
|
interface QATrack {
|
|
165
174
|
id: string;
|
|
166
175
|
name: string;
|
|
@@ -184,8 +193,20 @@ interface TestAssignment {
|
|
|
184
193
|
/** Route/screen to navigate to when starting this test */
|
|
185
194
|
targetRoute?: string;
|
|
186
195
|
track?: QATrack;
|
|
196
|
+
/** Test group (folder) this test belongs to */
|
|
197
|
+
group?: TestGroup;
|
|
187
198
|
};
|
|
188
|
-
status: 'pending' | 'in_progress' | 'passed' | 'failed' | 'blocked';
|
|
199
|
+
status: 'pending' | 'in_progress' | 'passed' | 'failed' | 'blocked' | 'skipped';
|
|
200
|
+
/** Reason for skipping (when status is 'skipped') */
|
|
201
|
+
skipReason?: SkipReason;
|
|
202
|
+
/** When the assignment was started (set to in_progress) */
|
|
203
|
+
startedAt?: string;
|
|
204
|
+
/** Duration in seconds (calculated when completed) */
|
|
205
|
+
durationSeconds?: number;
|
|
206
|
+
/** Whether this is a verification assignment for a fixed bug */
|
|
207
|
+
isVerification?: boolean;
|
|
208
|
+
/** Original report ID if this is a verification assignment */
|
|
209
|
+
originalReportId?: string;
|
|
189
210
|
}
|
|
190
211
|
interface TestStep {
|
|
191
212
|
stepNumber: number;
|
|
@@ -213,6 +234,37 @@ interface TestResult {
|
|
|
213
234
|
/** Overall notes */
|
|
214
235
|
notes?: string;
|
|
215
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* Feedback from testers about a test case
|
|
239
|
+
* Helps improve test quality over time
|
|
240
|
+
*/
|
|
241
|
+
interface TestFeedback {
|
|
242
|
+
/** Overall rating (1-5 stars) */
|
|
243
|
+
rating: 1 | 2 | 3 | 4 | 5;
|
|
244
|
+
/** Optional detailed ratings */
|
|
245
|
+
clarityRating?: 1 | 2 | 3 | 4 | 5;
|
|
246
|
+
stepsRating?: 1 | 2 | 3 | 4 | 5;
|
|
247
|
+
relevanceRating?: 1 | 2 | 3 | 4 | 5;
|
|
248
|
+
/** Free-form feedback note */
|
|
249
|
+
feedbackNote?: string;
|
|
250
|
+
/** Specific improvement suggestion */
|
|
251
|
+
suggestedImprovement?: string;
|
|
252
|
+
/** Quick feedback flags */
|
|
253
|
+
isOutdated?: boolean;
|
|
254
|
+
needsMoreDetail?: boolean;
|
|
255
|
+
stepsUnclear?: boolean;
|
|
256
|
+
expectedResultUnclear?: boolean;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Options for submitting test feedback
|
|
260
|
+
*/
|
|
261
|
+
interface SubmitFeedbackOptions {
|
|
262
|
+
testCaseId: string;
|
|
263
|
+
assignmentId?: string;
|
|
264
|
+
feedback: TestFeedback;
|
|
265
|
+
/** Time taken to complete in seconds */
|
|
266
|
+
timeToCompleteSeconds?: number;
|
|
267
|
+
}
|
|
216
268
|
interface TesterInfo {
|
|
217
269
|
id: string;
|
|
218
270
|
name: string;
|
|
@@ -442,6 +494,92 @@ interface CoverageMatrixRow {
|
|
|
442
494
|
lastTestedAt: string | null;
|
|
443
495
|
tracks: Record<string, CoverageMatrixCell>;
|
|
444
496
|
}
|
|
497
|
+
/** Session status */
|
|
498
|
+
type QASessionStatus = 'active' | 'paused' | 'completed' | 'abandoned';
|
|
499
|
+
/** Finding type - lighter than a bug report */
|
|
500
|
+
type FindingType = 'bug' | 'concern' | 'suggestion' | 'question';
|
|
501
|
+
/** Finding severity - includes observation for non-issues */
|
|
502
|
+
type FindingSeverity = 'critical' | 'high' | 'medium' | 'low' | 'observation';
|
|
503
|
+
/** QA Session - exploratory testing session */
|
|
504
|
+
interface QASession {
|
|
505
|
+
id: string;
|
|
506
|
+
projectId: string;
|
|
507
|
+
testerId: string;
|
|
508
|
+
/** Area being explored */
|
|
509
|
+
focusArea?: string;
|
|
510
|
+
/** QA track focus */
|
|
511
|
+
track?: string;
|
|
512
|
+
/** Platform being tested */
|
|
513
|
+
platform?: string;
|
|
514
|
+
/** Timing */
|
|
515
|
+
startedAt: string;
|
|
516
|
+
endedAt?: string;
|
|
517
|
+
/** Session notes */
|
|
518
|
+
notes?: string;
|
|
519
|
+
/** Routes visited during session */
|
|
520
|
+
routesCovered: string[];
|
|
521
|
+
/** Status */
|
|
522
|
+
status: QASessionStatus;
|
|
523
|
+
/** Metrics */
|
|
524
|
+
durationMinutes?: number;
|
|
525
|
+
findingsCount: number;
|
|
526
|
+
bugsFiled: number;
|
|
527
|
+
createdAt: string;
|
|
528
|
+
updatedAt: string;
|
|
529
|
+
}
|
|
530
|
+
/** QA Finding - quick observation during a session */
|
|
531
|
+
interface QAFinding {
|
|
532
|
+
id: string;
|
|
533
|
+
sessionId: string;
|
|
534
|
+
projectId: string;
|
|
535
|
+
/** Type of finding */
|
|
536
|
+
type: FindingType;
|
|
537
|
+
/** Severity level */
|
|
538
|
+
severity: FindingSeverity;
|
|
539
|
+
/** Content */
|
|
540
|
+
title: string;
|
|
541
|
+
description?: string;
|
|
542
|
+
/** Context (auto-captured) */
|
|
543
|
+
route?: string;
|
|
544
|
+
screenshotUrl?: string;
|
|
545
|
+
consoleLogs?: ConsoleLogEntry[];
|
|
546
|
+
networkSnapshot?: NetworkRequest[];
|
|
547
|
+
deviceInfo?: DeviceInfo;
|
|
548
|
+
appContext?: AppContext;
|
|
549
|
+
/** Conversion tracking */
|
|
550
|
+
convertedToBugId?: string;
|
|
551
|
+
convertedToTestId?: string;
|
|
552
|
+
/** Dismissal */
|
|
553
|
+
dismissed: boolean;
|
|
554
|
+
dismissedReason?: string;
|
|
555
|
+
dismissedAt?: string;
|
|
556
|
+
createdAt: string;
|
|
557
|
+
updatedAt: string;
|
|
558
|
+
}
|
|
559
|
+
/** Options for starting a QA session */
|
|
560
|
+
interface StartSessionOptions {
|
|
561
|
+
focusArea?: string;
|
|
562
|
+
track?: string;
|
|
563
|
+
platform?: string;
|
|
564
|
+
}
|
|
565
|
+
/** Options for ending a QA session */
|
|
566
|
+
interface EndSessionOptions {
|
|
567
|
+
notes?: string;
|
|
568
|
+
routesCovered?: string[];
|
|
569
|
+
}
|
|
570
|
+
/** Options for adding a finding */
|
|
571
|
+
interface AddFindingOptions {
|
|
572
|
+
type: FindingType;
|
|
573
|
+
title: string;
|
|
574
|
+
description?: string;
|
|
575
|
+
severity?: FindingSeverity;
|
|
576
|
+
route?: string;
|
|
577
|
+
screenshotUrl?: string;
|
|
578
|
+
consoleLogs?: ConsoleLogEntry[];
|
|
579
|
+
networkSnapshot?: NetworkRequest[];
|
|
580
|
+
deviceInfo?: DeviceInfo;
|
|
581
|
+
appContext?: AppContext;
|
|
582
|
+
}
|
|
445
583
|
|
|
446
584
|
/**
|
|
447
585
|
* BugBear Client
|
|
@@ -480,6 +618,51 @@ declare class BugBearClient {
|
|
|
480
618
|
* First looks up the tester by email, then fetches their assignments
|
|
481
619
|
*/
|
|
482
620
|
getAssignedTests(): Promise<TestAssignment[]>;
|
|
621
|
+
/**
|
|
622
|
+
* Get assignment by ID with time tracking fields
|
|
623
|
+
*/
|
|
624
|
+
getAssignment(assignmentId: string): Promise<(TestAssignment & {
|
|
625
|
+
startedAt?: string;
|
|
626
|
+
durationSeconds?: number;
|
|
627
|
+
}) | null>;
|
|
628
|
+
/**
|
|
629
|
+
* Update assignment status with automatic time tracking
|
|
630
|
+
* - Sets started_at when status changes to 'in_progress'
|
|
631
|
+
* - Calculates duration_seconds when status changes to 'passed'/'failed'/'blocked'
|
|
632
|
+
* - Optionally include feedback when completing a test
|
|
633
|
+
*/
|
|
634
|
+
updateAssignmentStatus(assignmentId: string, status: TestAssignment['status'], options?: {
|
|
635
|
+
notes?: string;
|
|
636
|
+
testResult?: TestResult;
|
|
637
|
+
/** Include feedback when completing the test */
|
|
638
|
+
feedback?: TestFeedback;
|
|
639
|
+
}): Promise<{
|
|
640
|
+
success: boolean;
|
|
641
|
+
error?: string;
|
|
642
|
+
durationSeconds?: number;
|
|
643
|
+
}>;
|
|
644
|
+
/**
|
|
645
|
+
* Skip a test assignment with a required reason
|
|
646
|
+
* Marks the assignment as 'skipped' and records why it was skipped
|
|
647
|
+
*/
|
|
648
|
+
skipAssignment(assignmentId: string, reason: SkipReason, notes?: string): Promise<{
|
|
649
|
+
success: boolean;
|
|
650
|
+
error?: string;
|
|
651
|
+
}>;
|
|
652
|
+
/**
|
|
653
|
+
* Submit feedback on a test case to help improve test quality
|
|
654
|
+
* This empowers testers to shape better tests over time
|
|
655
|
+
*/
|
|
656
|
+
submitTestFeedback(options: SubmitFeedbackOptions): Promise<{
|
|
657
|
+
success: boolean;
|
|
658
|
+
error?: string;
|
|
659
|
+
}>;
|
|
660
|
+
/**
|
|
661
|
+
* Get the currently active (in_progress) assignment for the tester
|
|
662
|
+
*/
|
|
663
|
+
getActiveAssignment(): Promise<(TestAssignment & {
|
|
664
|
+
startedAt?: string;
|
|
665
|
+
}) | null>;
|
|
483
666
|
/**
|
|
484
667
|
* Get current tester info
|
|
485
668
|
* Looks up tester by email from the host app's authenticated user
|
|
@@ -606,6 +789,69 @@ declare class BugBearClient {
|
|
|
606
789
|
threadId?: string;
|
|
607
790
|
error?: string;
|
|
608
791
|
}>;
|
|
792
|
+
/**
|
|
793
|
+
* Start a new QA session for exploratory testing
|
|
794
|
+
*/
|
|
795
|
+
startSession(options?: StartSessionOptions): Promise<{
|
|
796
|
+
success: boolean;
|
|
797
|
+
session?: QASession;
|
|
798
|
+
error?: string;
|
|
799
|
+
}>;
|
|
800
|
+
/**
|
|
801
|
+
* End the current QA session
|
|
802
|
+
*/
|
|
803
|
+
endSession(sessionId: string, options?: EndSessionOptions): Promise<{
|
|
804
|
+
success: boolean;
|
|
805
|
+
session?: QASession;
|
|
806
|
+
error?: string;
|
|
807
|
+
}>;
|
|
808
|
+
/**
|
|
809
|
+
* Get the current active session for the tester
|
|
810
|
+
*/
|
|
811
|
+
getActiveSession(): Promise<QASession | null>;
|
|
812
|
+
/**
|
|
813
|
+
* Get a session by ID
|
|
814
|
+
*/
|
|
815
|
+
getSession(sessionId: string): Promise<QASession | null>;
|
|
816
|
+
/**
|
|
817
|
+
* Get session history for the tester
|
|
818
|
+
*/
|
|
819
|
+
getSessionHistory(limit?: number): Promise<QASession[]>;
|
|
820
|
+
/**
|
|
821
|
+
* Add a finding during a session
|
|
822
|
+
*/
|
|
823
|
+
addFinding(sessionId: string, options: AddFindingOptions): Promise<{
|
|
824
|
+
success: boolean;
|
|
825
|
+
finding?: QAFinding;
|
|
826
|
+
error?: string;
|
|
827
|
+
}>;
|
|
828
|
+
/**
|
|
829
|
+
* Get findings for a session
|
|
830
|
+
*/
|
|
831
|
+
getSessionFindings(sessionId: string): Promise<QAFinding[]>;
|
|
832
|
+
/**
|
|
833
|
+
* Convert a finding to a bug report
|
|
834
|
+
*/
|
|
835
|
+
convertFindingToBug(findingId: string): Promise<{
|
|
836
|
+
success: boolean;
|
|
837
|
+
bugId?: string;
|
|
838
|
+
error?: string;
|
|
839
|
+
}>;
|
|
840
|
+
/**
|
|
841
|
+
* Dismiss a finding
|
|
842
|
+
*/
|
|
843
|
+
dismissFinding(findingId: string, reason?: string): Promise<{
|
|
844
|
+
success: boolean;
|
|
845
|
+
error?: string;
|
|
846
|
+
}>;
|
|
847
|
+
/**
|
|
848
|
+
* Transform database session to QASession type
|
|
849
|
+
*/
|
|
850
|
+
private transformSession;
|
|
851
|
+
/**
|
|
852
|
+
* Transform database finding to QAFinding type
|
|
853
|
+
*/
|
|
854
|
+
private transformFinding;
|
|
609
855
|
}
|
|
610
856
|
/**
|
|
611
857
|
* Create a BugBear client instance
|
|
@@ -667,4 +913,4 @@ declare function captureError(error: Error, errorInfo?: {
|
|
|
667
913
|
componentStack?: string;
|
|
668
914
|
};
|
|
669
915
|
|
|
670
|
-
export { type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, type DeployChecklist, type DeviceInfo, type EnhancedBugContext, type HostUserInfo, type MessageSenderType, type NetworkRequest, type PriorityFactors, type QAHealthMetrics, type QAHealthScore, type QATrack, type RegressionEvent, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type TestAssignment, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, captureError, contextCapture, createBugBear };
|
|
916
|
+
export { type AddFindingOptions, type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, type DeployChecklist, type DeviceInfo, type EndSessionOptions, type EnhancedBugContext, type FindingSeverity, type FindingType, type HostUserInfo, type MessageSenderType, type NetworkRequest, type PriorityFactors, type QAFinding, type QAHealthMetrics, type QAHealthScore, type QASession, type QASessionStatus, type QATrack, type RegressionEvent, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type SkipReason, type StartSessionOptions, type SubmitFeedbackOptions, type TestAssignment, type TestFeedback, type TestGroup, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, captureError, contextCapture, createBugBear };
|
package/dist/index.d.ts
CHANGED
|
@@ -161,6 +161,15 @@ interface BugBearTheme {
|
|
|
161
161
|
}
|
|
162
162
|
type TestTemplate = 'steps' | 'checklist' | 'rubric' | 'freeform';
|
|
163
163
|
type RubricMode = 'pass_fail' | 'rating';
|
|
164
|
+
/** Skip reason for skipped test assignments */
|
|
165
|
+
type SkipReason = 'blocked' | 'not_ready' | 'dependency' | 'other';
|
|
166
|
+
/** Test group (folder) for organizing test cases */
|
|
167
|
+
interface TestGroup {
|
|
168
|
+
id: string;
|
|
169
|
+
name: string;
|
|
170
|
+
description?: string;
|
|
171
|
+
sortOrder: number;
|
|
172
|
+
}
|
|
164
173
|
interface QATrack {
|
|
165
174
|
id: string;
|
|
166
175
|
name: string;
|
|
@@ -184,8 +193,20 @@ interface TestAssignment {
|
|
|
184
193
|
/** Route/screen to navigate to when starting this test */
|
|
185
194
|
targetRoute?: string;
|
|
186
195
|
track?: QATrack;
|
|
196
|
+
/** Test group (folder) this test belongs to */
|
|
197
|
+
group?: TestGroup;
|
|
187
198
|
};
|
|
188
|
-
status: 'pending' | 'in_progress' | 'passed' | 'failed' | 'blocked';
|
|
199
|
+
status: 'pending' | 'in_progress' | 'passed' | 'failed' | 'blocked' | 'skipped';
|
|
200
|
+
/** Reason for skipping (when status is 'skipped') */
|
|
201
|
+
skipReason?: SkipReason;
|
|
202
|
+
/** When the assignment was started (set to in_progress) */
|
|
203
|
+
startedAt?: string;
|
|
204
|
+
/** Duration in seconds (calculated when completed) */
|
|
205
|
+
durationSeconds?: number;
|
|
206
|
+
/** Whether this is a verification assignment for a fixed bug */
|
|
207
|
+
isVerification?: boolean;
|
|
208
|
+
/** Original report ID if this is a verification assignment */
|
|
209
|
+
originalReportId?: string;
|
|
189
210
|
}
|
|
190
211
|
interface TestStep {
|
|
191
212
|
stepNumber: number;
|
|
@@ -213,6 +234,37 @@ interface TestResult {
|
|
|
213
234
|
/** Overall notes */
|
|
214
235
|
notes?: string;
|
|
215
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* Feedback from testers about a test case
|
|
239
|
+
* Helps improve test quality over time
|
|
240
|
+
*/
|
|
241
|
+
interface TestFeedback {
|
|
242
|
+
/** Overall rating (1-5 stars) */
|
|
243
|
+
rating: 1 | 2 | 3 | 4 | 5;
|
|
244
|
+
/** Optional detailed ratings */
|
|
245
|
+
clarityRating?: 1 | 2 | 3 | 4 | 5;
|
|
246
|
+
stepsRating?: 1 | 2 | 3 | 4 | 5;
|
|
247
|
+
relevanceRating?: 1 | 2 | 3 | 4 | 5;
|
|
248
|
+
/** Free-form feedback note */
|
|
249
|
+
feedbackNote?: string;
|
|
250
|
+
/** Specific improvement suggestion */
|
|
251
|
+
suggestedImprovement?: string;
|
|
252
|
+
/** Quick feedback flags */
|
|
253
|
+
isOutdated?: boolean;
|
|
254
|
+
needsMoreDetail?: boolean;
|
|
255
|
+
stepsUnclear?: boolean;
|
|
256
|
+
expectedResultUnclear?: boolean;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Options for submitting test feedback
|
|
260
|
+
*/
|
|
261
|
+
interface SubmitFeedbackOptions {
|
|
262
|
+
testCaseId: string;
|
|
263
|
+
assignmentId?: string;
|
|
264
|
+
feedback: TestFeedback;
|
|
265
|
+
/** Time taken to complete in seconds */
|
|
266
|
+
timeToCompleteSeconds?: number;
|
|
267
|
+
}
|
|
216
268
|
interface TesterInfo {
|
|
217
269
|
id: string;
|
|
218
270
|
name: string;
|
|
@@ -442,6 +494,92 @@ interface CoverageMatrixRow {
|
|
|
442
494
|
lastTestedAt: string | null;
|
|
443
495
|
tracks: Record<string, CoverageMatrixCell>;
|
|
444
496
|
}
|
|
497
|
+
/** Session status */
|
|
498
|
+
type QASessionStatus = 'active' | 'paused' | 'completed' | 'abandoned';
|
|
499
|
+
/** Finding type - lighter than a bug report */
|
|
500
|
+
type FindingType = 'bug' | 'concern' | 'suggestion' | 'question';
|
|
501
|
+
/** Finding severity - includes observation for non-issues */
|
|
502
|
+
type FindingSeverity = 'critical' | 'high' | 'medium' | 'low' | 'observation';
|
|
503
|
+
/** QA Session - exploratory testing session */
|
|
504
|
+
interface QASession {
|
|
505
|
+
id: string;
|
|
506
|
+
projectId: string;
|
|
507
|
+
testerId: string;
|
|
508
|
+
/** Area being explored */
|
|
509
|
+
focusArea?: string;
|
|
510
|
+
/** QA track focus */
|
|
511
|
+
track?: string;
|
|
512
|
+
/** Platform being tested */
|
|
513
|
+
platform?: string;
|
|
514
|
+
/** Timing */
|
|
515
|
+
startedAt: string;
|
|
516
|
+
endedAt?: string;
|
|
517
|
+
/** Session notes */
|
|
518
|
+
notes?: string;
|
|
519
|
+
/** Routes visited during session */
|
|
520
|
+
routesCovered: string[];
|
|
521
|
+
/** Status */
|
|
522
|
+
status: QASessionStatus;
|
|
523
|
+
/** Metrics */
|
|
524
|
+
durationMinutes?: number;
|
|
525
|
+
findingsCount: number;
|
|
526
|
+
bugsFiled: number;
|
|
527
|
+
createdAt: string;
|
|
528
|
+
updatedAt: string;
|
|
529
|
+
}
|
|
530
|
+
/** QA Finding - quick observation during a session */
|
|
531
|
+
interface QAFinding {
|
|
532
|
+
id: string;
|
|
533
|
+
sessionId: string;
|
|
534
|
+
projectId: string;
|
|
535
|
+
/** Type of finding */
|
|
536
|
+
type: FindingType;
|
|
537
|
+
/** Severity level */
|
|
538
|
+
severity: FindingSeverity;
|
|
539
|
+
/** Content */
|
|
540
|
+
title: string;
|
|
541
|
+
description?: string;
|
|
542
|
+
/** Context (auto-captured) */
|
|
543
|
+
route?: string;
|
|
544
|
+
screenshotUrl?: string;
|
|
545
|
+
consoleLogs?: ConsoleLogEntry[];
|
|
546
|
+
networkSnapshot?: NetworkRequest[];
|
|
547
|
+
deviceInfo?: DeviceInfo;
|
|
548
|
+
appContext?: AppContext;
|
|
549
|
+
/** Conversion tracking */
|
|
550
|
+
convertedToBugId?: string;
|
|
551
|
+
convertedToTestId?: string;
|
|
552
|
+
/** Dismissal */
|
|
553
|
+
dismissed: boolean;
|
|
554
|
+
dismissedReason?: string;
|
|
555
|
+
dismissedAt?: string;
|
|
556
|
+
createdAt: string;
|
|
557
|
+
updatedAt: string;
|
|
558
|
+
}
|
|
559
|
+
/** Options for starting a QA session */
|
|
560
|
+
interface StartSessionOptions {
|
|
561
|
+
focusArea?: string;
|
|
562
|
+
track?: string;
|
|
563
|
+
platform?: string;
|
|
564
|
+
}
|
|
565
|
+
/** Options for ending a QA session */
|
|
566
|
+
interface EndSessionOptions {
|
|
567
|
+
notes?: string;
|
|
568
|
+
routesCovered?: string[];
|
|
569
|
+
}
|
|
570
|
+
/** Options for adding a finding */
|
|
571
|
+
interface AddFindingOptions {
|
|
572
|
+
type: FindingType;
|
|
573
|
+
title: string;
|
|
574
|
+
description?: string;
|
|
575
|
+
severity?: FindingSeverity;
|
|
576
|
+
route?: string;
|
|
577
|
+
screenshotUrl?: string;
|
|
578
|
+
consoleLogs?: ConsoleLogEntry[];
|
|
579
|
+
networkSnapshot?: NetworkRequest[];
|
|
580
|
+
deviceInfo?: DeviceInfo;
|
|
581
|
+
appContext?: AppContext;
|
|
582
|
+
}
|
|
445
583
|
|
|
446
584
|
/**
|
|
447
585
|
* BugBear Client
|
|
@@ -480,6 +618,51 @@ declare class BugBearClient {
|
|
|
480
618
|
* First looks up the tester by email, then fetches their assignments
|
|
481
619
|
*/
|
|
482
620
|
getAssignedTests(): Promise<TestAssignment[]>;
|
|
621
|
+
/**
|
|
622
|
+
* Get assignment by ID with time tracking fields
|
|
623
|
+
*/
|
|
624
|
+
getAssignment(assignmentId: string): Promise<(TestAssignment & {
|
|
625
|
+
startedAt?: string;
|
|
626
|
+
durationSeconds?: number;
|
|
627
|
+
}) | null>;
|
|
628
|
+
/**
|
|
629
|
+
* Update assignment status with automatic time tracking
|
|
630
|
+
* - Sets started_at when status changes to 'in_progress'
|
|
631
|
+
* - Calculates duration_seconds when status changes to 'passed'/'failed'/'blocked'
|
|
632
|
+
* - Optionally include feedback when completing a test
|
|
633
|
+
*/
|
|
634
|
+
updateAssignmentStatus(assignmentId: string, status: TestAssignment['status'], options?: {
|
|
635
|
+
notes?: string;
|
|
636
|
+
testResult?: TestResult;
|
|
637
|
+
/** Include feedback when completing the test */
|
|
638
|
+
feedback?: TestFeedback;
|
|
639
|
+
}): Promise<{
|
|
640
|
+
success: boolean;
|
|
641
|
+
error?: string;
|
|
642
|
+
durationSeconds?: number;
|
|
643
|
+
}>;
|
|
644
|
+
/**
|
|
645
|
+
* Skip a test assignment with a required reason
|
|
646
|
+
* Marks the assignment as 'skipped' and records why it was skipped
|
|
647
|
+
*/
|
|
648
|
+
skipAssignment(assignmentId: string, reason: SkipReason, notes?: string): Promise<{
|
|
649
|
+
success: boolean;
|
|
650
|
+
error?: string;
|
|
651
|
+
}>;
|
|
652
|
+
/**
|
|
653
|
+
* Submit feedback on a test case to help improve test quality
|
|
654
|
+
* This empowers testers to shape better tests over time
|
|
655
|
+
*/
|
|
656
|
+
submitTestFeedback(options: SubmitFeedbackOptions): Promise<{
|
|
657
|
+
success: boolean;
|
|
658
|
+
error?: string;
|
|
659
|
+
}>;
|
|
660
|
+
/**
|
|
661
|
+
* Get the currently active (in_progress) assignment for the tester
|
|
662
|
+
*/
|
|
663
|
+
getActiveAssignment(): Promise<(TestAssignment & {
|
|
664
|
+
startedAt?: string;
|
|
665
|
+
}) | null>;
|
|
483
666
|
/**
|
|
484
667
|
* Get current tester info
|
|
485
668
|
* Looks up tester by email from the host app's authenticated user
|
|
@@ -606,6 +789,69 @@ declare class BugBearClient {
|
|
|
606
789
|
threadId?: string;
|
|
607
790
|
error?: string;
|
|
608
791
|
}>;
|
|
792
|
+
/**
|
|
793
|
+
* Start a new QA session for exploratory testing
|
|
794
|
+
*/
|
|
795
|
+
startSession(options?: StartSessionOptions): Promise<{
|
|
796
|
+
success: boolean;
|
|
797
|
+
session?: QASession;
|
|
798
|
+
error?: string;
|
|
799
|
+
}>;
|
|
800
|
+
/**
|
|
801
|
+
* End the current QA session
|
|
802
|
+
*/
|
|
803
|
+
endSession(sessionId: string, options?: EndSessionOptions): Promise<{
|
|
804
|
+
success: boolean;
|
|
805
|
+
session?: QASession;
|
|
806
|
+
error?: string;
|
|
807
|
+
}>;
|
|
808
|
+
/**
|
|
809
|
+
* Get the current active session for the tester
|
|
810
|
+
*/
|
|
811
|
+
getActiveSession(): Promise<QASession | null>;
|
|
812
|
+
/**
|
|
813
|
+
* Get a session by ID
|
|
814
|
+
*/
|
|
815
|
+
getSession(sessionId: string): Promise<QASession | null>;
|
|
816
|
+
/**
|
|
817
|
+
* Get session history for the tester
|
|
818
|
+
*/
|
|
819
|
+
getSessionHistory(limit?: number): Promise<QASession[]>;
|
|
820
|
+
/**
|
|
821
|
+
* Add a finding during a session
|
|
822
|
+
*/
|
|
823
|
+
addFinding(sessionId: string, options: AddFindingOptions): Promise<{
|
|
824
|
+
success: boolean;
|
|
825
|
+
finding?: QAFinding;
|
|
826
|
+
error?: string;
|
|
827
|
+
}>;
|
|
828
|
+
/**
|
|
829
|
+
* Get findings for a session
|
|
830
|
+
*/
|
|
831
|
+
getSessionFindings(sessionId: string): Promise<QAFinding[]>;
|
|
832
|
+
/**
|
|
833
|
+
* Convert a finding to a bug report
|
|
834
|
+
*/
|
|
835
|
+
convertFindingToBug(findingId: string): Promise<{
|
|
836
|
+
success: boolean;
|
|
837
|
+
bugId?: string;
|
|
838
|
+
error?: string;
|
|
839
|
+
}>;
|
|
840
|
+
/**
|
|
841
|
+
* Dismiss a finding
|
|
842
|
+
*/
|
|
843
|
+
dismissFinding(findingId: string, reason?: string): Promise<{
|
|
844
|
+
success: boolean;
|
|
845
|
+
error?: string;
|
|
846
|
+
}>;
|
|
847
|
+
/**
|
|
848
|
+
* Transform database session to QASession type
|
|
849
|
+
*/
|
|
850
|
+
private transformSession;
|
|
851
|
+
/**
|
|
852
|
+
* Transform database finding to QAFinding type
|
|
853
|
+
*/
|
|
854
|
+
private transformFinding;
|
|
609
855
|
}
|
|
610
856
|
/**
|
|
611
857
|
* Create a BugBear client instance
|
|
@@ -667,4 +913,4 @@ declare function captureError(error: Error, errorInfo?: {
|
|
|
667
913
|
componentStack?: string;
|
|
668
914
|
};
|
|
669
915
|
|
|
670
|
-
export { type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, type DeployChecklist, type DeviceInfo, type EnhancedBugContext, type HostUserInfo, type MessageSenderType, type NetworkRequest, type PriorityFactors, type QAHealthMetrics, type QAHealthScore, type QATrack, type RegressionEvent, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type TestAssignment, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, captureError, contextCapture, createBugBear };
|
|
916
|
+
export { type AddFindingOptions, type AppContext, BugBearClient, type BugBearConfig, type BugBearReport, type BugBearTheme, type ChecklistItem, type ChecklistResult, type ConsoleLogEntry, type CoverageGap, type CoverageMatrixCell, type CoverageMatrixRow, type DeployChecklist, type DeviceInfo, type EndSessionOptions, type EnhancedBugContext, type FindingSeverity, type FindingType, type HostUserInfo, type MessageSenderType, type NetworkRequest, type PriorityFactors, type QAFinding, type QAHealthMetrics, type QAHealthScore, type QASession, type QASessionStatus, type QATrack, type RegressionEvent, type ReportStatus, type ReportType, type RoutePriority, type RouteTestStats, type RubricMode, type RubricResult, type Severity, type SkipReason, type StartSessionOptions, type SubmitFeedbackOptions, type TestAssignment, type TestFeedback, type TestGroup, type TestResult, type TestStep, type TestTemplate, type TesterInfo, type TesterMessage, type TesterProfileUpdate, type TesterThread, type ThreadPriority, type ThreadType, captureError, contextCapture, createBugBear };
|