2016-05-22 13:27:34 +02:00
|
|
|
use Test::More;
|
|
|
|
use strict;
|
2018-12-15 16:37:04 +01:00
|
|
|
use Data::Dumper;
|
2016-05-22 13:27:34 +02:00
|
|
|
|
|
|
|
require 't/test-lib.pm';
|
|
|
|
|
|
|
|
my $res;
|
|
|
|
|
2019-02-07 09:27:56 +01:00
|
|
|
my $client = LLNG::Manager::Test->new( {
|
2019-02-05 23:12:17 +01:00
|
|
|
ini => {
|
2016-11-14 13:34:46 +01:00
|
|
|
logLevel => 'error',
|
|
|
|
useSafeJail => 1,
|
|
|
|
authentication => 'Null',
|
2017-02-05 10:13:20 +01:00
|
|
|
userDB => 'Same',
|
2022-06-03 09:31:24 +02:00
|
|
|
scrollTop => 100
|
2016-11-14 13:34:46 +01:00
|
|
|
}
|
2016-05-22 13:27:34 +02:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2022-06-03 09:31:24 +02:00
|
|
|
ok( $res = $client->_get('/', accept => 'text/html'), 'Auth query' );
|
|
|
|
ok( $res->[2]->[0] =~ m%"scrollTop":100%, 'scrollTop param found' )
|
|
|
|
or print STDERR Dumper( $res->[2]->[0] );
|
|
|
|
ok( $res->[2]->[0] =~ m%id="btn-back-to-top"%, 'scrollTop button found' )
|
|
|
|
or print STDERR Dumper( $res->[2]->[0] );
|
|
|
|
count(3);
|
2016-12-23 07:41:03 +01:00
|
|
|
expectOK($res);
|
|
|
|
my $id = expectCookie($res);
|
2018-12-15 16:37:04 +01:00
|
|
|
|
|
|
|
ok( $res = $client->_get( '/lmerror/403', accept => 'text/html' ),
|
|
|
|
'lmerror 403 query' );
|
|
|
|
expectOK($res);
|
|
|
|
ok( $res->[2]->[0] =~ qq%<img src="/static/common/logos/logo_llng_400px.png"%,
|
2019-02-05 23:12:17 +01:00
|
|
|
'Found custom Main Logo' )
|
|
|
|
or print STDERR Dumper( $res->[2]->[0] );
|
|
|
|
ok( $res->[2]->[0] =~ m%<span id="languages"></span>%, 'Language icons found' )
|
|
|
|
or print STDERR Dumper( $res->[2]->[0] );
|
2018-12-15 16:37:04 +01:00
|
|
|
count(3);
|
2022-02-13 18:07:17 +01:00
|
|
|
ok(
|
|
|
|
$res = $client->_get(
|
2022-02-16 17:43:29 +01:00
|
|
|
'/logout', accept => 'text/html'
|
2022-02-13 18:07:17 +01:00
|
|
|
),
|
|
|
|
'Get logout page'
|
|
|
|
);
|
|
|
|
ok( $res->[2]->[0] =~ m%<span trmsg="47">%, ' PE_LOGOUT_OK' )
|
|
|
|
or print STDERR Dumper( $res->[2]->[0] );
|
|
|
|
count(2);
|
2018-12-15 16:37:04 +01:00
|
|
|
|
2016-05-22 13:27:34 +02:00
|
|
|
clean_sessions();
|
|
|
|
|
|
|
|
done_testing( count() );
|