From 6be7c6b5b45f6077d5ebc9aa3e2015cbd898356e Mon Sep 17 00:00:00 2001 From: davikstone Date: Wed, 17 Jan 2024 13:31:52 +0100 Subject: [PATCH] add redsqure specs --- src/mods/redsquare/redsquare_page.ts | 26 ++++++++++++++++++++++++++ tests/mods/redsquare.spec.ts | 0 2 files changed, 26 insertions(+) create mode 100644 src/mods/redsquare/redsquare_page.ts create mode 100644 tests/mods/redsquare.spec.ts diff --git a/src/mods/redsquare/redsquare_page.ts b/src/mods/redsquare/redsquare_page.ts new file mode 100644 index 0000000..9987029 --- /dev/null +++ b/src/mods/redsquare/redsquare_page.ts @@ -0,0 +1,26 @@ +import { type Page, type Locator, expect } from '@playwright/test' +import ModulePage from "../module_page"; + +export default class ArcadePage extends ModulePage { + + constructor(page: Page) { + super(page, "/redsquare"); + } + + async openChat() { + + } + + async createChessGame() { + let chessMenuItem = this.page.locator("#Chess"); + await chessMenuItem.waitFor(); + expect(chessMenuItem).toBeTruthy(); + await chessMenuItem.click(); + + let createGameButton = this.page.locator(".saito-multi-select_btn_options", { hasText: "create public invite" }); + await chessMenuItem.waitFor(); + expect(createGameButton).toBeTruthy(); + await createGameButton.click(); + } +} + diff --git a/tests/mods/redsquare.spec.ts b/tests/mods/redsquare.spec.ts new file mode 100644 index 0000000..e69de29