Skip to content

Commit

Permalink
feat(DH): Fix unit test and some e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Angi-Kinas committed Jan 9, 2024
1 parent 3c0ca21 commit fff7713
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
17 changes: 3 additions & 14 deletions apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,7 @@ describe('dataset pages', () => {
.find('[id="about"]')
.find('gn-ui-metadata-contact')
.should('have.length', 1)
cy.get('datahub-record-metadata')
.find('[id="about"]')
.find('gn-ui-metadata-contact')
.children('div')
.children('a')
.eq(0)
cy.get('[data-cy="contact-email"]')
.invoke('text')
.should('include', '@')
cy.get('datahub-record-metadata')
Expand Down Expand Up @@ -174,6 +169,7 @@ describe('dataset pages', () => {
.children('div')
.children('div')
.find('a')
.first()
.as('proviLink')

cy.get('@proviLink')
Expand All @@ -185,14 +181,7 @@ describe('dataset pages', () => {
})
})
it('should go to dataset search page when clicking on org name and filter by org', () => {
cy.get('datahub-record-metadata')
.find('[id="about"]')
.find('gn-ui-metadata-contact')
.children('div')
.children('div')
.children('div')
.first()
.click()
cy.get('[data-cy="organization-name"]').click()
cy.url().should('include', '/search?publisher=')
})
it('should go to dataset search page when clicking on keyword and filter by keyword', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<div
class="text-primary font-title text-21 mr-2 cursor-pointer hover:underline"
(click)="onOrganizationClick()"
data-cy="organization-name"
>
{{ shownOrganization.name }}
</div>
Expand Down Expand Up @@ -55,6 +56,7 @@
[href]="'mailto:' + contacts[0].email"
class="text-sm hover:underline ml-2"
target="_blank"
data-cy="contact-email"
>{{ contacts[0].email }}</a
>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('MetadataContactComponent', () => {
describe('content', () => {
let email
beforeEach(() => {
email = fixture.debugElement.query(By.css('a'))
email = fixture.debugElement.queryAll(By.css('a'))[1]
})
it('displays the contact name', () => {
const el = fixture.debugElement.query(
Expand Down

0 comments on commit fff7713

Please sign in to comment.