Skip to content

[ENG-10348] Funder information, Language, Subject and Resource type should be included on the registration and project overview page metadata panes#974

Open
nsemets wants to merge 4 commits intoCenterForOpenScience:feature/pbs-26-9from
nsemets:fix/ENG-10348
Open

[ENG-10348] Funder information, Language, Subject and Resource type should be included on the registration and project overview page metadata panes#974
nsemets wants to merge 4 commits intoCenterForOpenScience:feature/pbs-26-9from
nsemets:fix/ENG-10348

Conversation

@nsemets
Copy link
Copy Markdown
Collaborator

@nsemets nsemets commented Apr 28, 2026

Summary of Changes

  1. Added resource type, language and funder names to registry and project overview metadata.
  2. Update resource information dialog.
  3. Updated unit tests.

Screenshot(s)

image image image

@nsemets nsemets requested a review from brianjgeiger April 28, 2026 15:04

<p data-test-project-overview-metadata-resource-type>
{{
customItemMetadata()?.resourceTypeGeneral
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This customItemMetadata() is called twice per change detection cycle in the ternary expressions. Consider using an @let block to compute it once, or handle the empty-value case inside the pipe's transform method

const dialogRef = TestBed.inject(DynamicDialogRef);
const closeSpy = vi.spyOn(dialogRef, 'close');
it('should not close dialog on save when form is invalid', () => {
component.resourceForm.setErrors({ invalid: true });
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here component.resourceForm.setErrors({ invalid: true }) sets errors on the form group, not on individual controls. I guess Angular's resourceForm.valid is determined by control-level validators, group-level errors do NOT make valid return false. This test will pass for the wrong reason.
Use resourceForm.controls.resourceType.setErrors({ required: true }) (or whichever control drives validation) to actually test the invalid-form guard.

@nsemets nsemets changed the base branch from develop to feature/pbs-26-9 May 4, 2026 16:56
@nsemets nsemets requested a review from omar-cos May 5, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants