diff --git a/test/helpers/Logout.ts b/test/helpers/Logout.ts index 69b116b6e..32576b2c8 100644 --- a/test/helpers/Logout.ts +++ b/test/helpers/Logout.ts @@ -1,8 +1,10 @@ import { WebDriver } from "selenium-webdriver"; import VerifyIsFirstFactorStage from "./assertions/VerifyIsFirstFactorStage"; import VisitPage from "./VisitPage"; +import VerifyUrlContains from "./assertions/VerifyUrlContains"; export default async function(driver: WebDriver) { await VisitPage(driver, "https://login.example.com:8080/#/logout"); + await VerifyUrlContains(driver, "https://login.example.com:8080/#/"); await VerifyIsFirstFactorStage(driver); } \ No newline at end of file diff --git a/test/helpers/scenarii/TwoFactorAuthentication.ts b/test/helpers/scenarii/TwoFactorAuthentication.ts index 915f55928..acb3a0423 100644 --- a/test/helpers/scenarii/TwoFactorAuthentication.ts +++ b/test/helpers/scenarii/TwoFactorAuthentication.ts @@ -1,6 +1,7 @@ import { StartDriver, StopDriver } from "../context/WithDriver"; import RegisterAndLoginTwoFactor from "../behaviors/RegisterAndLoginTwoFactor"; import VerifyUrlIs from "../assertions/VerifyUrlIs"; +import Logout from "../Logout"; export default function (timeout: number = 5000) { return function() { @@ -11,6 +12,7 @@ export default function (timeout: number = 5000) { }); after(async function() { + await Logout(this.driver); await StopDriver(this.driver); });