mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 14:47:12 -04:00
Added github reporter.
This commit is contained in:
parent
8fb86ee467
commit
8777c9595d
2 changed files with 11 additions and 16 deletions
|
@ -1,17 +1,21 @@
|
||||||
import {defineConfig, devices, test} from '@playwright/test';
|
import {defineConfig, devices, test} from '@playwright/test';
|
||||||
|
|
||||||
|
|
||||||
|
export const defaultExpectTimeout = process.env.CI ? 20 * 1000 : 5000
|
||||||
|
export const defaultTestTimeout = 90 * 1000
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See https://playwright.dev/docs/test-configuration.
|
* See https://playwright.dev/docs/test-configuration.
|
||||||
*/
|
*/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
testDir: './tests/frontend-new/',
|
testDir: './tests/frontend-new/',
|
||||||
timeout: 90000,
|
|
||||||
/* Run tests in files in parallel */
|
/* Run tests in files in parallel */
|
||||||
fullyParallel: true,
|
fullyParallel: true,
|
||||||
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
||||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||||
reporter: 'html',
|
reporter: process.env.CI ? 'github' : 'html',
|
||||||
|
expect: { timeout: defaultExpectTimeout },
|
||||||
|
timeout: defaultTestTimeout,
|
||||||
retries: 2,
|
retries: 2,
|
||||||
workers: 20,
|
workers: 20,
|
||||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||||
|
@ -21,6 +25,7 @@ export default defineConfig({
|
||||||
baseURL: "localhost:9001",
|
baseURL: "localhost:9001",
|
||||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||||
trace: 'on-first-retry',
|
trace: 'on-first-retry',
|
||||||
|
video: 'on-first-retry',
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Configure projects for major browsers */
|
/* Configure projects for major browsers */
|
||||||
|
|
|
@ -63,8 +63,7 @@ test.describe('embed links', function () {
|
||||||
// create a new pad before each test run
|
// create a new pad before each test run
|
||||||
await goToNewPad(page);
|
await goToNewPad(page);
|
||||||
})
|
})
|
||||||
test.describe('the share link', function () {
|
test('the share link is the actual pad url', async function ({page}) {
|
||||||
test('is the actual pad url', async function ({page}) {
|
|
||||||
|
|
||||||
const shareButton = page.locator('.buttonicon-embed')
|
const shareButton = page.locator('.buttonicon-embed')
|
||||||
// open share dropdown
|
// open share dropdown
|
||||||
|
@ -75,10 +74,8 @@ test.describe('embed links', function () {
|
||||||
const padURL = page.url();
|
const padURL = page.url();
|
||||||
expect(shareLink).toBe(padURL);
|
expect(shareLink).toBe(padURL);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
test.describe('the embed as iframe code', function () {
|
test('is an iframe with the the correct url parameters and correct size', async function ({page}) {
|
||||||
test('is an iframe with the the correct url parameters and correct size', async function ({page}) {
|
|
||||||
|
|
||||||
const shareButton = page.locator('.buttonicon-embed')
|
const shareButton = page.locator('.buttonicon-embed')
|
||||||
await shareButton.click()
|
await shareButton.click()
|
||||||
|
@ -89,7 +86,6 @@ test.describe('embed links', function () {
|
||||||
|
|
||||||
await checkiFrameCode(embedCode, false, page);
|
await checkiFrameCode(embedCode, false, page);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe('when read only option is set', function () {
|
test.describe('when read only option is set', function () {
|
||||||
|
@ -98,8 +94,7 @@ test.describe('embed links', function () {
|
||||||
await goToNewPad(page);
|
await goToNewPad(page);
|
||||||
})
|
})
|
||||||
|
|
||||||
test.describe('the share link', function () {
|
test('the share link shows a read only url', async function ({page}) {
|
||||||
test('shows a read only url', async function ({page}) {
|
|
||||||
|
|
||||||
// open share dropdown
|
// open share dropdown
|
||||||
const shareButton = page.locator('.buttonicon-embed')
|
const shareButton = page.locator('.buttonicon-embed')
|
||||||
|
@ -115,10 +110,8 @@ test.describe('embed links', function () {
|
||||||
const containsReadOnlyLink = shareLink.indexOf('r.') > 0;
|
const containsReadOnlyLink = shareLink.indexOf('r.') > 0;
|
||||||
expect(containsReadOnlyLink).toBe(true);
|
expect(containsReadOnlyLink).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
test.describe('the embed as iframe code', function () {
|
test('the embed as iframe code is an iframe with the the correct url parameters and correct size', async function ({page}) {
|
||||||
test('is an iframe with the the correct url parameters and correct size', async function ({page}) {
|
|
||||||
|
|
||||||
|
|
||||||
// open share dropdown
|
// open share dropdown
|
||||||
|
@ -139,8 +132,5 @@ test.describe('embed links', function () {
|
||||||
|
|
||||||
await checkiFrameCode(embedCode, true, page);
|
await checkiFrameCode(embedCode, true, page);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue