Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 1 | use Mojo::Base -strict; |
| 2 | use lib '../lib', 'lib'; |
| 3 | use Test::More; |
| 4 | use Test::Mojo; |
| 5 | |
| 6 | # Test the documentation |
| 7 | |
| 8 | my $t = Test::Mojo->new('Kalamar'); |
| 9 | |
| 10 | $t->get_ok('/doc/ql/poliqarp-plus') |
| 11 | ->status_is(200) |
| 12 | ->text_like('title', qr/poliqarp/i) |
| 13 | ->element_exists('aside.active') |
| 14 | ->element_exists('main.tutorial') |
| 15 | ->element_exists('header') |
| 16 | ->element_exists('aside nav') |
Nils Diewald | a748b0e | 2015-05-19 22:54:06 +0000 | [diff] [blame] | 17 | ->text_is('h1 span', 'KorAP: Poliqarp+') |
| 18 | ->element_exists('li.folded.active') |
| 19 | ->text_is('li.folded.active a', 'Poliqarp+'); |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 20 | |
| 21 | $t->get_ok('/doc/ql/poliqarp-plus?embedded=true') |
| 22 | ->status_is(200) |
| 23 | ->text_like('title', qr/poliqarp/i) |
| 24 | ->element_exists('aside.active') |
| 25 | ->element_exists('main.tutorial') |
Nils Diewald | a748b0e | 2015-05-19 22:54:06 +0000 | [diff] [blame] | 26 | ->element_exists_not('header') |
| 27 | ->element_exists('li.folded.active') |
| 28 | ->text_is('li.folded.active a', 'Poliqarp+'); |
Nils Diewald | a898dac | 2015-05-06 21:04:16 +0000 | [diff] [blame] | 29 | |
| 30 | |
| 31 | done_testing(); |