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

fix: change field "license name" to "license expression" #2701

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ SPDX-License-Identifier: CC0-1.0
- **[Benedikt Richter](https://github.com/benedikt-richter)** (<benedikt.richter@tngtech.com>)
- **[Benjamin Petek](https://github.com/b-petek)**
- **[David Mundelius](https://github.com/davidmundelius)** (<david.mundelius@tngtech.com>)
- **[Dominikus Hellgartner](https://github.com/Hellgartner)** (<dominikus.hellgartner@tngtech.com>)
- **[Florian Schepers](https://github.com/FlorianSchepers)** (<florian.schepers@tngtech.com>)
- **[Indira Bhatt](https://github.com/indirabhatt)** (<Indira.bhatt@gmail.com>)
- **[Jakob Schubert](https://github.com/JakobSchubert)**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function LicenseSubPanel({
<MuiBox display={'flex'} alignItems={'center'} gap={'8px'}>
<PackageAutocomplete
attribute={'licenseName'}
title={text.attributionColumn.licenseName}
title={text.attributionColumn.licenseExpression}
packageInfo={packageInfo}
readOnly={!onEdit}
showHighlight={showHighlight}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,16 @@ describe('AttributionForm', () => {
renderComponent(<AttributionForm packageInfo={packageInfo} />);

expect(screen.queryByLabelText('Copyright')).not.toBeInTheDocument();
expect(screen.queryByLabelText('License Name')).not.toBeInTheDocument();
expect(
screen.queryByLabelText('License Expression'),
).not.toBeInTheDocument();
});

it('does show copyright or license name fields when attribution is third party', () => {
const packageInfo = faker.opossum.packageInfo({ firstParty: false });
renderComponent(<AttributionForm packageInfo={packageInfo} />);

expect(screen.getByLabelText('Copyright')).toBeInTheDocument();
expect(screen.getByLabelText('License Expression')).toBeInTheDocument();
});
});
2 changes: 1 addition & 1 deletion src/e2e-tests/page-objects/AttributionForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class AttributionForm {
this.comment = this.node.getByLabel('Comment', { exact: true });
this.copyright = this.node.getByLabel('Copyright', { exact: true });
this.licenseName = this.node.getByLabel(
text.attributionColumn.licenseName,
text.attributionColumn.licenseExpression,
{
exact: true,
},
Expand Down
2 changes: 1 addition & 1 deletion src/shared/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const text = {
homepage: 'Homepage',
invalidPurl: 'INVALID PURL',
legalInformation: 'Legal Information',
licenseName: 'License Name',
licenseExpression: 'License Expression',
licenseText: 'License Text',
licenseTextDefault: 'License Text (inferred from license name)',
link: 'Link as attribution on selected resource',
Expand Down
Loading