mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 17:36:14 -04:00
Added playwright tests. (#6212)
* Added playwright tests. * Added clear authorship color. * Ported enter ts. * Ported more tests. * Commented helper tests. * Fixed admin tests. * Fixed. * Fixed admin pages not there. * Fixed waiting. * Upload playwright report. * Remove saucelabs * Fixed waiting. * Fixed upload artifact. * Also install deps. * Added retry mechanism. * Added timeout for restart etherpad server. * Fixed tests. * Added frontend playwright tests.
This commit is contained in:
parent
db46ffb63b
commit
c2699e4528
40 changed files with 1568 additions and 1285 deletions
|
@ -0,0 +1,39 @@
|
|||
import {expect, test} from "@playwright/test";
|
||||
import {loginToAdmin} from "../helper/adminhelper";
|
||||
|
||||
test.beforeEach(async ({ page })=>{
|
||||
await loginToAdmin(page, 'admin', 'changeme1');
|
||||
await page.goto('http://localhost:9001/admin/help')
|
||||
})
|
||||
|
||||
test('Shows troubleshooting page manager', async ({page}) => {
|
||||
await page.goto('http://localhost:9001/admin/help')
|
||||
await page.waitForSelector('.menu')
|
||||
const menu = page.locator('.menu');
|
||||
await expect(menu.locator('li')).toHaveCount(4);
|
||||
})
|
||||
|
||||
test('Shows a version number', async function ({page}) {
|
||||
await page.goto('http://localhost:9001/admin/help')
|
||||
await page.waitForSelector('.menu')
|
||||
const helper = page.locator('.help-block').locator('div').nth(1)
|
||||
const version = (await helper.textContent())!.split('.');
|
||||
expect(version.length).toBe(3)
|
||||
});
|
||||
|
||||
test('Lists installed parts', async function ({page}) {
|
||||
await page.goto('http://localhost:9001/admin/help')
|
||||
await page.waitForSelector('.menu')
|
||||
await page.waitForSelector('.innerwrapper ul')
|
||||
const parts = page.locator('.innerwrapper ul').nth(1);
|
||||
expect(await parts.textContent()).toContain('ep_etherpad-lite/adminsettings');
|
||||
});
|
||||
|
||||
test('Lists installed hooks', async function ({page}) {
|
||||
await page.goto('http://localhost:9001/admin/help')
|
||||
await page.waitForSelector('.menu')
|
||||
await page.waitForSelector('.innerwrapper ul')
|
||||
const helper = page.locator('.innerwrapper ul').nth(2);
|
||||
expect(await helper.textContent()).toContain('express');
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue