-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* awaitDisplayed * timeout argument * Assert and * Rename * Extend * Submittable Page * T348506 Remove Git Tagging (#492) * Publishing Readme * Publishing YML * Remover * T346623 wikibase fork 1 (#491) * Forked Package * Remove * Fix
- Loading branch information
1 parent
12ab4bc
commit 86c994a
Showing
24 changed files
with
215 additions
and
211 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
type WaitForOptions = { | ||
timeout?: number; | ||
}; | ||
|
||
const awaitDisplayed = async ( | ||
identifier: string | ChainablePromiseElement | WebdriverIO.Element, | ||
options?: WaitForOptions | ||
): Promise<WebdriverIO.Element> => { | ||
const resultElement = | ||
typeof identifier === 'string' ? await $( identifier ) : await identifier; | ||
await resultElement.waitForDisplayed( options ); | ||
return resultElement; | ||
}; | ||
|
||
export default awaitDisplayed; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import awaitDisplayed from '../await-displayed.js'; | ||
import Page from './page.js'; | ||
|
||
class SubmittablePage extends Page { | ||
public get submitBtn(): ChainablePromiseElement { | ||
return $( 'button[type="submit"]' ); | ||
} | ||
|
||
public async submit(): Promise<void> { | ||
const button = await awaitDisplayed( this.submitBtn ); | ||
await button.click(); | ||
} | ||
} | ||
|
||
export default SubmittablePage; |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.