Browse Source

add tests skeletons

Olivier Massot 4 years ago
parent
commit
5fddf33fd5

+ 21 - 0
test/unit/component/Ui/Map/Structures.spec.js

@@ -0,0 +1,21 @@
+import { mount } from '@vue/test-utils'
+import Vuetify from 'vuetify'
+import Address from '~/components/Ui/Map/Structures'
+
+let wrapper
+let vuetify
+beforeEach(() => {
+  vuetify = new Vuetify()
+  wrapper = mount(Structures, {
+    vuetify
+  })
+})
+
+describe('components/ui/map/structures', () => {
+  it('default bounds shall show metropolitan france', async () => {})
+  it('structures shall be displayed as markers', async () => {})
+  it('on click, markers shall show a popup showing their name, address and website', async () => {})
+  it('on click, geo-shortcuts shall move the map to the given location', async () => {})
+  it('map shall emit an event when bounds change', async () => {})
+  it('when called from above, zoomOnResults shall zoom on the new data set', async () => {})
+})

+ 21 - 0
test/unit/component/Ui/Search/Address.spec.js

@@ -0,0 +1,21 @@
+import { mount } from '@vue/test-utils'
+import Vuetify from 'vuetify'
+import Address from '~/components/Ui/Search/Address'
+
+let wrapper
+let vuetify
+beforeEach(() => {
+  vuetify = new Vuetify()
+  wrapper = mount(Address, {
+    vuetify
+  })
+})
+
+describe('components/ui/search/address', () => {
+  it('an input of 1+ cars shall display results', async () => {})
+  it('position shall be set when a result is clicked', async () => {})
+  it('position shall be cleared when input is cleared', async () => {})
+  it('first result shall be selected when enter key is pressed', async () => {})
+  it('user position shall be set when localize icon is clicked', async () => {})
+  it('error message shall be displayed if the browser does not support localization', async () => {})
+})

+ 6 - 0
test/unit/index.ts

@@ -0,0 +1,6 @@
+import Vuex from 'vuex'
+import Vue from 'vue'
+import Vuetify from 'vuetify'
+
+Vue.use(Vuetify)
+Vue.use(Vuex)

+ 24 - 0
test/unit/pages/structures_adherentes/index.spec.js

@@ -0,0 +1,24 @@
+import Vuetify from 'vuetify'
+
+let vuetify
+beforeEach(() => {
+  vuetify = new Vuetify()
+})
+
+describe('pages/structures_adherentes/index', () => {
+  it('map, filters, and all results shall display by default', async () => {})
+  it('if list view is activated, map shall be hidden', async () => {})
+  it('when list view is activated, displayed results and filters shall stay the same', async () => {})
+  it('results shall be paginated', async () => {})
+  it('pagination shall be updated depending on the number of results', async () => {})
+  it('number of results shall match the current search', async () => {})
+  it('results shall be filtered according to the text filter', async () => {})
+  it('results shall be filtered according to the location filter', async () => {})
+  it('results shall be filtered according to the practice filter', async () => {})
+  it('results shall be filtered according to the department filter', async () => {})
+  it('results shall be filtered according to the federation filter', async () => {})
+  it('results shall be filtered according to the map bounds', async () => {})
+  it('if location is set, results shall be filtered according to the distance filter', async () => {})
+  it('reinitialize shall clear each filter field, display all results, and reset map bounds (in both map and list view)', async () => {})
+  it('the see-more button of a structure card shall lead to the details page of the structure', async () => {})
+})