Skip to main content

Class: TestCaseRecorder

testUtil/TestCaseRecorder.TestCaseRecorder

Constructors

constructor

new TestCaseRecorder(graph)

Parameters

NameType
graphGraph

Defined in

testUtil/TestCaseRecorder.ts:106

Properties

active

Private active: boolean = false

Defined in

testUtil/TestCaseRecorder.ts:87


captureFinalThatMark

Private captureFinalThatMark: boolean = false

Defined in

testUtil/TestCaseRecorder.ts:102


extraSnapshotFields

Private Optional extraSnapshotFields: keyof TestCaseSnapshot[]

Defined in

testUtil/TestCaseRecorder.ts:97


fixtureRoot

Private fixtureRoot: null | string

Defined in

testUtil/TestCaseRecorder.ts:90


isDecorationsTest

Private isDecorationsTest: boolean = false

Defined in

testUtil/TestCaseRecorder.ts:94


isErrorTest

Private isErrorTest: boolean = false

Defined in

testUtil/TestCaseRecorder.ts:99


isHatTokenMapTest

Private isHatTokenMapTest: boolean = false

Defined in

testUtil/TestCaseRecorder.ts:93


isSilent

Private Optional isSilent: boolean

Defined in

testUtil/TestCaseRecorder.ts:95


originalIde

Private originalIde: undefined | IDE

Defined in

testUtil/TestCaseRecorder.ts:104


originalTextEditorOptions

Private originalTextEditorOptions: TextEditorOptions = {}

We use this variable to capture editor settings and then restore them

Defined in

testUtil/TestCaseRecorder.ts:101


paused

Private paused: boolean = false

Defined in

testUtil/TestCaseRecorder.ts:98


spyIde

Private spyIde: undefined | SpyIDE

Defined in

testUtil/TestCaseRecorder.ts:103


startTimestamp

Private Optional startTimestamp: bigint

Defined in

testUtil/TestCaseRecorder.ts:96


targetDirectory

Private targetDirectory: null | string = null

Defined in

testUtil/TestCaseRecorder.ts:91


testCase

Private testCase: null | TestCase = null

Defined in

testUtil/TestCaseRecorder.ts:92


workspaceName

Private workspaceName: null | string

Defined in

testUtil/TestCaseRecorder.ts:89


workspacePath

Private workspacePath: null | string

Defined in

testUtil/TestCaseRecorder.ts:88

Methods

calculateFilePath

Private calculateFilePath(testCase): string

Parameters

NameType
testCaseTestCase

Returns

string

Defined in

testUtil/TestCaseRecorder.ts:411


commandErrorHook

commandErrorHook(error): Promise<void>

Parameters

NameType
errorError

Returns

Promise<void>

Defined in

testUtil/TestCaseRecorder.ts:431


finallyHook

finallyHook(): void

Returns

void

Defined in

testUtil/TestCaseRecorder.ts:440


finishTestCase

finishTestCase(): Promise<void>

Returns

Promise<void>

Defined in

testUtil/TestCaseRecorder.ts:357


isActive

isActive(): boolean

Returns

boolean

Defined in

testUtil/TestCaseRecorder.ts:186


pause

pause(): Promise<void>

Returns

Promise<void>

Defined in

testUtil/TestCaseRecorder.ts:136


postCommandHook

postCommandHook(returnValue): Promise<void>

Parameters

NameType
returnValueany

Returns

Promise<void>

Defined in

testUtil/TestCaseRecorder.ts:338


preCommandHook

preCommandHook(command, context): Promise<void>

Parameters

NameType
commandnever & never & never & never & CommandV4 & { version: 4 }
contextTestCaseContext

Returns

Promise<void>

Defined in

testUtil/TestCaseRecorder.ts:299


promptSubdirectory

Private promptSubdirectory(): Promise<undefined | string>

Returns

Promise<undefined | string>

Defined in

testUtil/TestCaseRecorder.ts:382


recordStartTime

Private recordStartTime(showCalibrationDisplay): Promise<string>

Parameters

NameType
showCalibrationDisplayboolean

Returns

Promise<string>

Defined in

testUtil/TestCaseRecorder.ts:265


resume

resume(): Promise<void>

Returns

Promise<void>

Defined in

testUtil/TestCaseRecorder.ts:144


start

start(arg?): Promise<null | { startTimestampISO: string }>

Parameters

NameType
arg?RecordTestCaseCommandArg

Returns

Promise<null | { startTimestampISO: string }>

Defined in

testUtil/TestCaseRecorder.ts:190


stop

stop(): void

Returns

void

Defined in

testUtil/TestCaseRecorder.ts:294


takeSnapshot

takeSnapshot(outPath, metadata, targetedMarks, usePrePhraseSnapshot): Promise<void>

Parameters

NameType
outPathstring
metadataunknown
targetedMarksDecoratedSymbolMark[]
usePrePhraseSnapshotboolean

Returns

Promise<void>

Defined in

testUtil/TestCaseRecorder.ts:152


toggle

toggle(arg?): Promise<undefined | null | { startTimestampISO: string }>

Parameters

NameType
arg?RecordTestCaseCommandArg

Returns

Promise<undefined | null | { startTimestampISO: string }>

Defined in

testUtil/TestCaseRecorder.ts:128


writeToFile

Private writeToFile(outPath, fixture): Promise<void>

Parameters

NameType
outPathstring
fixturestring

Returns

Promise<void>

Defined in

testUtil/TestCaseRecorder.ts:378