Skip to content

Commit 8ab1408

Browse files
author
nick
committed
feat: add nomcom expand panel test (with missing file)
Commit ready for merge. - Legacy-Id: 19697
1 parent 8ff662a commit 8ab1408

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/// <reference types="cypress" />
2+
3+
describe('nomcom', () => {
4+
before(() => {
5+
cy.visit('/nomcom/2021/expertise/')
6+
})
7+
8+
it('expertises with expandable panels should expand', () => {
9+
cy.get('.nomcom-req-positions-tabs > li > a').each($tab => {
10+
cy.wrap($tab).click()
11+
cy.wrap($tab).parent().should('have.class', 'active')
12+
13+
cy.wrap($tab).invoke('attr', 'href').then($tabId => {
14+
cy.get($tabId).should('have.class', 'tab-pane').and('have.class', 'active').and('be.visible')
15+
16+
cy.get($tabId).then($tabContent => {
17+
if ($tabContent.find('.generic_iesg_reqs_header').length) {
18+
cy.wrap($tabContent).find('.generic_iesg_reqs_header').click()
19+
cy.wrap($tabContent).find('.generic_iesg_reqs_header').invoke('attr', 'href').then($expandId => {
20+
cy.get($expandId).should('be.visible')
21+
})
22+
}
23+
})
24+
})
25+
})
26+
})
27+
})

0 commit comments

Comments
 (0)