Fix randomness in integration tests.

pull/421/head
Clement Michaud 2019-10-30 08:14:18 +01:00 committed by Clément Michaud
parent 7006035012
commit 546616173c
2 changed files with 4 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);
});