feat: add nomcom questionnaires tabs tests
Commit ready for merge. - Legacy-Id: 19698
This commit is contained in:
parent
8ab1408b66
commit
b98c7ec3bd
|
@ -68,7 +68,8 @@
|
|||
"mutantdino.resourcemonitor",
|
||||
"spmeesseman.vscode-taskexplorer",
|
||||
"mtxr.sqltools",
|
||||
"mtxr.sqltools-driver-mysql"
|
||||
"mtxr.sqltools-driver-mysql",
|
||||
"mrmlnc.vscode-duplicate"
|
||||
],
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// <reference types="cypress" />
|
||||
|
||||
describe('nomcom', () => {
|
||||
describe('expertise', () => {
|
||||
before(() => {
|
||||
cy.visit('/nomcom/2021/expertise/')
|
||||
})
|
18
cypress/integration/nomcom/questionnaires.spec.js
Normal file
18
cypress/integration/nomcom/questionnaires.spec.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
/// <reference types="cypress" />
|
||||
|
||||
describe('questionnaires', () => {
|
||||
before(() => {
|
||||
cy.visit('/nomcom/2021/questionnaires/')
|
||||
})
|
||||
|
||||
it('position tabs should display the appropriate panel on click', () => {
|
||||
cy.get('.nomcom-questnr-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')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
|
@ -8,7 +8,7 @@
|
|||
{% origin %}
|
||||
<h2>Questionnaires</h2>
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<ul class="nomcom-questnr-positions-tabs nav nav-tabs" role="tablist">
|
||||
{% for position in positions %}
|
||||
<li {% if forloop.first %}class="active"{% endif %}>
|
||||
<a data-toggle="tab" role="tab" href="#{{ position.name|slugify }}">{{ position.name }}</a>
|
||||
|
@ -16,7 +16,7 @@
|
|||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="nomcom-questnr-positions-content tab-content">
|
||||
{% for position in positions %}
|
||||
<div class="tab-pane {% if forloop.first %}active{% endif %}" id="{{ position.name|slugify }}">
|
||||
{{ position.get_questionnaire|linebreaks}}
|
||||
|
|
Loading…
Reference in a new issue