Append old LLNG logo & Fix unit tests (#1515)
This commit is contained in:
parent
ef53a04549
commit
2e658fd557
|
@ -283,6 +283,7 @@ site/htdocs/static/common/js/u2fcheck.min.js
|
|||
site/htdocs/static/common/js/u2fregistration.js
|
||||
site/htdocs/static/common/js/u2fregistration.min.js
|
||||
site/htdocs/static/common/logos/logo_llng_400px.png
|
||||
site/htdocs/static/common/logos/logo_llng_old.png
|
||||
site/htdocs/static/common/modules/Apache.png
|
||||
site/htdocs/static/common/modules/CAS.png
|
||||
site/htdocs/static/common/modules/Facebook.png
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -30,7 +30,7 @@ my $client = LLNG::Manager::Test->new(
|
|||
notificationStorage => 'File',
|
||||
notificationStorageOptions => { dirName => 't' },
|
||||
oldNotifFormat => 0,
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -79,7 +79,7 @@ ok( $res->[2]->[0] =~ qr%<h2 class="notifText">Test title</h2>%,
|
|||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
count(2);
|
||||
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
count(1);
|
||||
|
|
|
@ -34,7 +34,7 @@ SKIP: {
|
|||
notificationStorage => 'File',
|
||||
notificationStorageOptions => { dirName => 't' },
|
||||
oldNotifFormat => 1,
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -79,7 +79,7 @@ SKIP: {
|
|||
ok( $res->[2]->[0] =~ qr%<h2 class="notifText">Test title</h2>%,
|
||||
'Notification displayed' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ SKIP: {
|
|||
logLevel => 'error',
|
||||
useSafeJail => 1,
|
||||
captcha_login_enabled => 1,
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -43,7 +43,7 @@ SKIP: {
|
|||
ok( $ts = getCache()->get($token), ' Found token session' );
|
||||
$ts = eval { JSON::from_json($ts) };
|
||||
ok( $captcha = $ts->{captcha}, ' Found captcha value' );
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
|
||||
|
|
|
@ -22,20 +22,16 @@ SKIP: {
|
|||
|
||||
my $client = LLNG::Manager::Test->new(
|
||||
{ ini => {
|
||||
logLevel => 'debug',
|
||||
logLevel => 'error',
|
||||
useSafeJail => 1,
|
||||
portalDisplayRegister => 1,
|
||||
registerDB => 'Demo',
|
||||
captcha_register_enabled => 1,
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
# Create main logo to avoid mail send error
|
||||
`mkdir -p site/htdocs/static/common/logos/`;
|
||||
`touch site/htdocs/static/common/logos/test.png`;
|
||||
|
||||
# Test normal first access
|
||||
# ------------------------
|
||||
ok( $res = $client->_get( '/register', accept => 'text/html' ),
|
||||
|
@ -50,10 +46,10 @@ SKIP: {
|
|||
my $token;
|
||||
ok( $token = $1, ' Token value is defined' );
|
||||
ok( $res->[2]->[0] =~ m#<img src="data:image/png;base64#,
|
||||
' Captcha image inserted' );
|
||||
' Captcha image inserted' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
|
||||
# Try to get captcha value
|
||||
|
||||
my ( $ts, $captcha );
|
||||
ok( $ts = getCache()->get($token), ' Found token session' );
|
||||
$ts = eval { JSON::from_json($ts) };
|
||||
|
@ -107,9 +103,6 @@ SKIP: {
|
|||
'Try to authenticate'
|
||||
);
|
||||
expectCookie($res);
|
||||
|
||||
# Delete main logo
|
||||
`rm site/htdocs/static/common/logos/test.png`;
|
||||
}
|
||||
count($maintests);
|
||||
|
||||
|
|
|
@ -32,14 +32,11 @@ SKIP: {
|
|||
captcha_mail_enabled => 1,
|
||||
requireToken => 1,
|
||||
portalDisplayResetPassword => 1,
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
# Create main logo to avoid mail send error
|
||||
`touch site/htdocs/static/common/logos/test.png`;
|
||||
|
||||
# Test form
|
||||
# ------------------------
|
||||
ok( $res = $client->_get( '/resetpwd', accept => 'text/html' ),
|
||||
|
@ -60,7 +57,7 @@ SKIP: {
|
|||
ok( $ts = getCache()->get($token), ' Found token session' );
|
||||
$ts = eval { JSON::from_json($ts) };
|
||||
ok( $captcha = $ts->{captcha}, ' Found captcha value' );
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
|
||||
|
@ -101,9 +98,6 @@ SKIP: {
|
|||
);
|
||||
ok( mail() =~ /Your password was changed/, 'Password was changed' );
|
||||
|
||||
# Delete main logo
|
||||
`rm site/htdocs/static/common/logos/test.png`;
|
||||
|
||||
#print STDERR Dumper($query);
|
||||
}
|
||||
count($maintests);
|
||||
|
|
|
@ -14,7 +14,7 @@ my $client = LLNG::Manager::Test->new(
|
|||
logLevel => 'error',
|
||||
authentication => 'Demo',
|
||||
userdb => 'Same',
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
grantSessionRules => {
|
||||
'$uid . " not allowed"##rule1' => '$uid ne "dwho"',
|
||||
'Rtyler_Allowed##rule3' => '$uid eq "rtyler"',
|
||||
|
@ -41,7 +41,7 @@ ok( $res->[2]->[0] =~ qr%src="/static/common/js/info.(?:min\.)?js"></script>%,
|
|||
'Found INFO js'
|
||||
) or print STDERR Dumper( $res->[2]->[0] );
|
||||
count(1);
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
count(1);
|
||||
|
@ -69,7 +69,7 @@ ok( $res->[2]->[0] =~ /<span trmsg="4"><\/span><\/div>/,
|
|||
'rtyler rejected with PE_SESSIONNOTGRANTED'
|
||||
) or print STDERR Dumper( $res->[2]->[0] );
|
||||
count(1);
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
count(1);
|
||||
|
|
|
@ -15,7 +15,7 @@ my $client = LLNG::Manager::Test->new(
|
|||
userDB => 'Same',
|
||||
loginHistoryEnabled => 1,
|
||||
brutForceProtection => 0,
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
sessionDataToRemember =>
|
||||
{ uid => 'identity', _auth => 'AuthModule' },
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ ok( $res = $client->_post(
|
|||
count(1);
|
||||
expectOK($res);
|
||||
my $id1 = expectCookie($res);
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
count(1);
|
||||
|
|
|
@ -17,7 +17,7 @@ SKIP: {
|
|||
logLevel => 'error',
|
||||
totp2fSelfRegistration => 1,
|
||||
totp2fActivation => 1,
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -51,7 +51,7 @@ SKIP: {
|
|||
'Form registration'
|
||||
);
|
||||
ok( $res->[2]->[0] =~ /totpregistration\.(?:min\.)?js/, 'Found TOTP js' );
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
count(1);
|
||||
|
|
|
@ -17,7 +17,7 @@ SKIP: {
|
|||
logLevel => 'error',
|
||||
u2fSelfRegistration => 1,
|
||||
u2fActivation => 1,
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -52,7 +52,7 @@ SKIP: {
|
|||
'Form registration'
|
||||
);
|
||||
ok( $res->[2]->[0] =~ /u2fregistration\.(?:min\.)?js/, 'Found U2F js' );
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ my $client = LLNG::Manager::Test->new(
|
|||
loginHistoryEnabled => 1,
|
||||
authentication => 'Demo',
|
||||
userDB => 'Same',
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -58,7 +58,7 @@ ok( $res = $client->_post(
|
|||
),
|
||||
'Auth query'
|
||||
);
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
count(1);
|
||||
|
|
|
@ -23,7 +23,7 @@ SKIP: {
|
|||
utotp2fActivation => 1,
|
||||
totp2fSelfRegistration => 1,
|
||||
u2fSelfRegistration => 1,
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
u2fSelfRegistration =>
|
||||
'$_2fDevices =~ /"type":\s*"(?:TOTP|U2F)"/s',
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ SKIP: {
|
|||
'Form registration'
|
||||
);
|
||||
ok( $res->[2]->[0] =~ /totpregistration\.(?:min\.)?js/, 'Found TOTP js' );
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
count(1);
|
||||
|
|
|
@ -26,7 +26,7 @@ SKIP: {
|
|||
totp2fActivation => 1,
|
||||
u2fSelfRegistration => 1,
|
||||
u2fActivation => 1,
|
||||
portalMainLogo => 'common/logos/test.png',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -61,7 +61,7 @@ SKIP: {
|
|||
'Form registration'
|
||||
);
|
||||
ok( $res->[2]->[0] =~ /totpregistration\.(?:min\.)?js/, 'Found TOTP js' );
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/test.png"%,
|
||||
ok( $res->[2]->[0] =~ qr%<img src="/static/common/logos/logo_llng_old.png"%,
|
||||
'Found custom Main Logo' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
count(1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user