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

[Datahub]: Fix missing "record not found" message #884

Merged
merged 3 commits into from
May 29, 2024
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
9 changes: 9 additions & 0 deletions apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -797,3 +797,12 @@ describe('userFeedback', () => {
})
})
})

describe('When the metadata does not exists', () => {
beforeEach(() => {
cy.visit('/dataset/xyz')
})
it('should display an error message', () => {
cy.get('gn-ui-search-results-error').should('exist')
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,17 @@
<div class="container-lg mx-auto h-[1096px] sm:h-96"></div>
</div>
</div>
</div>
<div id="userFeedbacks" class="bg-primary-opacity-10 py-16 mt-[32px]">
<div class="container-lg px-4 lg:mx-auto">
<datahub-record-user-feedbacks
[organisationName$]="organisationName$"
[metadataUuid]="metadataUuid$ | async"
></datahub-record-user-feedbacks>
<div
*ngIf="(metadataViewFacade.isPresent$ | async) === true"
id="userFeedbacks"
class="bg-primary-opacity-10 py-16 mt-[32px]"
>
<div class="container-lg px-4 lg:mx-auto">
<datahub-record-user-feedbacks
[organisationName$]="organisationName$"
[metadataUuid]="metadataUuid$ | async"
></datahub-record-user-feedbacks>
</div>
</div>
</div>
<div
Expand Down
2 changes: 0 additions & 2 deletions libs/feature/record/src/lib/state/mdview.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ const metadataViewReducer = createReducer(
*/
on(MetadataViewActions.loadUserFeedbacks, (state) => ({
...state,
error: null,
allUserFeedbacksLoading: true,
})),
on(MetadataViewActions.addUserFeedback, (state) => ({
Expand All @@ -93,7 +92,6 @@ const metadataViewReducer = createReducer(
MetadataViewActions.loadUserFeedbacksSuccess,
(state, { userFeedbacks }) => ({
...state,
error: null,
userFeedbacks: userFeedbacks,
addUserFeedbackLoading: false,
allUserFeedbacksLoading: false,
Expand Down
Loading