diff --git a/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts b/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts index 3e65952974..a13e935c01 100644 --- a/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts +++ b/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts @@ -108,6 +108,7 @@ describe('dataset pages', () => { .find('gn-ui-content-ghost') .find('gn-ui-max-lines') .children('div') + .children('div') .children('p') .should(($element) => { const text = $element.text().trim() @@ -148,8 +149,11 @@ describe('dataset pages', () => { cy.get('datahub-record-metadata') .find('[id="about"]') .find('gn-ui-metadata-info') + .find('gn-ui-content-ghost') + .find('gn-ui-max-lines') + .children('div') + .children('div') .children('div') - .eq(1) .children('gn-ui-badge') .should('have.length.gt', 0) }) @@ -195,22 +199,26 @@ describe('dataset pages', () => { cy.get('datahub-record-metadata') .find('[id="about"]') .find('gn-ui-metadata-info') + .find('gn-ui-content-ghost') + .find('gn-ui-max-lines') + .children('div') + .contains('Read more') + .click() + + cy.get('datahub-record-metadata') + .find('gn-ui-badge') .children('div') - .eq(1) - .children('gn-ui-badge') .first() .as('keyword') - cy.get('@keyword') - .children('div') - .then((key) => { - keyword = key.text().toUpperCase() - cy.get('@keyword').click() - cy.url().should('include', '/search?q=') - cy.get('gn-ui-fuzzy-search') - .find('input') - .should('have.value', keyword) - }) + cy.get('@keyword').then((key) => { + keyword = key.text().toUpperCase() + cy.get('@keyword').first().click() + cy.url().should('include', '/search?q=') + cy.get('gn-ui-fuzzy-search') + .find('input') + .should('have.value', keyword) + }) }) }) }) @@ -445,7 +453,7 @@ describe('dataset pages', () => { .find('gn-ui-copy-text-button') .find('button') .first() - .click({ force: true }) + .realClick() // attempt to make the whole page focused cy.get('body').focus() cy.get('body').realClick() diff --git a/libs/ui/elements/src/lib/max-lines/max-lines.component.html b/libs/ui/elements/src/lib/max-lines/max-lines.component.html index 040a870e84..42dee99803 100644 --- a/libs/ui/elements/src/lib/max-lines/max-lines.component.html +++ b/libs/ui/elements/src/lib/max-lines/max-lines.component.html @@ -9,7 +9,7 @@
+ record.metadata.keywords +
+- record.metadata.keywords -
-