Add more similarity metrics #1139
report-viewer-unit.yml
on: pull_request
pre_job
7s
test
20s
Annotations
10 errors
tests/unit/model/factories/ComparisonFactory.test.ts > Test JSON to Comparison > Post 5.0:
report-viewer/tests/unit/model/factories/ComparisonFactory.test.ts#L62
AssertionError: expected undefined to be 0.45 // Object.is equality
- Expected:
0.45
+ Received:
undefined
❯ tests/unit/model/factories/ComparisonFactory.test.ts:62:53
|
tests/unit/model/factories/OptionsFactory.test.ts > Test JSON to Options > Test Valid JSON:
report-viewer/tests/unit/model/factories/OptionsFactory.test.ts#L19
AssertionError: expected { language: 'java', …(12) } to deeply equal { language: 'java', …(12) }
- Expected
+ Received
Object {
"baseDirectory": ".",
"clusterOptions": Object {
"agglomerativeThreshold": 0.2,
"algorithm": "Spectral",
"enabled": true,
"interClusterSimilarity": "Average",
"preprocessor": "Cumulative Distribution Function",
"preprocessorPercentile": 0.5,
"preprocessorThreshold": 0.2,
- "similarityMetric": undefined,
+ "similarityMetric": PercentageMetricType {
+ "_identifier": "AVG",
+ "_longName": "Average Similarity",
+ "_shortName": "AVG",
+ "_tooltip": "The average similarity of the two files.
+ A high similarity indicates that the programs work in a similar way.",
+ },
"spectralBandwidth": 20,
"spectralGaussianProcessVariance": 0.0025000000000000005,
"spectralMaxKMeansIterations": 200,
"spectralMaxRuns": 50,
"spectralMinRuns": 5,
},
"exclusionFileName": "ex.txt",
"fileSuffixes": Array [
".java",
".JAVA",
],
"language": "java",
"maxNumberComparisons": 500,
"mergingOptions": Object {
"enabled": false,
"maxGapSize": 0,
"minNeighborLength": 0,
},
"minTokenMatch": 9,
"oldDirectories": Array [
"old",
],
- "similarityMetric": undefined,
+ "similarityMetric": PercentageMetricType {
+ "_identifier": "AVG",
+ "_longName": "Average Similarity",
+ "_shortName": "AVG",
+ "_tooltip": "The average similarity of the two files.
+ A high similarity indicates that the programs work in a similar way.",
+ },
"similarityThreshold": 0,
"subDirectoryName": "src/",
"submissionDirectories": Array [
".\\files",
],
}
❯ tests/unit/model/factories/OptionsFactory.test.ts:19:20
|
tests/unit/model/factories/OverviewFactory.test.ts > Test JSON to Overview > Post 5.0:
report-viewer/tests/unit/model/factories/OverviewFactory.test.ts#L24
AssertionError: expected Overview{ …(11) } to deeply equal { …(11) }
- Expected
+ Received
- Object {
+ Overview {
"_baseCodeFolderPath": "",
"_clusters": Array [
Object {
"averageSimilarity": 94.746956,
"members": Array [
"C",
"A",
"B",
"D",
],
"strength": 0,
},
],
"_dateOfExecution": "12/07/23",
"_distributions": Object {
- "undefined": Distribution {
+ "AVG": Distribution {
"_distribution": Array [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
2,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ ],
+ },
+ "MAX": Distribution {
+ "_distribution": Array [
+ 1,
+ 0,
+ 2,
+ 0,
+ 0,
+ 2,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
],
},
},
"_durationOfExecution": 12,
"_fileExtensions": Array [
".java",
".JAVA",
],
"_language": "java",
"_matchSensitivity": 9,
"_submissionFolderPath": Array [
"files",
],
"_topComparisons": Array [
Object {
"clusterIndex": 0,
"firstSubmissionId": "A",
"id": 1,
"secondSubmissionId": "C",
"similarities": Object {
- "undefined": 0.9960435212660732,
+ "AVG": 0.9960435212660732,
+ "MAX": 0.9960435212660732,
},
"sortingPlace": 0,
},
Object {
"clusterIndex": 0,
"firstSubmissionId": "D",
"id": 2,
"secondSubmissionId": "A",
"similarities": Object {
- "undefined": 0.947289156626506,
+ "AVG": 0.751044776119403,
+ "MAX": 0.947289156626506,
},
|
tests/unit/components/comparisonTable/ComparisonTable.test.ts > ComparisonTable > Test search bar filtering by index:
report-viewer/tests/unit/components/comparisonTable/ComparisonTable.test.ts#L128
AssertionError: expected 'E' to be 'A' // Object.is equality
Expected: "A"
Received: "E"
❯ tests/unit/components/comparisonTable/ComparisonTable.test.ts:128:61
|
tests/unit/components/comparisonTable/ComparisonTable.test.ts > ComparisonTable > Test search bar filtering by metric:
report-viewer/tests/unit/components/comparisonTable/ComparisonTable.test.ts#L205
AssertionError: expected +0 to be 3 // Object.is equality
- Expected
+ Received
- 3
+ 0
❯ tests/unit/components/comparisonTable/ComparisonTable.test.ts:205:59
|
tests/unit/components/comparisonTable/ComparisonTable.test.ts > ComparisonTable > Test sorting working:
report-viewer/tests/unit/components/comparisonTable/ComparisonTable.test.ts#L316
AssertionError: expected 'A' to be 'H' // Object.is equality
Expected: "H"
Received: "A"
❯ tests/unit/components/comparisonTable/ComparisonTable.test.ts:316:68
|
tests/unit/components/comparisonTable/ComparisonTableFilter.test.ts > ComparisonTableFilter > Test metric changes:
report-viewer/tests/unit/components/comparisonTable/ComparisonTableFilter.test.ts#L48
AssertionError: expected 'MAX' to be undefined // Object.is equality
- Expected:
undefined
+ Received:
"MAX"
❯ tests/unit/components/comparisonTable/ComparisonTableFilter.test.ts:48:58
|
tests/unit/components/optionsSelectors/MetricSelector.test.ts > OptionSelectorComponent > renders given metrics only:
report-viewer/src/components/optionsSelectors/MetricSelector.vue#L37
TypeError: Cannot read properties of undefined (reading 'longName')
❯ src/components/optionsSelectors/MetricSelector.vue:37:50
❯ wrappedFn node_modules/@vue/reactivity/dist/reactivity.cjs.js:858:19
❯ apply node_modules/@vue/reactivity/dist/reactivity.cjs.js:866:27
❯ Proxy.map node_modules/@vue/reactivity/dist/reactivity.cjs.js:790:12
❯ ComputedRefImpl.fn src/components/optionsSelectors/MetricSelector.vue:36:17
❯ refreshComputed node_modules/@vue/reactivity/dist/reactivity.cjs.js:381:28
❯ ComputedRefImpl.get value [as value] node_modules/@vue/reactivity/dist/reactivity.cjs.js:1621:5
❯ unref node_modules/@vue/reactivity/dist/reactivity.cjs.js:1466:29
❯ Object.get node_modules/@vue/reactivity/dist/reactivity.cjs.js:1472:64
|
tests/unit/components/optionsSelectors/MetricSelector.test.ts > OptionSelectorComponent > switch selection:
report-viewer/tests/unit/components/optionsSelectors/MetricSelector.test.ts#L43
AssertionError: expected [ 'MAX' ] to deeply equal [ undefined ]
- Expected
+ Received
Array [
- undefined,
+ "MAX",
]
❯ tests/unit/components/optionsSelectors/MetricSelector.test.ts:43:54
|
test
Process completed with exit code 1.
|