Files
HKSingleParty/99_references/cf-identity-wallet-main/tests/screen-objects/components/menu.toolbar.ts
2025-05-28 09:55:51 +08:00

37 lines
891 B
TypeScript

import { expect } from "expect-webdriverio";
import {
findAndClickLocator,
findFilterAndClickElement,
} from "../base.screen.js";
export class MenuToolbar {
backArrowButtonLocator = "[data-testid=\"back-button\"]";
get addButton() {
return $("[data-testid=\"add-button\"]");
}
get connectionsButton() {
return $("[data-testid=\"connections-button\"]");
}
async menusButton(screenLocator: string) {
return $(`[data-testid="menu-button-${screenLocator}"]`);
}
async clickBackArrowButtonOf(parent: string) {
await findAndClickLocator(`${parent} ${this.backArrowButtonLocator}`);
}
async clickBackArrowIcon() {
await findFilterAndClickElement(this.backArrowButtonLocator);
}
async loads() {
await expect(this.addButton).toBeDisplayed();
await expect(this.connectionsButton).toBeDisplayed();
}
}
export default new MenuToolbar();