[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
Conversation
…registry overview metadata
omar-cos
reviewed
May 4, 2026
|
|
||
| <p data-test-project-overview-metadata-resource-type> | ||
| {{ | ||
| customItemMetadata()?.resourceTypeGeneral |
There was a problem hiding this comment.
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
omar-cos
reviewed
May 4, 2026
omar-cos
reviewed
May 4, 2026
| 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 }); |
There was a problem hiding this comment.
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.
omar-cos
suggested changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Screenshot(s)