From 546616173c5e8540f3dd6f7573746d831824014c Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Wed, 30 Oct 2019 08:14:18 +0100 Subject: [PATCH] Fix randomness in integration tests. --- test/helpers/Logout.ts | 2 ++ test/helpers/scenarii/TwoFactorAuthentication.ts | 2 ++ 2 files changed, 4 insertions(+) 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); });