|
|
@@ -2,6 +2,7 @@
|
|
|
describe('Test the /structures page', () => {
|
|
|
beforeEach(() => {
|
|
|
cy.visit('/structures?parent=12097')
|
|
|
+ cy.contains('Nos Structures adhérentes', { timeout: 10000 })
|
|
|
})
|
|
|
|
|
|
it('Map, filters, and all results shall display by default', () => {
|
|
|
@@ -119,7 +120,7 @@ describe('Test the /structures page', () => {
|
|
|
})
|
|
|
|
|
|
it('The results shall be filtered according to the practice filter', () => {
|
|
|
- cy.getByLabel('.v-select__selections', 'Type').click()
|
|
|
+ cy.getByLabel('input:visible', 'Type').click()
|
|
|
cy.get('.v-list-item').contains('Big band').click()
|
|
|
cy.contains('Rechercher').click()
|
|
|
|
|
|
@@ -127,7 +128,7 @@ describe('Test the /structures page', () => {
|
|
|
})
|
|
|
|
|
|
it('The results shall be filtered according to the department filter', () => {
|
|
|
- cy.getByLabel('.v-select__selections', 'Département').click()
|
|
|
+ cy.getByLabel('input:visible', 'Département').click()
|
|
|
cy.get('.v-list-item').contains('01 - Ain').click()
|
|
|
cy.contains('Rechercher').click()
|
|
|
|
|
|
@@ -138,7 +139,7 @@ describe('Test the /structures page', () => {
|
|
|
})
|
|
|
|
|
|
it('The results shall be filtered according to the federation filter', () => {
|
|
|
- cy.getByLabel('.v-select__selections', 'Fédération').click()
|
|
|
+ cy.getByLabel('input:visible', 'Fédération').click()
|
|
|
cy.get('.v-list-item').contains('CONFÉDÉRATION MUSICALE DE FRANCE').click()
|
|
|
cy.contains('Rechercher').click()
|
|
|
|
|
|
@@ -159,11 +160,11 @@ describe('Test the /structures page', () => {
|
|
|
cy.getByLabel('input', 'Quoi ?').type('some long text that will hopefully match no result')
|
|
|
cy.getByLabel('input:visible', 'Où ?').type('vesoul')
|
|
|
cy.get('.v-list-item div').contains(/Vesoul \(\d{5}\)/).click()
|
|
|
- cy.getByLabel('.v-select__selections', 'Type').click()
|
|
|
+ cy.getByLabel('input:visible', 'Type').click()
|
|
|
cy.get('.v-list-item').contains('Big band').click()
|
|
|
- cy.getByLabel('.v-select__selections', 'Département').click()
|
|
|
+ cy.getByLabel('input:visible', 'Département').click()
|
|
|
cy.get('.v-list-item').contains('01 - Ain').click()
|
|
|
- cy.getByLabel('.v-select__selections', 'Fédération').click()
|
|
|
+ cy.getByLabel('input:visible', 'Fédération').click()
|
|
|
cy.get('.v-list-item').contains('CONFÉDÉRATION MUSICALE DE FRANCE').click()
|
|
|
cy.getByLabel('.v-select__selections', 'Distance').click()
|
|
|
cy.get('.v-list-item').contains('10km').click()
|
|
|
@@ -177,10 +178,10 @@ describe('Test the /structures page', () => {
|
|
|
|
|
|
cy.getByLabel('input', 'Quoi ?').should('not.have.value', 'foo')
|
|
|
cy.getByLabel('input:visible', 'Où ?').should('not.have.value', 'bar')
|
|
|
- cy.getByLabel('input', 'Type').should('not.have.value', 'Big band')
|
|
|
- cy.getByLabel('input', 'Département').should('not.have.value', '01 - Ain')
|
|
|
- cy.getByLabel('input', 'Fédération').should('not.have.value', 'CONFÉDÉRATION MUSICALE DE FRANCE')
|
|
|
- cy.getByLabel('input', 'Distance').should('not.have.value', '10km')
|
|
|
+ cy.getByLabel('input:visible', 'Type').should('not.have.value', 'Big band')
|
|
|
+ cy.getByLabel('input:visible', 'Département').should('not.have.value', '01 - Ain')
|
|
|
+ cy.getByLabel('input:visible', 'Fédération').should('not.have.value', 'CONFÉDÉRATION MUSICALE DE FRANCE')
|
|
|
+ cy.getByLabel('input:visible', 'Distance').should('not.have.value', '10km')
|
|
|
|
|
|
cy.get('.structure-card')
|
|
|
.should('have.length.gt', 0)
|