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 @@
{{ (isExpanded ? 'ui.readLess' : 'ui.readMore') | translate }}
diff --git a/libs/ui/elements/src/lib/max-lines/max-lines.component.ts b/libs/ui/elements/src/lib/max-lines/max-lines.component.ts index 22654cba0f..ff55be7b87 100644 --- a/libs/ui/elements/src/lib/max-lines/max-lines.component.ts +++ b/libs/ui/elements/src/lib/max-lines/max-lines.component.ts @@ -62,7 +62,7 @@ export class MaxLinesComponent implements AfterViewInit, OnDestroy { } containerElement.setAttribute( 'style', - `height: ${this.maxHeight}; max-height: ${this.maxHeight}; overflow: hidden` + `max-height: ${this.maxHeight}; overflow: hidden` ) this.cdr.detectChanges() diff --git a/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html b/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html index 0ab056c244..d614a93be2 100644 --- a/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +++ b/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html @@ -7,29 +7,30 @@
-

+
+

+ +

+ record.metadata.keywords +

+
+ {{ keyword }} +
+
+
- -

- record.metadata.keywords -

-
- {{ keyword }} -
-
-