File tree 2 files changed +14
-14
lines changed
2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ describe('AppHeader.vue', () => {
37
37
} )
38
38
39
39
describe ( 'static elements' , ( ) => {
40
+
40
41
it ( 'renders logo' , ( ) => {
41
42
const logoContainer = wrapper . find ( '#logo' )
42
43
const logoLink = logoContainer . find ( RouterLink )
@@ -49,6 +50,7 @@ describe('AppHeader.vue', () => {
49
50
} )
50
51
51
52
it ( 'renders links' , ( ) => {
53
+
52
54
const DYFILinkContainer = wrapper . find ( '.did-you-feel-it' )
53
55
const DYFILink = DYFILinkContainer . find ( 'a' )
54
56
const socialMediaLinksContainer = wrapper . find ( '.social-media-links' )
@@ -65,7 +67,9 @@ describe('AppHeader.vue', () => {
65
67
66
68
expect ( socialMediaLinks . length ) . to . equal ( 1 )
67
69
expect ( telegramLink . attributes ( ) . href ) . to . equal ( 'tg://resolve?domain=eqalert_ru_bot' )
70
+
68
71
} )
72
+
69
73
} )
70
74
71
75
describe ( 'dynamic elements' , ( ) => {
Original file line number Diff line number Diff line change 1
1
import { shallowMount } from '@vue/test-utils'
2
2
import ModalMap from '@/components/maps/ModalMap'
3
- import apiSettings from '@/settings/api '
3
+ import axios from 'axios '
4
4
5
5
describe ( 'maps/ModalMap.vue' , ( ) => {
6
6
7
- // wrapper.vm.$root.$options.settings.api
8
- const $root = {
9
- $options : {
10
- settings : {
11
- api : apiSettings
12
- }
13
- }
14
- }
15
-
16
7
const wrapper = shallowMount ( ModalMap , {
17
- mocks : { $root }
8
+ mocks : {
9
+ $http : axios
10
+ }
18
11
} )
19
12
20
- it ( 'ModalMap getAllEvents' , ( ) => {
13
+ it ( 'ModalMap button click' , ( ) => {
14
+
15
+ // wrapper.find('#map-dialog-btn').trigger('click')
21
16
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 ( ) )
24
20
25
21
} )
26
22
You can’t perform that action at this time.
0 commit comments