Skip to content

Commit c07e8b2

Browse files
author
Arman Badalyan
committed
geophystech#137 Modal Map
1 parent 2b3cde1 commit c07e8b2

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

test/unit/specs/AppHeader.spec.js

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ describe('AppHeader.vue', () => {
3737
})
3838

3939
describe('static elements', () => {
40+
4041
it('renders logo', () => {
4142
const logoContainer = wrapper.find('#logo')
4243
const logoLink = logoContainer.find(RouterLink)
@@ -49,6 +50,7 @@ describe('AppHeader.vue', () => {
4950
})
5051

5152
it('renders links', () => {
53+
5254
const DYFILinkContainer = wrapper.find('.did-you-feel-it')
5355
const DYFILink = DYFILinkContainer.find('a')
5456
const socialMediaLinksContainer = wrapper.find('.social-media-links')
@@ -65,7 +67,9 @@ describe('AppHeader.vue', () => {
6567

6668
expect(socialMediaLinks.length).to.equal(1)
6769
expect(telegramLink.attributes().href).to.equal('tg://resolve?domain=eqalert_ru_bot')
70+
6871
})
72+
6973
})
7074

7175
describe('dynamic elements', () => {

test/unit/specs/maps/ModalMap.spec.js

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
import { shallowMount } from '@vue/test-utils'
22
import ModalMap from '@/components/maps/ModalMap'
3-
import apiSettings from '@/settings/api'
3+
import axios from 'axios'
44

55
describe('maps/ModalMap.vue', () => {
66

7-
// wrapper.vm.$root.$options.settings.api
8-
const $root = {
9-
$options: {
10-
settings: {
11-
api: apiSettings
12-
}
13-
}
14-
}
15-
167
const wrapper = shallowMount(ModalMap, {
17-
mocks: { $root }
8+
mocks: {
9+
$http: axios
10+
}
1811
})
1912

20-
it('ModalMap getAllEvents', () => {
13+
it('ModalMap button click', () => {
14+
15+
// wrapper.find('#map-dialog-btn').trigger('click')
2116

22-
// wrapper.vm.example()
23-
console.log(wrapper.vm.$root.$options)
17+
console.log(wrapper.find('#map-dialog-btn').exists())
18+
console.log(wrapper.find('#map-dialog-btn').name())
19+
console.log(wrapper.find('#map-dialog-btn').classes())
2420

2521
})
2622

0 commit comments

Comments
 (0)