File tree Expand file tree Collapse file tree 5 files changed +27
-184
lines changed Expand file tree Collapse file tree 5 files changed +27
-184
lines changed Original file line number Diff line number Diff line change @@ -19,23 +19,23 @@ import './commands';
19
19
// Alternatively you can use CommonJS syntax:
20
20
// require('./commands')
21
21
22
- import { mount } from 'cypress/vue2' ;
23
- // Vue2.7 Workaround to have proper types
24
- import { mount as mount3 } from 'cypress/vue' ;
22
+ import { mount } from 'cypress/vue' ;
25
23
26
- // Augment the Cypress namespace to include type definitions for
27
- // your custom command.
28
- // Alternatively, can be defined in cypress/support/component.d.ts
29
- // with a <reference path="./component" /> at the top of your spec.
30
24
declare global {
31
25
namespace Cypress {
32
26
interface Chainable {
33
- mount : typeof mount3 ;
27
+ mount : typeof mount ;
34
28
}
35
29
}
36
30
}
37
31
32
+ // Augment the Cypress namespace to include type definitions for
33
+ // your custom command.
34
+ // Alternatively, can be defined in cypress/support/component.d.ts
35
+ // with a <reference path="./component" /> at the top of your spec.
36
+ // import '../../src/assets/main.css';
37
+
38
38
Cypress . Commands . add ( 'mount' , mount ) ;
39
39
40
40
// Example use:
41
- // cy.mount(MyComponent)
41
+ // cy.mount(MyComponent);s
Original file line number Diff line number Diff line change 36
36
"vue-material-design-icons" : " ^5.1.2" ,
37
37
"vue-router" : " ^4.1.6" ,
38
38
"vue-select" : " ^4.0.0-beta.5" ,
39
- "vue3-drr-grid-layout" : " ^1.9.6 "
39
+ "vue3-drr-grid-layout" : " ^1.9.7 "
40
40
},
41
41
"devDependencies" : {
42
42
"@cypress/vite-dev-server" : " ^4.0.1" ,
43
- "@cypress/vue" : " ^2.2.3 " ,
43
+ "@cypress/vue" : " ^5.0.2 " ,
44
44
"@types/echarts" : " ^4.9.16" ,
45
45
"@types/jest" : " ^27.5.0" ,
46
46
"@typescript-eslint/eslint-plugin" : " ^2.33.0" ,
50
50
"@vue/eslint-config-prettier" : " ^6.0.0" ,
51
51
"@vue/eslint-config-typescript" : " ^5.1.0" ,
52
52
"@vue/runtime-dom" : " ^3.2.45" ,
53
- "@vue/test-utils" : " ^1.3.3 " ,
53
+ "@vue/test-utils" : " ^2.2.4 " ,
54
54
"cypress" : " ^10.3.0" ,
55
55
"eslint" : " ^6.7.2" ,
56
56
"eslint-plugin-prettier" : " ^3.4.1" ,
Original file line number Diff line number Diff line change 1
1
import ProfitPill from './ProfitPill.vue' ;
2
- import { createLocalVue } from '@vue/test-utils' ;
3
-
4
- const localVue = createLocalVue ( ) ;
5
2
6
3
describe ( 'ProfitPill.vue' , ( ) => {
7
4
it ( 'Shows a Green pill with positive profits' , ( ) => {
8
5
cy . mount ( ProfitPill , {
9
- localVue,
10
6
propsData : {
11
7
profitRatio : 0.051 ,
12
8
profitAbs : 0.1 ,
@@ -21,7 +17,6 @@ describe('ProfitPill.vue', () => {
21
17
} ) ;
22
18
it ( 'Shows a Red pill with positive profits' , ( ) => {
23
19
cy . mount ( ProfitPill , {
24
- localVue,
25
20
propsData : {
26
21
profitRatio : - 0.1 ,
27
22
profitAbs : - 0.1 ,
@@ -38,7 +33,6 @@ describe('ProfitPill.vue', () => {
38
33
} ) ;
39
34
it ( 'Shows a pill with 0.0 profits.' , ( ) => {
40
35
cy . mount ( ProfitPill , {
41
- localVue,
42
36
propsData : {
43
37
profitRatio : 0.0 ,
44
38
profitAbs : 0.0 ,
@@ -54,7 +48,6 @@ describe('ProfitPill.vue', () => {
54
48
} ) ;
55
49
it ( 'Shows a pill without relative profits.' , ( ) => {
56
50
cy . mount ( ProfitPill , {
57
- localVue,
58
51
propsData : {
59
52
profitRatio : undefined ,
60
53
profitAbs : 223 ,
Original file line number Diff line number Diff line change 1
1
import ProfitSymbol from '@/components/general/ProfitSymbol.vue' ;
2
- import { createLocalVue } from '@vue/test-utils' ;
3
-
4
- const localVue = createLocalVue ( ) ;
5
2
6
3
describe ( 'ProfitSymbol.vue' , ( ) => {
7
4
it ( 'calculates isProfitable with negative profit' , ( ) => {
8
- cy . mount ( ProfitSymbol , { localVue , propsData : { profit : - 0.5 } } ) ;
5
+ cy . mount ( ProfitSymbol , { propsData : { profit : - 0.5 } } ) ;
9
6
10
7
cy . get ( 'div' ) . should ( 'have.class' , 'triangle-down' ) ;
11
8
cy . get ( 'div' ) . should ( 'not.have.class' , 'triangle-up' ) ;
12
9
} ) ;
13
10
it ( 'calculates isProfitable with positive profit' , ( ) => {
14
- cy . mount ( ProfitSymbol , { localVue , propsData : { profit : 0.5 } } ) ;
11
+ cy . mount ( ProfitSymbol , { propsData : { profit : 0.5 } } ) ;
15
12
cy . get ( 'div' ) . should ( 'have.class' , 'triangle-up' ) ;
16
13
cy . get ( 'div' ) . should ( 'not.have.class' , 'triangle-down' ) ;
17
14
} ) ;
You can’t perform that action at this time.
0 commit comments