mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-14 18:24:45 -04:00
Ported more tests to playwright. (#6214)
* Ported more tests to playwright. * Added language test. * Fixed failing tests. Moved another test. * Removed frontend tests. * Splitted runners. * Fixed runners. * Split up into the different browser environments. * Added github reporter. * Added change user color test.
This commit is contained in:
parent
19ee8c2afa
commit
078324c0d1
35 changed files with 1702 additions and 1229 deletions
|
@ -1,6 +1,6 @@
|
|||
import {Frame, Locator, Page} from "@playwright/test";
|
||||
import {MapArrayType} from "../../../node/types/MapType";
|
||||
import {randomInt} from "node:crypto";
|
||||
import {randomUUID} from "node:crypto";
|
||||
|
||||
export const getPadOuter = async (page: Page): Promise<Frame> => {
|
||||
return page.frame('ace_outer')!;
|
||||
|
@ -115,7 +115,7 @@ export const appendQueryParams = async (page: Page, queryParameters: MapArrayTyp
|
|||
|
||||
export const goToNewPad = async (page: Page) => {
|
||||
// create a new pad before each test run
|
||||
const padId = "FRONTEND_TESTS"+randomInt(0, 1000);
|
||||
const padId = "FRONTEND_TESTS"+randomUUID();
|
||||
await page.goto('http://localhost:9001/p/'+padId);
|
||||
await page.waitForSelector('iframe[name="ace_outer"]');
|
||||
return padId;
|
||||
|
@ -128,6 +128,8 @@ export const goToPad = async (page: Page, padId: string) => {
|
|||
|
||||
|
||||
export const clearPadContent = async (page: Page) => {
|
||||
const body = await getPadBody(page);
|
||||
await body.click();
|
||||
await page.keyboard.down('Control');
|
||||
await page.keyboard.press('A');
|
||||
await page.keyboard.up('Control');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue