File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed
Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 88 </ head >
99 < body >
1010 <!-- template for the modal component -->
11- < template id ="modal-template ">
11+ < script type =" x/ template" id ="modal-template ">
1212 < div class = "modal-mask" v-show = "show" v-transition = "modal" >
1313 < div class = "modal-wrapper" >
1414 < div class = "modal-container" >
3434 </ div >
3535 </ div >
3636 </ div >
37- </ template >
37+ </ script >
3838
3939 < script >
4040 // register modal component
5252
5353 <!-- app -->
5454 < div id ="app ">
55- < button v-on ="click: showModal = true "> Show Modal</ button >
55+ < button id =" show-modal " v-on ="click: showModal = true "> Show Modal</ button >
5656 <!-- use the modal component, pass in the prop -->
5757 < modal show ="{{@showModal}} ">
5858 <!--
Original file line number Diff line number Diff line change 1+ casper . test . begin ( 'modal' , 8 , function ( test ) {
2+
3+ casper
4+ . start ( '../../examples/modal/index.html' )
5+ . then ( function ( ) {
6+ test . assertNotVisible ( '.modal-mask' )
7+ } )
8+ . thenClick ( '#show-modal' , function ( ) {
9+ test . assertVisible ( '.modal-mask' )
10+ test . assertVisible ( '.modal-wrapper' )
11+ test . assertVisible ( '.modal-container' )
12+ test . assertSelectorHasText ( '.modal-header h3' , 'custom header' )
13+ test . assertSelectorHasText ( '.modal-body' , 'default body' )
14+ test . assertSelectorHasText ( '.modal-footer' , 'default footer' )
15+ } )
16+ . thenClick ( '.modal-default-button' , function ( ) {
17+ test . assertNotVisible ( '.modal-mask' )
18+ } )
19+ // run
20+ . run ( function ( ) {
21+ test . done ( )
22+ } )
23+
24+ } )
You can’t perform that action at this time.
0 commit comments