Skip to content

Commit

Permalink
removed the duplicate "Record with no link" dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
Romuald Caplier committed Jul 24, 2024
1 parent 8ddb832 commit 0587e8a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 14 deletions.
2 changes: 1 addition & 1 deletion apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ describe('dataset pages', () => {
})
})

describe.only('When there is no link', () => {
describe('When there is no link', () => {
it('display the error datasetHasNoLink error block', () => {
cy.login()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class MdViewFacadeMock {
otherLinks$ = new BehaviorSubject([])
related$ = new BehaviorSubject(null)
error$ = new BehaviorSubject(null)
isMetadataLoading$ = new BehaviorSubject(false)
}

class SearchServiceMock {
Expand Down Expand Up @@ -659,20 +660,39 @@ describe('RecordMetadataComponent', () => {
})

describe('When there are no link (download, api or other links)', () => {
beforeEach(() => {
facade.apiLinks$.next([])
facade.downloadLinks$.next([])
facade.otherLinks$.next([])
fixture.detectChanges()
describe('When the metadata is not fully loaded', () => {
beforeEach(() => {
facade.isMetadataLoading$.next(true)
facade.apiLinks$.next([])
facade.downloadLinks$.next([])
facade.otherLinks$.next([])
fixture.detectChanges()
})
it("doesn' show the no link error block", () => {
const result = fixture.debugElement.query(
By.css('[data-test="dataset-has-no-link-block"]')
)
expect(result).toBeFalsy()
})
})
it('shows the no link error block', () => {
const result = fixture.debugElement.query(
By.css('[data-test="dataset-has-no-link-block"]')
)
expect(result).toBeTruthy()
expect(result.componentInstance.type).toBe(
ErrorType.DATASET_HAS_NO_LINK
)

describe('When the metadata is not fully loaded', () => {
beforeEach(() => {
facade.isMetadataLoading$.next(false)
facade.apiLinks$.next([])
facade.downloadLinks$.next([])
facade.otherLinks$.next([])
fixture.detectChanges()
})
it('shows the no link error block', () => {
const result = fixture.debugElement.query(
By.css('[data-test="dataset-has-no-link-block"]')
)
expect(result).toBeTruthy()
expect(result.componentInstance.type).toBe(
ErrorType.DATASET_HAS_NO_LINK
)
})
})
})
})
Expand Down
Binary file modified support-services/docker-entrypoint-initdb.d/dump
Binary file not shown.

0 comments on commit 0587e8a

Please sign in to comment.