Browse Source

add basic tests for the details page

Olivier Massot 4 years ago
parent
commit
6adee2542d
1 changed files with 18 additions and 0 deletions
  1. 18 0
      test/cypress/integration/structures/_id.spec.js

+ 18 - 0
test/cypress/integration/structures/_id.spec.js

@@ -0,0 +1,18 @@
+
+describe('Test the /structures page', () => {
+  beforeEach(() => {
+    cy.visit('/structures/498')
+  })
+
+  it('Expected elements are presents', () => {
+    cy.get('h2').contains('Orchestre d\'Harmonie de Cluses')
+    cy.get('.v-chip').contains('Orchestre d\'harmonie')
+    cy.get('h4').contains('Descriptif')
+    cy.get('h4').contains('Contact')
+
+    // leaflet map is visible and was correctly instanciated
+    cy.get('#map', { timeout: 8000 })
+      .should('be.visible')
+      .children('.leaflet-pane')
+  })
+})