From 8ab1408b6685eb0347317490278344f131abd0f6 Mon Sep 17 00:00:00 2001 From: nick Date: Mon, 22 Nov 2021 17:39:05 +0000 Subject: [PATCH] feat: add nomcom expand panel test (with missing file) Commit ready for merge. - Legacy-Id: 19697 --- cypress/integration/meeting/nomcom.spec.js | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 cypress/integration/meeting/nomcom.spec.js diff --git a/cypress/integration/meeting/nomcom.spec.js b/cypress/integration/meeting/nomcom.spec.js new file mode 100644 index 000000000..183772716 --- /dev/null +++ b/cypress/integration/meeting/nomcom.spec.js @@ -0,0 +1,27 @@ +/// + +describe('nomcom', () => { + before(() => { + cy.visit('/nomcom/2021/expertise/') + }) + + it('expertises with expandable panels should expand', () => { + cy.get('.nomcom-req-positions-tabs > li > a').each($tab => { + cy.wrap($tab).click() + cy.wrap($tab).parent().should('have.class', 'active') + + cy.wrap($tab).invoke('attr', 'href').then($tabId => { + cy.get($tabId).should('have.class', 'tab-pane').and('have.class', 'active').and('be.visible') + + cy.get($tabId).then($tabContent => { + if ($tabContent.find('.generic_iesg_reqs_header').length) { + cy.wrap($tabContent).find('.generic_iesg_reqs_header').click() + cy.wrap($tabContent).find('.generic_iesg_reqs_header').invoke('attr', 'href').then($expandId => { + cy.get($expandId).should('be.visible') + }) + } + }) + }) + }) + }) +}) \ No newline at end of file