Slight tauri e2e cleanup (#2659)
* WIP: Break the tauri e2e tests apart Will fix #2658 * Clean up * Longer before timeout * Also exclude tauri tests from vitest * Utils fn back in app.spec.ts * Remove utils * Change before back to it * Remove explicit mocha dep * Revert other attemps at fixing the browser issues. mocha dep was the issue * Clean up * Signin/out sep with auth flows * Lint --------- Co-authored-by: Frank Noirot <frank@zoo.dev>
This commit is contained in:
18
e2e/tauri/utils.ts
Normal file
18
e2e/tauri/utils.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { browser } from '@wdio/globals'
|
||||
|
||||
export async function click(element: WebdriverIO.Element): Promise<void> {
|
||||
// Workaround for .click(), see https://github.com/tauri-apps/tauri/issues/6541
|
||||
await element.waitForClickable()
|
||||
await browser.execute('arguments[0].click();', element)
|
||||
}
|
||||
|
||||
/* Shoutout to @Sheap on Github for a great workaround utility:
|
||||
* https://github.com/tauri-apps/tauri/issues/6541#issue-1638944060
|
||||
*/
|
||||
export async function setDatasetValue(
|
||||
field: WebdriverIO.Element,
|
||||
property: string,
|
||||
value: string
|
||||
) {
|
||||
await browser.execute(`arguments[0].dataset.${property} = "${value}"`, field)
|
||||
}
|
Reference in New Issue
Block a user