Skip to content
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

Feat/introduce license classification #2844

Merged
merged 203 commits into from
Mar 26, 2025
Merged
Changes from 1 commit
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
1515cff
test: subdivide test for more structure
Hellgartner Mar 6, 2025
7224043
test: add test for criticality
Hellgartner Mar 6, 2025
cc4e643
test: add further missing tests for chips
Hellgartner Mar 6, 2025
83b51ab
fix: remove unused code
Hellgartner Mar 7, 2025
297a754
feat: make the classification item also render with missing configura…
Hellgartner Mar 7, 2025
d4e9a2b
feat: add classification item to AuditingOptions
Hellgartner Mar 7, 2025
7baacdd
refactor: rename classification item
Hellgartner Mar 7, 2025
f149734
feat: handle criticality == 0
Hellgartner Mar 7, 2025
58e47f6
feat: show configured text
Hellgartner Mar 7, 2025
cd90d99
feat: do no longer show chip if value == 0
Hellgartner Mar 10, 2025
1e894ea
feat: ensure that the red icon is shown in all three places given the…
Hellgartner Mar 10, 2025
f384282
fix: review-comment: CriticalClassificationIcon no longer needed
Hellgartner Mar 11, 2025
610ab18
refactor: move handling of invalid configurations to loading of file
Hellgartner Mar 11, 2025
5957b01
Merge pull request #2837 from opossum-tool/feat/add-classification-au…
Hellgartner Mar 11, 2025
cb46745
feat: rely on having all classifications set
Hellgartner Mar 11, 2025
fee06ca
refactor: move color calculation to worker
Hellgartner Mar 11, 2025
c46e590
refactor: move color calculation to file loading
Hellgartner Mar 11, 2025
35aef63
feat: make all criticality items have the configured color
Hellgartner Mar 11, 2025
0fab471
refactor: review-comment: Improve name of function and file
Hellgartner Mar 12, 2025
520a104
refactor: review-comments: Improve readability
Hellgartner Mar 12, 2025
cd93f3e
refactor: review-comments: Use SVG icon
Hellgartner Mar 12, 2025
a95a611
feat: review-comments: Sort the progress bar tooltip by classification
Hellgartner Mar 12, 2025
1bad0c7
refactor: review-comment: calculate the colors on the frontend
Hellgartner Mar 12, 2025
ffb57e4
Merge pull request #2843 from opossum-tool/feat/classification-auditi…
Hellgartner Mar 12, 2025
9999a7f
feat: add pie chart to project statistics popup showing signal count …
PhilippMa Feb 25, 2025
fbcd19d
feat: properly deal with counting signals with undefined classifications
PhilippMa Feb 26, 2025
13b2a37
feat: exclude classifications with no associated signals from pie chart
PhilippMa Feb 26, 2025
e34c1b6
test: update test for project statistics popup
PhilippMa Feb 26, 2025
a2556a2
refactor: move text for project statistics charts to text.ts file
PhilippMa Feb 26, 2025
f69707f
refactor: move color definition for critical signal pie chart out of …
PhilippMa Feb 26, 2025
5bd412a
refactor: remove criticality names enum
PhilippMa Feb 27, 2025
fb35114
refactor: improve usage of text constants
PhilippMa Feb 28, 2025
ee48314
refactor: introduce named constant for "magic number" -1 in classific…
PhilippMa Mar 3, 2025
f8144f5
refactor: post-rebase cleanup
PhilippMa Mar 3, 2025
c398331
test: fix failing unit test
PhilippMa Mar 4, 2025
7309638
refactor: implement review suggestions
PhilippMa Mar 4, 2025
afb7c3d
test: fix failing unit test
PhilippMa Mar 4, 2025
148b1d3
refactor: introduce type alias for classification
PhilippMa Mar 4, 2025
ec4cd6c
refactor: rename Classifications to ClassificationsConfig
PhilippMa Mar 4, 2025
731bb0a
fix: post-rebase cleanup
PhilippMa Mar 4, 2025
8210fad
feat: add pie chart to project statistics popup showing signal count …
PhilippMa Feb 25, 2025
a386c5b
refactor: move text for project statistics charts to text.ts file
PhilippMa Feb 26, 2025
ae3109c
feat: delete critical license table
PhilippMa Feb 26, 2025
0674a46
refactor: delete ProjectLicensesTable component
PhilippMa Feb 26, 2025
09f98f9
feat: add criticality column to SignalsPerSources table
PhilippMa Feb 26, 2025
fe911b8
test: update test for ProjectStatisticsPopup
PhilippMa Feb 26, 2025
8dbb33b
test: fix e2e test for project statistics popup
PhilippMa Feb 26, 2025
d6000f1
refactor: move user-facing text from signal by source table text.ts
PhilippMa Feb 26, 2025
3f7caa5
test: fix failing unit test for project statistics popup
PhilippMa Feb 26, 2025
b5617d1
feat: change criticality display to use icons instead of plain text i…
PhilippMa Feb 27, 2025
09ea257
refactor: introduce subcomponents for signal per source table
PhilippMa Feb 28, 2025
508a479
refactor: implement review comments
PhilippMa Feb 28, 2025
7fe3737
feat: add classification column to signals per sources table in proje…
PhilippMa Feb 26, 2025
8cc15bd
feat: improve styling of signals per sources table for better readabi…
PhilippMa Feb 27, 2025
9204680
test: fix failing unit test
PhilippMa Feb 27, 2025
401a0e6
chore: post-rebase cleanup
PhilippMa Feb 28, 2025
0f13295
refactor: improve use of text constants
PhilippMa Feb 28, 2025
4d9c352
refactor: text constant name change
PhilippMa Feb 28, 2025
06030ff
refactor: delete unused method getLicenseNameVariants and its tests
abraemer Feb 27, 2025
aa8eecd
refactor: move getUniqueLicenseNameToAttribution call inside .util.tsx
abraemer Feb 27, 2025
e58ef97
refactor: add type annotation to classes in signals per sources table…
PhilippMa Feb 28, 2025
70eeb80
fix: post-rebase cleanup
PhilippMa Mar 4, 2025
9f8c124
fix: post-rebase cleanup
PhilippMa Mar 4, 2025
b06984a
feat: add pie chart to project statistics popup showing signal count …
PhilippMa Feb 25, 2025
01fec80
refactor: move text for project statistics charts to text.ts file
PhilippMa Feb 26, 2025
37a958d
refactor: delete ProjectLicensesTable component
PhilippMa Feb 26, 2025
c06f3b6
feat: introduce sort functionality on signals per sources table
PhilippMa Feb 28, 2025
c23e94a
fix: styling bug where color of first column header was black when se…
PhilippMa Mar 3, 2025
f788dbd
refactor: implement various review suggestions
PhilippMa Mar 3, 2025
5e9c2cd
refactor: define column structure of signals per source table centrally
PhilippMa Mar 3, 2025
c606083
test: add unit test for license name ordering
PhilippMa Mar 3, 2025
116af85
fix: props forwarding issue in TableCellWithSorting
PhilippMa Mar 3, 2025
bce9721
test: add jest dom level test for sorting in the signals per source t…
PhilippMa Mar 3, 2025
c9d386b
refactor: update ordering state the proper react way
PhilippMa Mar 4, 2025
6167ee6
fix: post-rebase cleanup
PhilippMa Mar 4, 2025
bda5f42
feat: divide project statistics popup into two tabs
PhilippMa Mar 5, 2025
11aef04
test: fix e2e tests to consider tabs in project statistics popup
PhilippMa Mar 5, 2025
5238af3
feat: introduce divider line under tabs bar
PhilippMa Mar 6, 2025
2723f59
feat: display attribution properties in bar chart instead of table
PhilippMa Mar 5, 2025
7467412
feat: display attribution properties in bar chart instead of table
PhilippMa Mar 5, 2025
f677f65
test: fix unit tests for pie charts in project statistics popup
PhilippMa Mar 6, 2025
8291a69
feat: implement review suggestions
PhilippMa Mar 6, 2025
53c990f
fix: post-rebase cleanup
PhilippMa Mar 12, 2025
96ad575
test: update test for project statistics popup
PhilippMa Feb 26, 2025
8a75d74
refactor: move color mapping logic from accordion to the actual pie c…
PhilippMa Mar 6, 2025
3d4697e
feat: extract pie charts from accordions and introduce grid layout fo…
PhilippMa Mar 6, 2025
271c2af
feat: improve overall layout of project statistics popup
PhilippMa Mar 6, 2025
524604c
fix: post-rebase cleanup
PhilippMa Mar 6, 2025
6d7d6dd
refactor: move user facing text to text.ts
PhilippMa Mar 7, 2025
6042813
test: add basic e2e test for charts in project statistics popup
PhilippMa Mar 7, 2025
f4cad05
test: fix failing unit test
PhilippMa Mar 7, 2025
0047ca4
test: fix issue causing flaky e2e test
PhilippMa Mar 7, 2025
5304d15
test: fix another issue with e2e test
PhilippMa Mar 7, 2025
55a9c1a
feat: adjust column number of chart grid based on screen size
PhilippMa Mar 7, 2025
9957e05
fix: improve legend styling for long license names
PhilippMa Mar 7, 2025
e523c05
feat: hide full chart card when there is no data to be displayed
PhilippMa Mar 7, 2025
d8da681
refactor: remove unused prop
PhilippMa Mar 7, 2025
0cf2d10
refactor: replace divs with mui boxes and fix grid height
PhilippMa Mar 7, 2025
459d509
refactor: change tab name for details tab and remove table title
PhilippMa Mar 7, 2025
06be849
test: fix failing unit test
PhilippMa Mar 7, 2025
6bc2306
feat: configure default column orders in signals per sources table
PhilippMa Mar 7, 2025
de0d026
test: adjust e2e test to reflect recent sorting changes
PhilippMa Mar 7, 2025
9b08952
test: fix failing e2e test
PhilippMa Mar 7, 2025
3ab8cb0
refactor: improve structure of project statistics popup e2e test
PhilippMa Mar 10, 2025
aa83ef3
refactor: address review comments
PhilippMa Mar 10, 2025
5ed9828
fix: small bug introduces in last refactor
PhilippMa Mar 10, 2025
a607186
feat: improve responsive behavior of project statistics popup
PhilippMa Mar 12, 2025
02d7a08
fix: post-rebase cleanup
PhilippMa Mar 12, 2025
30bfbf0
fix: adjust project statistics popup width to properly fit three columns
PhilippMa Mar 12, 2025
c4e78b3
fix: adjust theme breakpoint to match new popup width
PhilippMa Mar 12, 2025
2c8c77d
fix: revert accidentally committed debug code
PhilippMa Mar 12, 2025
5d74560
feat: adjust project statistics popup to support three columns with s…
PhilippMa Mar 12, 2025
9dadf18
Merge pull request #2838 from opossum-tool/feat/statistics-grid-layout
Hellgartner Mar 12, 2025
eb5d7cd
Merge pull request #2816 from opossum-tool/feat/classification-pie-chart
PhilippMa Mar 12, 2025
90c0d3a
chore: no longer use deprecated feature
Hellgartner Mar 11, 2025
111bd72
feat: add sorting wrt. classification
Hellgartner Mar 11, 2025
fb4c774
feat: add the icons to the sort dropdown + as badge
Hellgartner Mar 12, 2025
22d9ba7
test: add e2e test
Hellgartner Mar 12, 2025
1f12e06
Merge pull request #2850 from opossum-tool/feat/sorting-by-classifica…
Hellgartner Mar 13, 2025
ba9aff3
chore: merge branch 'main' into feat/introduce_license_classification
Hellgartner Mar 14, 2025
249be18
feat: make user settings resettable via env variable
Hellgartner Mar 12, 2025
ec372cc
feat: add a checkbox in the menu to check whether to show classificat…
Hellgartner Mar 12, 2025
9f193a4
fix: race condition at window creation
Hellgartner Mar 13, 2025
b146cf0
feat: show some features only if classification is configured
Hellgartner Mar 13, 2025
445ae73
refactor: move the sorting options to a list of configurations
Hellgartner Mar 13, 2025
b7b832f
feat: do not show classification sorting if classification display di…
Hellgartner Mar 13, 2025
fcd47ef
feat: do not show classification progress bar if classification displ…
Hellgartner Mar 14, 2025
42e1b4c
feat: add checkbox for criticality
Hellgartner Mar 14, 2025
9084a1a
feat: do not show criticality statistics if disabled
Hellgartner Mar 14, 2025
0ec254a
feat: do not show criticality progress bar if disabled
Hellgartner Mar 14, 2025
17c71e9
feat: do not show criticality attribution chip if disabled
Hellgartner Mar 14, 2025
1de62af
feat: do not show criticality on the package card if disabled
Hellgartner Mar 14, 2025
c8374d5
feat: do not show criticality on resource tree if disabled
Hellgartner Mar 14, 2025
c038720
feat: do not show criticality on sort options if disabled
Hellgartner Mar 14, 2025
78191bb
feat: do not show progress bar select if only one option
Hellgartner Mar 14, 2025
7c6cc6f
chore: proper default handling removing necessity for most of the nulls
Hellgartner Mar 14, 2025
6bf552d
feat: statistics popup and progress bar share same colors
Hellgartner Mar 14, 2025
b16240a
test: ad test for properly setting default values
Hellgartner Mar 14, 2025
194a1ee
chore: add reducer for user config
Hellgartner Mar 18, 2025
b725fc8
chore: sync user settings on app start
Hellgartner Mar 18, 2025
bc4dee4
chore: keep state in sync with backend
Hellgartner Mar 18, 2025
93def01
chore: move show classifications and show criticality to new approach
Hellgartner Mar 18, 2025
769c623
chore: move the remaining usage of use user settings to the new way
Hellgartner Mar 18, 2025
0f3855f
test: fix e2e tests
Hellgartner Mar 19, 2025
35e7f60
feat: review-comment: fix color for files without classifications
Hellgartner Mar 19, 2025
2e33471
fix: fix updating multiple values
Hellgartner Mar 19, 2025
86a4850
test: add tests for user settings actions
Hellgartner Mar 19, 2025
25861ef
test: add e2e test
Hellgartner Mar 19, 2025
5853263
Merge pull request #2855 from opossum-tool/feat/align_statistics_popu…
Hellgartner Mar 19, 2025
b5eaef5
Merge branch 'main' into feat/introduce_license_classification
Hellgartner Mar 20, 2025
9c3af15
fix: review-comment: add a few empty lines to improve readability
Hellgartner Mar 20, 2025
5393b42
fix: review-comment: Move showing the project popup to the new mechanism
Hellgartner Mar 20, 2025
27149ef
fix: review-comment: Simplify IPC interface
Hellgartner Mar 20, 2025
162eca5
Merge branch 'main' into feat/introduce_license_classification
Hellgartner Mar 20, 2025
a945586
Merge branch 'feat/introduce_license_classification' into feat/make-c…
Hellgartner Mar 20, 2025
b925f7a
refactor: post merge cleanup -- unify switchable menu handling
Hellgartner Mar 20, 2025
ad933a3
Merge branch 'feat/make-classification-and-criticality-optional' into…
Hellgartner Mar 20, 2025
f03015d
refactor: review-column: rename UserSettingsProvider
Hellgartner Mar 20, 2025
8fd911b
refactor: review-comment: make update user settings accept a update f…
Hellgartner Mar 20, 2025
8314a57
refactor: review-comment: user the new capability to inline the toggl…
Hellgartner Mar 20, 2025
3cd7899
feat: respect settings for showing also in overview table
Hellgartner Mar 19, 2025
7b9d4d4
feat: handle case when sorted by column is disabled
Hellgartner Mar 19, 2025
fa3605e
test: review-comment: Improve test
Hellgartner Mar 20, 2025
eb8308d
fix: review-comment: fix corner case
Hellgartner Mar 20, 2025
7870d15
fix: revert accidentally committed code
Hellgartner Mar 24, 2025
9e776e7
fix: review-comment: move expect back to test to avoid linter warnings
Hellgartner Mar 24, 2025
3645445
fix: review-comment: move to one unified useUserSettings
Hellgartner Mar 24, 2025
457aaeb
fix: review-comment: typing and naming improvements
Hellgartner Mar 24, 2025
371186a
refactor: review-comment: preparation - assimilate set and updating f…
Hellgartner Mar 24, 2025
76bbf53
refactor: review-comment: preparation - use update everywhere
Hellgartner Mar 24, 2025
c194ea6
refactor: review-comment: preparation - unify set and update
Hellgartner Mar 24, 2025
01e9d38
refactor: review-comment: use update everywhere
Hellgartner Mar 25, 2025
3c8b452
Merge pull request #2861 from opossum-tool/feat/toggle-also-statistic…
Hellgartner Mar 25, 2025
e9f59ec
fix: merge followup
Hellgartner Mar 25, 2025
d048352
Merge branch 'main' into feat/introduce_license_classification
Hellgartner Mar 25, 2025
5d2874a
Merge branch 'feat/introduce_license_classification' into feat/make-c…
Hellgartner Mar 25, 2025
d60e209
Merge branch 'feat/make-classification-and-criticality-optional' into…
Hellgartner Mar 25, 2025
1922977
refactor: review-comment: Improve naming
Hellgartner Mar 25, 2025
664e0f8
refactor: review-comment: Inline function to improve typing
Hellgartner Mar 25, 2025
4750eaf
refactor: review-comments: extract type to avoid duplication
Hellgartner Mar 25, 2025
51853d2
fix: review-comment: fire effect only if required
Hellgartner Mar 25, 2025
0713319
refactor: review-comment: improve naming
Hellgartner Mar 25, 2025
a028093
fix: remove warn messages from recharts library
Hellgartner Mar 25, 2025
307dd8e
fix: review-comment: remove unnecessary non-null check
Hellgartner Mar 25, 2025
b026f06
fix: review-comment: remove accidentally committed code
Hellgartner Mar 26, 2025
bb42be1
fix: review-comment: improve property naming
Hellgartner Mar 26, 2025
fa9b853
feat: add criticality to users guide
Hellgartner Mar 26, 2025
e9c4723
fix: review-comment: do not render tab content when inactive
Hellgartner Mar 26, 2025
d6d6474
feat: improve icons
Hellgartner Mar 26, 2025
da62518
feat: small wording corrections
Hellgartner Mar 26, 2025
da84695
feat: add hint that criticality and classification information can be…
Hellgartner Mar 26, 2025
d5489ff
fix: review-comment: Improve description of progress bars
Hellgartner Mar 26, 2025
4c95489
fix: review-comment: use title case
Hellgartner Mar 26, 2025
0d09e50
Merge pull request #2868 from opossum-tool/fix/avoid_chart_library_wa…
Hellgartner Mar 26, 2025
eeec7c6
fix: review-comment: simplify logic
Hellgartner Mar 26, 2025
d1dba8f
fix: review-comment: improve naming of test
Hellgartner Mar 26, 2025
cd1fd49
fix: review-comment: add test
Hellgartner Mar 26, 2025
c1a44a5
fix: review-comment: improve test structure and naming
Hellgartner Mar 26, 2025
85fe80c
Merge pull request #2873 from opossum-tool/feat/include-classificatio…
Hellgartner Mar 26, 2025
a918f25
Merge pull request #2853 from opossum-tool/feat/make-classification-a…
Hellgartner Mar 26, 2025
a90c984
Merge branch 'feat/introduce_license_classification' into chore/user-…
Hellgartner Mar 26, 2025
6dee968
Merge pull request #2856 from opossum-tool/chore/user-config-handling…
Hellgartner Mar 26, 2025
c29af26
fix: do no longer show small white lines in header or footer
Hellgartner Mar 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: move handling of invalid configurations to loading of file
* Goal: No need to loop over all external classifications at every place where it is used

Signed-off-by: Dominikus Hellgartner <dominikus.hellgartner@tngtech.com>
Hellgartner committed Mar 11, 2025

Verified

This commit was signed with the committer’s verified signature.
Hellgartner Dominikus Hellgartner
commit 610ab18018f145a0bb43979370a6d2743a908dfa
78 changes: 78 additions & 0 deletions src/ElectronBackend/input/__tests__/checkConfiguration.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// SPDX-FileCopyrightText: Meta Platforms, Inc. and its affiliates
// SPDX-FileCopyrightText: TNG Technology Consulting GmbH <https://www.tngtech.com>
//
// SPDX-License-Identifier: Apache-2.0
import { EMPTY_PROJECT_CONFIG } from '../../../Frontend/shared-constants';
import {
Attributions,
Classifications,
PackageInfo,
ProjectConfig,
} from '../../../shared/shared-types';
import { faker } from '../../../testing/Faker';
import { checkAndUpdateConfiguration } from '../checkConfiguration';

function fakePackagesWithClassifications(
...classificationIds: Array<number>
): Attributions {
const attributions: Attributions = {};
classificationIds
.map((classificationId) =>
faker.opossum.packageInfo({ classification: classificationId }),
)
.forEach((packageInfo: PackageInfo, index: number) => {
attributions[`id${index}`] = packageInfo;
});
return attributions;
}

function fakeConfigWithClassificationIds(...classificationIds: Array<number>) {
const classifications: Classifications = {};
classificationIds.forEach((classificationId) => {
classifications[classificationId] = faker.word.words();
});
const configuration: ProjectConfig = { classifications };
return configuration;
}

describe('check and update configuration', () => {
it('returns configuration with empty classifications if no configuration set', () => {
const result = checkAndUpdateConfiguration(undefined, {});

expect(result).toEqual(EMPTY_PROJECT_CONFIG);
});

it('does not change the configuration if all classifications are correctly set', () => {
const configuration = fakeConfigWithClassificationIds(0, 1);
const expectedConfiguration = { ...configuration };
const externalAttributions = fakePackagesWithClassifications(1, 0, 1, 0);

const result = checkAndUpdateConfiguration(
configuration,
externalAttributions,
);

expect(result).toEqual(expectedConfiguration);
});

it('does updates the classification set on unknown classifications found', () => {
const configuration = fakeConfigWithClassificationIds(0, 1);
const copiedClassifications = { ...configuration.classifications };

const externalAttributions = fakePackagesWithClassifications(0, 1, 22);

const result = checkAndUpdateConfiguration(
configuration,
externalAttributions,
);

const expectedConfiguration = {
classifications: {
...copiedClassifications,
22: 'not configured - 22',
},
};

expect(result).toEqual(expectedConfiguration);
});
});
51 changes: 51 additions & 0 deletions src/ElectronBackend/input/checkConfiguration.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// SPDX-FileCopyrightText: Meta Platforms, Inc. and its affiliates
// SPDX-FileCopyrightText: TNG Technology Consulting GmbH <https://www.tngtech.com>
//
// SPDX-License-Identifier: Apache-2.0
import { EMPTY_PROJECT_CONFIG } from '../../Frontend/shared-constants';
import {
Attributions,
PackageInfo,
ProjectConfig,
} from '../../shared/shared-types';
import logger from '../main/logger';

function checkAndUpdateClassifications(
config: ProjectConfig,
externalAttributions: Attributions,
) {
const classifications = config.classifications;
const configuredAttributionKeys = Object.keys(classifications).map(
(configurationValue) => Number(configurationValue),
);
const containsUnconfiguredClassification = (packageInfo: PackageInfo) =>
packageInfo.classification &&
!configuredAttributionKeys.includes(packageInfo.classification);

const unconfiguredClassifications = Object.values(externalAttributions)
.filter(containsUnconfiguredClassification)
.map<number | undefined>((packageInfo) => packageInfo.classification)
.filter((classificationId) => classificationId !== undefined);
if (unconfiguredClassifications.length) {
logger.warn(
`Detected configuration values without configuration: ${unconfiguredClassifications.join(', ')}`,
);
unconfiguredClassifications.forEach((unconfiguredClassificationId) => {
classifications[unconfiguredClassificationId] =
`not configured - ${unconfiguredClassificationId}`;
});
}
return classifications;
}

export function checkAndUpdateConfiguration(
rawConfig: ProjectConfig | undefined,
externalAttributions: Attributions,
) {
const config = rawConfig ?? EMPTY_PROJECT_CONFIG;
config.classifications = checkAndUpdateClassifications(
config,
externalAttributions,
);
return config;
}
7 changes: 7 additions & 0 deletions src/ElectronBackend/input/importFromFile.ts
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ import {
} from '../types/types';
import { getFilePathWithAppendix } from '../utils/getFilePathWithAppendix';
import { isOpossumFileFormat } from '../utils/isOpossumFileFormat';
import { checkAndUpdateConfiguration } from './checkConfiguration';
import {
parseInputJsonFile,
parseOpossumFile,
@@ -128,6 +129,12 @@ export async function loadInputAndOutputFromFilePath(
parsedInputData.frequentLicenses,
);

logger.info('Checking configuration');
parsedInputData.config = checkAndUpdateConfiguration(
parsedInputData.config,
externalAttributions,
);

if (parsedOutputData === null) {
logger.info('Creating output file');
if (isOpossumFileFormat(filePath)) {

Unchanged files with check annotations Beta

await expect(this.title).toBeHidden({ timeout: 10000 });
},
showsError: async (): Promise<void> => {
await expect(this.errorIcon).toBeVisible();

Check failure on line 51 in src/e2e-tests/page-objects/MergeDialog.ts

GitHub Actions / build-and-test (macos-latest)

src/e2e-tests/__tests__/merge-dialog.test.ts:101:5 › shows error when no file path is set

1) src/e2e-tests/__tests__/merge-dialog.test.ts:101:5 › shows error when no file path is set ───── Error: Timed out 5000ms waiting for expect(locator).toBeVisible() Locator: getByLabel('merge dialog').getByTestId('ErrorIcon').locator('path') Expected: visible Received: <element(s) not found> Call log: - expect.toBeVisible with timeout 5000ms - waiting for getByLabel('merge dialog').getByTestId('ErrorIcon').locator('path') at page-objects/MergeDialog.ts:51 49 | }, 50 | showsError: async (): Promise<void> => { > 51 | await expect(this.errorIcon).toBeVisible(); | ^ 52 | }, 53 | }; 54 | } at Object.showsError (/Users/runner/work/OpossumUI/OpossumUI/src/e2e-tests/page-objects/MergeDialog.ts:51:36) at /Users/runner/work/OpossumUI/OpossumUI/src/e2e-tests/__tests__/merge-dialog.test.ts:110:28
},
};
}