Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/test/simulation/workbench/components/testCaseSummary.tsx
13399 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { ArrowRight12Regular } from '@fluentui/react-icons';
7
import * as mobxlite from 'mobx-react-lite';
8
import * as React from 'react';
9
import { TestRun } from '../stores/testRun';
10
11
type TestCaseSummaryProps = {
12
currentRun: TestRun;
13
baselineRun?: TestRun;
14
};
15
16
export const TestCaseSummary = mobxlite.observer(
17
({ currentRun, baselineRun }: TestCaseSummaryProps) => {
18
return (
19
<div>
20
<div className='test-case-count'>
21
<span>Total generated test case numbers: </span>
22
{baselineRun
23
? <>
24
<span>{baselineRun.generatedTestCaseCount}</span>
25
<ArrowRight12Regular />
26
</>
27
: null
28
}
29
30
<span>{currentRun.generatedTestCaseCount}</span>
31
</div>
32
<div className='test-assertion-count'>
33
<span>Total generated assertions numbers: </span>
34
{baselineRun
35
? <>
36
<span>{baselineRun.generatedAssertCount}</span>
37
<ArrowRight12Regular />
38
</>
39
: null
40
}
41
42
<span>{currentRun.generatedAssertCount}</span>
43
</div>
44
</div>
45
);
46
}
47
);
48