tutu/test/objects/accounts.ts
thislight ee31c38f32
All checks were successful
/ depoly (push) Successful in 1m26s
fix #52: correct the StackedRouter on 'replace'
2024-12-21 20:20:27 +08:00

24 lines
596 B
TypeScript

import { $, browser } from "@wdio/globals";
import Page from "./page.js";
/**
* sub page containing specific selectors and methods for a specific page
*/
export class SignInPage extends Page {
public static get serverUrlInput() {
return $("[name=serverUrl]");
}
public static async urlIsTheCurrent() {
const urlMatched =
new URL(await browser.getUrl()).pathname === "/accounts/sign-in";
return urlMatched;
}
/**
* overwrite specific options to adapt it to page object
*/
public static async open() {
return await super.open("accounts/sign-in");
}
}