Skip to content

Commit 9bb6811

Browse files
authored
Merge pull request #2701 from opossum-tool/fix-license-name-field-label
fix: change field "license name" to "license expression"
2 parents 58e68f2 + 678ce0d commit 9bb6811

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

CONTRIBUTORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ SPDX-License-Identifier: CC0-1.0
1414
- **[Benedikt Richter](https://github.com/benedikt-richter)** (<benedikt.richter@tngtech.com>)
1515
- **[Benjamin Petek](https://github.com/b-petek)**
1616
- **[David Mundelius](https://github.com/davidmundelius)** (<david.mundelius@tngtech.com>)
17+
- **[Dominikus Hellgartner](https://github.com/Hellgartner)** (<dominikus.hellgartner@tngtech.com>)
1718
- **[Florian Schepers](https://github.com/FlorianSchepers)** (<florian.schepers@tngtech.com>)
1819
- **[Indira Bhatt](https://github.com/indirabhatt)** (<Indira.bhatt@gmail.com>)
1920
- **[Jakob Schubert](https://github.com/JakobSchubert)**

src/Frontend/Components/AttributionForm/LicenseSubPanel/LicenseSubPanel.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export function LicenseSubPanel({
7777
<MuiBox display={'flex'} alignItems={'center'} gap={'8px'}>
7878
<PackageAutocomplete
7979
attribute={'licenseName'}
80-
title={text.attributionColumn.licenseName}
80+
title={text.attributionColumn.licenseExpression}
8181
packageInfo={packageInfo}
8282
readOnly={!onEdit}
8383
showHighlight={showHighlight}

src/Frontend/Components/AttributionForm/__tests__/AttributionForm.test.tsx

+11-1
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,16 @@ describe('AttributionForm', () => {
267267
renderComponent(<AttributionForm packageInfo={packageInfo} />);
268268

269269
expect(screen.queryByLabelText('Copyright')).not.toBeInTheDocument();
270-
expect(screen.queryByLabelText('License Name')).not.toBeInTheDocument();
270+
expect(
271+
screen.queryByLabelText('License Expression'),
272+
).not.toBeInTheDocument();
273+
});
274+
275+
it('does show copyright or license name fields when attribution is third party', () => {
276+
const packageInfo = faker.opossum.packageInfo({ firstParty: false });
277+
renderComponent(<AttributionForm packageInfo={packageInfo} />);
278+
279+
expect(screen.getByLabelText('Copyright')).toBeInTheDocument();
280+
expect(screen.getByLabelText('License Expression')).toBeInTheDocument();
271281
});
272282
});

src/e2e-tests/page-objects/AttributionForm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class AttributionForm {
7777
this.comment = this.node.getByLabel('Comment', { exact: true });
7878
this.copyright = this.node.getByLabel('Copyright', { exact: true });
7979
this.licenseName = this.node.getByLabel(
80-
text.attributionColumn.licenseName,
80+
text.attributionColumn.licenseExpression,
8181
{
8282
exact: true,
8383
},

src/shared/text.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const text = {
2424
homepage: 'Homepage',
2525
invalidPurl: 'INVALID PURL',
2626
legalInformation: 'Legal Information',
27-
licenseName: 'License Name',
27+
licenseExpression: 'License Expression',
2828
licenseText: 'License Text',
2929
licenseTextDefault: 'License Text (inferred from license name)',
3030
link: 'Link as attribution on selected resource',

0 commit comments

Comments
 (0)