2019-01-30 22:50:49 +07:00
|
|
|
import AutheliaSuite from "../../helpers/context/AutheliaSuite";
|
2019-01-30 22:47:03 +07:00
|
|
|
import BadPassword from "./scenarii/BadPassword";
|
|
|
|
import RegisterTotp from './scenarii/RegisterTotp';
|
|
|
|
import ResetPassword from './scenarii/ResetPassword';
|
|
|
|
import TOTPValidation from './scenarii/TOTPValidation';
|
2019-02-10 05:20:37 +07:00
|
|
|
import BackendProtection from './scenarii/BackendProtection';
|
|
|
|
import VerifyEndpoint from './scenarii/VerifyEndpoint';
|
2019-02-14 06:27:43 +07:00
|
|
|
import RequiredTwoFactor from './scenarii/RequiredTwoFactor';
|
|
|
|
import LogoutRedirectToAlreadyLoggedIn from './scenarii/LogoutRedirectToAlreadyLoggedIn';
|
2019-03-02 22:19:08 +07:00
|
|
|
import { exec } from '../../helpers/utils/exec';
|
2019-03-04 05:51:52 +07:00
|
|
|
import TwoFactorAuthentication from "../../helpers/scenarii/TwoFactorAuthentication";
|
2019-03-22 22:54:27 +07:00
|
|
|
import BypassPolicy from "./scenarii/BypassPolicy";
|
2019-01-30 22:47:03 +07:00
|
|
|
|
2019-03-03 05:31:22 +07:00
|
|
|
AutheliaSuite(__dirname, function() {
|
2019-01-30 22:47:03 +07:00
|
|
|
this.timeout(10000);
|
2019-03-03 05:16:53 +07:00
|
|
|
|
2019-02-25 00:05:18 +07:00
|
|
|
beforeEach(async function() {
|
2019-03-03 05:16:53 +07:00
|
|
|
await exec(`cp ${__dirname}/users_database.yml ${__dirname}/users_database.test.yml`);
|
2019-01-30 22:47:03 +07:00
|
|
|
});
|
|
|
|
|
2019-03-04 05:51:52 +07:00
|
|
|
describe('Two-factor authentication', TwoFactorAuthentication());
|
2019-03-22 22:54:27 +07:00
|
|
|
describe('Bypass policy', BypassPolicy)
|
2019-02-10 05:20:37 +07:00
|
|
|
describe('Backend protection', BackendProtection);
|
|
|
|
describe('Verify API endpoint', VerifyEndpoint);
|
2019-01-30 22:47:03 +07:00
|
|
|
describe('Bad password', BadPassword);
|
|
|
|
describe('Reset password', ResetPassword);
|
|
|
|
describe('TOTP Registration', RegisterTotp);
|
|
|
|
describe('TOTP Validation', TOTPValidation);
|
2019-02-14 06:27:43 +07:00
|
|
|
describe('Required two factor', RequiredTwoFactor);
|
|
|
|
describe('Logout endpoint redirect to already logged in page', LogoutRedirectToAlreadyLoggedIn);
|
2019-01-30 22:47:03 +07:00
|
|
|
});
|