File tree 4 files changed +23
-5
lines changed
4 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 18
18
// expect(MainComponent.props.className).to.equal('sp-main-container')
19
19
// })
20
20
// })
21
- import { appWrapper } from 'helpers/fullRenderHelper'
22
- describe ( 'App ' , ( ) => {
21
+ import { appWrapper } from 'helpers/fullRenderHelper'
22
+ describe ( 'app ' , ( ) => {
23
23
it ( 'should have its component className as sp-main-container' , ( ) => {
24
24
expect ( appWrapper . children ( ) . is ( '.sp-main-container' ) ) . to . equal ( true )
25
25
} )
Original file line number Diff line number Diff line change 1
1
import { appWrapper } from 'helpers/fullRenderHelper'
2
2
3
- describe ( 'Header ' , ( ) => {
3
+ describe ( 'header ' , ( ) => {
4
4
it ( 'should add a text widget when clicking insert object button' , ( ) => {
5
5
expect ( appWrapper . state ( ) . deck . getActiveSlide ( ) . components . length ) . to . equal (
6
6
1
Original file line number Diff line number Diff line change
1
+ import { appWrapper } from 'helpers/fullRenderHelper'
2
+
3
+ describe ( 'slides > well' , ( ) => {
4
+ it ( 'should add a slide when clicking top insert slide button' , ( ) => {
5
+ expect ( appWrapper . state ( ) . deck . getActiveSlide ( ) . components . length ) . to . equal (
6
+ 1
7
+ )
8
+ expect ( appWrapper . state ( ) . deck . components . length ) . to . equal ( 4 )
9
+ appWrapper
10
+ . find (
11
+ '.sp-well-slide-creator > .btn-success'
12
+ )
13
+ . first ( ) . simulate ( 'click' )
14
+ expect ( appWrapper . state ( ) . deck . components . length ) . to . equal ( 5 )
15
+ } )
16
+ } )
Original file line number Diff line number Diff line change 1
1
import { mount } from 'enzyme'
2
2
import App from 'components/app'
3
3
import React from 'react'
4
-
5
- export const appWrapper = mount ( < App /> , { attachTo : app } )
4
+ export let appWrapper
5
+ beforeEach ( ( ) => {
6
+ appWrapper = mount ( < App /> , { attachTo : app } )
7
+ } )
You can’t perform that action at this time.
0 commit comments