From 387187b15239bddcfcef588d078bef68ca3ba6c1 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Wed, 30 Jan 2019 16:50:49 +0100 Subject: [PATCH] Move minimal configuration into suites directory. --- test/{ => suites}/minimal-config/index.ts | 2 +- .../minimal-config/scenarii/BadPassword.ts | 8 ++++---- .../minimal-config/scenarii/RegisterTotp.ts | 2 +- .../minimal-config/scenarii/ResetPassword.ts | 17 +++++++++-------- .../minimal-config/scenarii/TOTPValidation.ts | 16 ++++++++-------- test/types/mocha.d.ts | 9 --------- 6 files changed, 23 insertions(+), 31 deletions(-) rename test/{ => suites}/minimal-config/index.ts (91%) rename test/{ => suites}/minimal-config/scenarii/BadPassword.ts (67%) rename test/{ => suites}/minimal-config/scenarii/RegisterTotp.ts (92%) rename test/{ => suites}/minimal-config/scenarii/ResetPassword.ts (67%) rename test/{ => suites}/minimal-config/scenarii/TOTPValidation.ts (74%) delete mode 100644 test/types/mocha.d.ts diff --git a/test/minimal-config/index.ts b/test/suites/minimal-config/index.ts similarity index 91% rename from test/minimal-config/index.ts rename to test/suites/minimal-config/index.ts index 5e671d36..cb9ff4f1 100644 --- a/test/minimal-config/index.ts +++ b/test/suites/minimal-config/index.ts @@ -1,7 +1,7 @@ import ChildProcess from 'child_process'; import Bluebird from "bluebird"; -import AutheliaSuite from "../helpers/context/AutheliaSuite"; +import AutheliaSuite from "../../helpers/context/AutheliaSuite"; import BadPassword from "./scenarii/BadPassword"; import RegisterTotp from './scenarii/RegisterTotp'; import ResetPassword from './scenarii/ResetPassword'; diff --git a/test/minimal-config/scenarii/BadPassword.ts b/test/suites/minimal-config/scenarii/BadPassword.ts similarity index 67% rename from test/minimal-config/scenarii/BadPassword.ts rename to test/suites/minimal-config/scenarii/BadPassword.ts index 1af03c0f..0186cad1 100644 --- a/test/minimal-config/scenarii/BadPassword.ts +++ b/test/suites/minimal-config/scenarii/BadPassword.ts @@ -1,7 +1,7 @@ -import FillLoginPageWithUserAndPasswordAndClick from '../../helpers/FillLoginPageAndClick'; -import VisitPage from '../../helpers/VisitPage'; -import SeeNotification from '../../helpers/SeeNotification'; -import {AUTHENTICATION_FAILED} from '../../../shared/UserMessages'; +import FillLoginPageWithUserAndPasswordAndClick from '../../../helpers/FillLoginPageAndClick'; +import VisitPage from '../../../helpers/VisitPage'; +import SeeNotification from '../../../helpers/SeeNotification'; +import {AUTHENTICATION_FAILED} from '../../../../shared/UserMessages'; export default function() { /** diff --git a/test/minimal-config/scenarii/RegisterTotp.ts b/test/suites/minimal-config/scenarii/RegisterTotp.ts similarity index 92% rename from test/minimal-config/scenarii/RegisterTotp.ts rename to test/suites/minimal-config/scenarii/RegisterTotp.ts index 15bdd75f..1d1350b5 100644 --- a/test/minimal-config/scenarii/RegisterTotp.ts +++ b/test/suites/minimal-config/scenarii/RegisterTotp.ts @@ -1,5 +1,5 @@ import SeleniumWebdriver from "selenium-webdriver"; -import LoginAndRegisterTotp from '../../helpers/LoginAndRegisterTotp'; +import LoginAndRegisterTotp from '../../../helpers/LoginAndRegisterTotp'; /** * Given the user logs in as john, diff --git a/test/minimal-config/scenarii/ResetPassword.ts b/test/suites/minimal-config/scenarii/ResetPassword.ts similarity index 67% rename from test/minimal-config/scenarii/ResetPassword.ts rename to test/suites/minimal-config/scenarii/ResetPassword.ts index 81538b76..eb479e36 100644 --- a/test/minimal-config/scenarii/ResetPassword.ts +++ b/test/suites/minimal-config/scenarii/ResetPassword.ts @@ -1,12 +1,13 @@ -import VisitPage from '../../helpers/VisitPage'; -import ClickOnLink from '../../helpers/ClickOnLink'; -import ClickOn from '../../helpers/ClickOn'; -import WaitRedirected from '../../helpers/WaitRedirected'; -import FillField from "../../helpers/FillField"; -import {GetLinkFromEmail} from "../../helpers/GetIdentityLink"; -import FillLoginPageAndClick from "../../helpers/FillLoginPageAndClick"; import SeleniumWebDriver from 'selenium-webdriver'; -import IsSecondFactorStage from "../../helpers/IsSecondFactorStage"; + +import VisitPage from '../../../helpers/VisitPage'; +import ClickOnLink from '../../../helpers/ClickOnLink'; +import ClickOn from '../../../helpers/ClickOn'; +import WaitRedirected from '../../../helpers/WaitRedirected'; +import FillField from "../../../helpers/FillField"; +import {GetLinkFromEmail} from "../../../helpers/GetIdentityLink"; +import FillLoginPageAndClick from "../../../helpers/FillLoginPageAndClick"; +import IsSecondFactorStage from "../../../helpers/IsSecondFactorStage"; export default function() { it("should reset password for john", async function() { diff --git a/test/minimal-config/scenarii/TOTPValidation.ts b/test/suites/minimal-config/scenarii/TOTPValidation.ts similarity index 74% rename from test/minimal-config/scenarii/TOTPValidation.ts rename to test/suites/minimal-config/scenarii/TOTPValidation.ts index 072a42d9..d011d3da 100644 --- a/test/minimal-config/scenarii/TOTPValidation.ts +++ b/test/suites/minimal-config/scenarii/TOTPValidation.ts @@ -1,11 +1,11 @@ -import FillLoginPageWithUserAndPasswordAndClick from '../../helpers/FillLoginPageAndClick'; -import WaitRedirected from '../../helpers/WaitRedirected'; -import VisitPage from '../../helpers/VisitPage'; -import ValidateTotp from '../../helpers/ValidateTotp'; -import AccessSecret from "../../helpers/AccessSecret"; -import LoginAndRegisterTotp from '../../helpers/LoginAndRegisterTotp'; -import SeeNotification from '../../helpers/SeeNotification'; -import { AUTHENTICATION_TOTP_FAILED } from '../../../shared/UserMessages'; +import FillLoginPageWithUserAndPasswordAndClick from '../../../helpers/FillLoginPageAndClick'; +import WaitRedirected from '../../../helpers/WaitRedirected'; +import VisitPage from '../../../helpers/VisitPage'; +import ValidateTotp from '../../../helpers/ValidateTotp'; +import AccessSecret from "../../../helpers/AccessSecret"; +import LoginAndRegisterTotp from '../../../helpers/LoginAndRegisterTotp'; +import SeeNotification from '../../../helpers/SeeNotification'; +import { AUTHENTICATION_TOTP_FAILED } from '../../../../shared/UserMessages'; export default function() { /** diff --git a/test/types/mocha.d.ts b/test/types/mocha.d.ts deleted file mode 100644 index 6310d458..00000000 --- a/test/types/mocha.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { WebDriver } from "selenium-webdriver"; - -/* -declare module 'mocha' { - interface ISuiteCallbackContext { - driver1: WebDriver; - } -} -*/ \ No newline at end of file