This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To the extent possible under law, Kamil Neczaj has waived all copyright and related or neighboring rights to this code, | |
| // which is published here under license CC0, full text of the license here: http://creativecommons.org/publicdomain/zero/ | |
| // a way to customise Selenium WebElementPromise | |
| export class ElementPromise extends WebElementPromise { | |
| constructor(driver: AugmentedThenableWebDriver, el: Promise<WebElement>) { | |
| super(driver, el); | |
| } | |
| getDriver(): AugmentedThenableWebDriver { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To the extent possible under law, Kamil Neczaj has waived all copyright and related or neighboring rights to this code, | |
| // which is published here under license CC0, full text of the license here: http://creativecommons.org/publicdomain/zero/ | |
| function findWithWait(locator: Locator, timeout: number = defaultTimeout): WebElementPromise { | |
| return driver.wait(until.elementLocated(locator), timeout) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To the extent possible under law, Kamil Neczaj has waived all copyright and related or neighboring rights to this code, | |
| // which is published here under license CC0, full text of the license here: http://creativecommons.org/publicdomain/zero/1.0/" | |
| function findChildElement(parent: WebElement, locator: Locator, timeout?: number): Promise<WebElement> { | |
| return driver.wait<WebElement>(async function (driver) { | |
| try { | |
| return await parent.findElement(locator); | |
| } catch (e) { | |
| return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To the extent possible under law, Kamil Neczaj has waived all copyright and related or neighboring rights to this code, | |
| // which is published here under license CC0, full text of the license here: http://creativecommons.org/publicdomain/zero/ | |
| type ItemRequestStateBeforeMerge<T> = { [K in keyof T]: ItemRequestState<T[K]> } | |
| type ItemRequestStateAfterMerge<T> = ItemRequestState<{ [K in keyof T]: T[K] }> | |
| export function mergeStates<T>( | |
| input: ItemRequestStateBeforeMerge<T> | |
| ): ItemRequestStateAfterMerge<T> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To the extent possible under law, Kamil Neczaj has waived all copyright and related or neighboring rights to this code, | |
| // which is published here under license CC0, full text of the license here: http://creativecommons.org/publicdomain/zero/ | |
| .flex-1 | |
| flex: 1 | |
| min-height: 0 | |
| min-width: 0 | |
| flex-basis: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To the extent possible under law, Kamil Neczaj has waived all copyright and related or neighboring rights to this code, | |
| // which is published here under license CC0, full text of the license here: http://creativecommons.org/publicdomain/zero/ | |
| import React from 'react'; | |
| import Button from '@material-ui/core/Button'; | |
| import Dialog from '@material-ui/core/Dialog'; | |
| import DialogActions from '@material-ui/core/DialogActions'; | |
| import DialogContent from '@material-ui/core/DialogContent'; | |
| import DialogContentText from '@material-ui/core/DialogContentText'; | |
| import DialogTitle from '@material-ui/core/DialogTitle'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To the extent possible under law, Kamil Neczaj has waived all copyright and related or neighboring rights to this code, | |
| // which is published here under license CC0, full text of the license here: http://creativecommons.org/publicdomain/zero/ | |
| import React from 'react'; | |
| import Button from '@material-ui/core/Button'; | |
| import Dialog from '@material-ui/core/Dialog'; | |
| import DialogActions from '@material-ui/core/DialogActions'; | |
| import DialogContent from '@material-ui/core/DialogContent'; | |
| import DialogContentText from '@material-ui/core/DialogContentText'; | |
| import DialogTitle from '@material-ui/core/DialogTitle'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To the extent possible under law, Kamil Neczaj has waived all copyright and related or neighboring rights to this code, | |
| // which is published here under license CC0, full text of the license here: http://creativecommons.org/publicdomain/zero/ | |
| import React, {useContext, useState} from "react"; | |
| import {isUndefined} from "../util"; | |
| export interface Props { | |
| children: JSX.Element | React.ReactNode; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To the extent possible under law, Kamil Neczaj has waived all copyright and related or neighboring rights to this code, | |
| // which is published here under license CC0, full text of the license here: http://creativecommons.org/publicdomain/zero/ | |
| driver.executeScript(() => arguments[0].click(), element /* WebElementPromise */); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // To the extent possible under law, Kamil Neczaj has waived all copyright and related or neighboring rights to this code, | |
| // which is published here under license CC0, full text of the license here: http://creativecommons.org/publicdomain/zero/ | |
| import { AugmentedThenableWebDriver, getAugmentedDriver } from "./driver"; | |
| import { logging } from "selenium-webdriver"; | |
| export function e2eTest(label: string, testFn: (driver: () => AugmentedThenableWebDriver) => void) { | |
| describe(label, async () => { | |
| let driver: AugmentedThenableWebDriver; |