2019-01-30 15:50:49 +00:00
|
|
|
import AutheliaSuite from "../../helpers/context/AutheliaSuite";
|
2019-01-30 15:47:03 +00:00
|
|
|
import BadPassword from "./scenarii/BadPassword";
|
|
|
|
import RegisterTotp from './scenarii/RegisterTotp';
|
|
|
|
import ResetPassword from './scenarii/ResetPassword';
|
|
|
|
import TOTPValidation from './scenarii/TOTPValidation';
|
2019-02-09 22:20:37 +00:00
|
|
|
import BackendProtection from './scenarii/BackendProtection';
|
|
|
|
import VerifyEndpoint from './scenarii/VerifyEndpoint';
|
2019-02-13 23:27:43 +00:00
|
|
|
import RequiredTwoFactor from './scenarii/RequiredTwoFactor';
|
|
|
|
import LogoutRedirectToAlreadyLoggedIn from './scenarii/LogoutRedirectToAlreadyLoggedIn';
|
|
|
|
import SimpleAuthentication from './scenarii/SimpleAuthentication';
|
2019-03-02 15:19:08 +00:00
|
|
|
import { exec } from '../../helpers/utils/exec';
|
2019-01-30 15:47:03 +00:00
|
|
|
|
2019-03-02 21:27:54 +00:00
|
|
|
AutheliaSuite('Simple configuration', __dirname, function() {
|
2019-01-30 15:47:03 +00:00
|
|
|
this.timeout(10000);
|
2019-03-02 22:16:53 +00:00
|
|
|
|
2019-02-24 17:05:18 +00:00
|
|
|
beforeEach(async function() {
|
2019-03-02 22:16:53 +00:00
|
|
|
await exec(`cp ${__dirname}/users_database.yml ${__dirname}/users_database.test.yml`);
|
2019-01-30 15:47:03 +00:00
|
|
|
});
|
|
|
|
|
2019-02-13 23:27:43 +00:00
|
|
|
describe('Simple authentication', SimpleAuthentication);
|
2019-02-09 22:20:37 +00:00
|
|
|
describe('Backend protection', BackendProtection);
|
|
|
|
describe('Verify API endpoint', VerifyEndpoint);
|
2019-01-30 15:47:03 +00:00
|
|
|
describe('Bad password', BadPassword);
|
|
|
|
describe('Reset password', ResetPassword);
|
|
|
|
describe('TOTP Registration', RegisterTotp);
|
|
|
|
describe('TOTP Validation', TOTPValidation);
|
2019-02-13 23:27:43 +00:00
|
|
|
describe('Required two factor', RequiredTwoFactor);
|
|
|
|
describe('Logout endpoint redirect to already logged in page', LogoutRedirectToAlreadyLoggedIn);
|
2019-01-30 15:47:03 +00:00
|
|
|
});
|