diff --git a/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts b/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts index 9e45355f2e..2bfb3ef028 100644 --- a/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts +++ b/apps/datahub-e2e/src/e2e/datasetDetailPage.cy.ts @@ -558,7 +558,7 @@ describe.only('api form', () => { cy.get('@apiForm').find('input[type="checkbox"]').check() cy.get('@apiForm').find('gn-ui-text-input').first().should('have.value', '') }) - it.only('should reset all 3 inputs and link on click', () => { + it('should reset all 3 inputs and link on click', () => { cy.get('@apiForm').find('gn-ui-text-input').first().as('firstInput') cy.get('@firstInput').clear() cy.get('@firstInput').type('54') @@ -591,21 +591,26 @@ describe.only('api form', () => { .invoke('val') .should('include', 'f=json') }) - it('should have close button', () => { - cy.get('@apiForm').siblings().find('button') - // sibling of apiForm - }) it('should close the panel on click', () => { - // get the close button - // click on it - // check that the panel does not exist - cy.get('@apiForm') + cy.get('gn-ui-record-api-form').prev().find('button').click() + cy.get('gn-ui-record-api-form').should('not.exist') }) it('should switch to other card url if card already open', () => { - // get the current url - // do then - // click on other card button - // check that the url is now different cy.get('@apiForm') + .find('gn-ui-copy-text-button') + .find('input') + .invoke('val') + .then((url) => { + cy.get('@apiForm').find('gn-ui-text-input').first().clear() + cy.get('@apiForm').find('gn-ui-text-input').first().type('54') + cy.get('gn-ui-api-card').eq(1).find('button').click() + cy.get('@apiForm') + .find('gn-ui-copy-text-button') + .find('input') + .invoke('val') + .then((newUrl) => { + expect(newUrl).to.not.eq(url) + }) + }) }) })