File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ casper . test . begin ( 'counter' , 8 , function ( test ) {
2
+ casper
3
+ . start ( 'examples/counter/index.html' )
4
+ . then ( function ( ) {
5
+ test . assertSelectorHasText ( 'div' , 'Clicked: 0 times' )
6
+ } )
7
+ . thenClick ( 'button:nth-child(1)' , function ( ) {
8
+ test . assertSelectorHasText ( 'div' , 'Clicked: 1 times' )
9
+ } )
10
+ . thenClick ( 'button:nth-child(2)' , function ( ) {
11
+ test . assertSelectorHasText ( 'div' , 'Clicked: 0 times' )
12
+ } )
13
+ . thenClick ( 'button:nth-child(3)' , function ( ) {
14
+ test . assertSelectorHasText ( 'div' , 'Clicked: 0 times' )
15
+ } )
16
+ . thenClick ( 'button:nth-child(1)' , function ( ) {
17
+ test . assertSelectorHasText ( 'div' , 'Clicked: 1 times' )
18
+ } )
19
+ . thenClick ( 'button:nth-child(3)' , function ( ) {
20
+ test . assertSelectorHasText ( 'div' , 'Clicked: 2 times' )
21
+ } )
22
+ . thenClick ( 'button:nth-child(4)' , function ( ) {
23
+ test . assertSelectorHasText ( 'div' , 'Clicked: 2 times' )
24
+ } )
25
+ . wait ( 1000 )
26
+ . then ( function ( ) {
27
+ test . assertSelectorHasText ( 'div' , 'Clicked: 3 times' )
28
+ } )
29
+ . run ( function ( ) {
30
+ test . done ( )
31
+ } )
32
+ } )
You can’t perform that action at this time.
0 commit comments