Skip to content

[ENG-9827] - Revert metadata creation workflow#1000

Open
Vlad0n20 wants to merge 4 commits into
CenterForOpenScience:feature/es2-consolidationfrom
Vlad0n20:feat/ENG-9827
Open

[ENG-9827] - Revert metadata creation workflow#1000
Vlad0n20 wants to merge 4 commits into
CenterForOpenScience:feature/es2-consolidationfrom
Vlad0n20:feat/ENG-9827

Conversation

@Vlad0n20
Copy link
Copy Markdown
Contributor

  • Ticket: [ENG-9827]
  • Feature flag: n/a

Purpose

Summary of Changes

Screenshot(s)

Side Effects

QA Notes

}),
];
const apiFilterKeys = new Set(response.filters.map((f) => f.key));
const merged = [...response.filters, ...extraFilters.filter((f) => !apiFilterKeys.has(f.key))];
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I hope it will not break anything in search.

private readonly signpostingService = inject(SignpostingService);

readonly collectionSubmissionWithCedar = this.environment.collectionSubmissionWithCedar;
activeFlags = select(UserSelectors.getActiveFlags);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
activeFlags = select(UserSelectors.getActiveFlags);
private readonly activeFlags = select(UserSelectors.getActiveFlags);

Comment on lines +59 to +60
collectionLicenses: {
...state.collectionLicenses,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why did you change it to collectionLicenses if it updates currentProjectSubmission below?

if (!this.useShareTroveSearch() || !provider || !collectionId || this.defaultSearchFiltersInitialized()) return;

this.actions.setDefaultFilterValue('isContainedBy', provider.iri);
const collectionIri = `${this.environment.apiDomainUrl}/v2/collections/${collectionId}/`;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I am not sure if it is good idea to use like this. I prefer using iri from API data.

data: { '@context': {} },
id: 'template-1',
isPublished: true,
} as any;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Use correct model and not any.

expect(store.dispatch).toHaveBeenCalledWith(
new CreateCedarMetadataRecord(MOCK_CEDAR_DATA, 'project-1', ResourceType.Project)
);
expect(store.dispatch).toHaveBeenCalledWith(new CreateCollectionSubmission({ title: 'Submission' } as any));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Use correct model here and not any. Also update other places with any.

.subscribe({
next: () => {
this.toastService.showSuccess('collections.removeDialog.success');
this.loaderService.show();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do add it here?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It needs to cover all ts code with unit tests.

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.

3 participants