authelia/test/helpers/assertions/VerifyButtonDoesNotExist.ts
Clement Michaud a717b965c1 Display only available 2FA methods.
For instance Duo Push Notification method is not displayed if the API
is not configured.
2019-03-24 22:23:25 +01:00

12 lines
459 B
TypeScript

import SeleniumWebDriver, { WebDriver } from "selenium-webdriver";
import VerifyElementDoesNotExist from "./VerifyElementDoesNotExist";
/**
* Verify that an element does not exist.
*
* @param driver The selenium driver
* @param content The content of the button to select.
*/
export default async function(driver: WebDriver, content: string) {
await VerifyElementDoesNotExist(driver, SeleniumWebDriver.By.xpath("//button[text()='" + content + "']"))
}