Skip to content

Commit

Permalink
fix(datahub): do not handle absence of datasets in org (this never ha…
Browse files Browse the repository at this point in the history
…ppens)
  • Loading branch information
jahow committed Oct 17, 2024
1 parent cdb75d6 commit e5f6507
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,7 @@
</div>

<div id="lastPublishedDatasets" data-test="lastPubliDatasets">
<ng-container
*ngIf="
!isSearchFacadeLoading && lastPublishedDatasets.length > 0;
else orgHasNoDataset
"
>
<ng-container *ngIf="!isSearchFacadeLoading">
<div
class="mb-4 flex flex-wrap gap-9 justify-center sm:justify-start px-[25px]"
data-test="orgPageLasPubDat"
Expand Down Expand Up @@ -136,16 +131,6 @@
<gn-ui-spinning-loader></gn-ui-spinning-loader>
</div>
</ng-container>

<ng-template
#orgHasNoDataset
*ngIf="!isSearchFacadeLoading"
data-test="orgHasNoDataset"
>
<gn-ui-error
[type]="ErrorType.ORGANIZATION_HAS_NO_DATASET"
></gn-ui-error>
</ng-template>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,6 @@ describe('OrganizationDetailsComponent', () => {

expect(orgPageLasPubDat?.children.length).toEqual(1)
})

it('should display the orgHasNodataset error component if the org has no dataset', () => {
results.next([])
fixture.detectChanges()

const orgHasNoDataset = getHTMLElement('lastPubliDatasets')

expect(orgHasNoDataset).toBeTruthy()
})
})
})

Expand Down
2 changes: 2 additions & 0 deletions libs/ui/elements/src/lib/error/error.component.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export const Primary: StoryObj<ErrorComponent> = {
ErrorType.COULD_NOT_REACH_API,
ErrorType.RECORD_NOT_FOUND,
ErrorType.DATASET_HAS_NO_LINK,
ErrorType.ORGANIZATION_HAS_NO_DATASET,
ErrorType.ORGANIZATION_NOT_FOUND,
],
},
},
Expand Down

0 comments on commit e5f6507

Please sign in to comment.