瀏覽代碼

add basic tests for the details page

Olivier Massot 4 年之前
父節點
當前提交
6adee2542d
共有 1 個文件被更改,包括 18 次插入0 次删除
  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')
+  })
+})