Skip to content

Commit

Permalink
Add an xt test for partial_link_text
Browse files Browse the repository at this point in the history
  • Loading branch information
JRaspass committed Jan 27, 2016
1 parent e384e78 commit c0877cb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions xt/basic.pl
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@

is $drv->url, 'http://localhost:8080/', 'url';

$drv->( 'go to bottom', method => 'link_text' )->click;
( my $bottom = $drv->( 'go to bottom', method => 'link_text' ) )->click;

is $drv->url, 'http://localhost:8080/#bottom', 'click';

$drv->( 'go to top', method => 'link_text' )->click;
( my $top = $drv->( 'go to top', method => 'link_text' ) )->click;

is $drv->url, 'http://localhost:8080/#top', 'click';

is_deeply $drv->( 'to top', method => 'partial_link_text' ), $top,
'partial_link_text matching one';

is_deeply [ $drv->( ' to ', method => 'partial_link_text' ) ],
[ $bottom, $top ], 'partial_link_text matching two';
}

0 comments on commit c0877cb

Please sign in to comment.