authelia/test/features/step_definitions/reset-password.ts

16 lines
493 B
TypeScript
Raw Normal View History

2018-03-29 05:04:59 +07:00
import {When} from "cucumber";
import seleniumWebdriver = require("selenium-webdriver");
import Assert = require("assert");
import Fs = require("fs");
2018-03-29 05:04:59 +07:00
When("I click on the link {string}", function (text: string) {
return this.driver.findElement(seleniumWebdriver.By.linkText(text)).click();
});
2018-03-29 05:04:59 +07:00
When("I click on the link of the email", function () {
const that = this;
return this.retrieveLatestMail()
.then(function (link: string) {
return that.driver.get(link);
});
});