forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexpertise.spec.js
More file actions
27 lines (23 loc) · 924 Bytes
/
expertise.spec.js
File metadata and controls
27 lines (23 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/// <reference types="cypress" />
describe('expertise', () => {
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')
})
}
})
})
})
})
})