feat: add nomcom questionnaires tabs tests
Commit ready for merge. - Legacy-Id: 19698
This commit is contained in:
parent
8ab1408b66
commit
b98c7ec3bd
|
@ -58,18 +58,19 @@
|
||||||
|
|
||||||
// Add the IDs of extensions you want installed when the container is created.
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"ms-python.python",
|
"ms-python.python",
|
||||||
"ms-python.vscode-pylance",
|
"ms-python.vscode-pylance",
|
||||||
"ms-azuretools.vscode-docker",
|
"ms-azuretools.vscode-docker",
|
||||||
"editorconfig.editorconfig",
|
"editorconfig.editorconfig",
|
||||||
"redhat.vscode-yaml",
|
"redhat.vscode-yaml",
|
||||||
"visualstudioexptteam.vscodeintellicode",
|
"visualstudioexptteam.vscodeintellicode",
|
||||||
"batisteo.vscode-django",
|
"batisteo.vscode-django",
|
||||||
"mutantdino.resourcemonitor",
|
"mutantdino.resourcemonitor",
|
||||||
"spmeesseman.vscode-taskexplorer",
|
"spmeesseman.vscode-taskexplorer",
|
||||||
"mtxr.sqltools",
|
"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.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
"forwardPorts": [8000, 3306],
|
"forwardPorts": [8000, 3306],
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
describe('nomcom', () => {
|
describe('expertise', () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.visit('/nomcom/2021/expertise/')
|
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 %}
|
{% origin %}
|
||||||
<h2>Questionnaires</h2>
|
<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 %}
|
{% for position in positions %}
|
||||||
<li {% if forloop.first %}class="active"{% endif %}>
|
<li {% if forloop.first %}class="active"{% endif %}>
|
||||||
<a data-toggle="tab" role="tab" href="#{{ position.name|slugify }}">{{ position.name }}</a>
|
<a data-toggle="tab" role="tab" href="#{{ position.name|slugify }}">{{ position.name }}</a>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="tab-content">
|
<div class="nomcom-questnr-positions-content tab-content">
|
||||||
{% for position in positions %}
|
{% for position in positions %}
|
||||||
<div class="tab-pane {% if forloop.first %}active{% endif %}" id="{{ position.name|slugify }}">
|
<div class="tab-pane {% if forloop.first %}active{% endif %}" id="{{ position.name|slugify }}">
|
||||||
{{ position.get_questionnaire|linebreaks}}
|
{{ position.get_questionnaire|linebreaks}}
|
||||||
|
|
Loading…
Reference in a new issue