blob: 8cbee3baa24241500f6bab3e661b0f7fa62dae79 [file] [log] [blame]
Nils Diewald034ea702015-01-16 19:41:52 +00001use Mojo::Base -strict;
2use lib '../lib', 'lib';
3use Test::More;
4use Test::Mojo;
5
6my $t = Test::Mojo->new('Korap');
7$t->get_ok('/')
8 ->status_is(200)
9 ->text_is('title', 'KorAP')
10 ->text_like('h1 span', qr/Korpusanalyseplattform/i)
11 ;
12
13# Check paging
14$t->get_ok('/?q=test')
15 ->text_is('pre.query.serial span', 'JSON-LD Serialization for "test"')
16 ->text_like('#total-results', qr/\d+ matches$/)
Nils Diewald46e6f182015-02-04 15:22:49 +000017 ->element_exists('[title=Alignment]')
Nils Diewald034ea702015-01-16 19:41:52 +000018 ->text_is('#pagination a[rel=self] span', 1)
19;
20
21# Check paging
22$t->get_ok('/?q=test&p=2')
23 ->text_is('pre.query.serial span', 'JSON-LD Serialization for "test"')
24 ->text_like('#total-results', qr/\d+ matches$/)
25 ->text_is('#pagination a[rel=self] span', 2)
26;
27
28# $t->get_ok('/tutorial?testing=1')
29# ->text_like('div.test p.pass', qr/Pass: [1-9]/)
30# ;
31
32done_testing();