[Lexical][CI] Add more ||ism in e2e tests to decrease overall run time (#6237)

This commit is contained in:
Sahejkm
2024-06-03 13:19:42 +08:00
committed by GitHub
parent 24706837f1
commit 9305d06847
7 changed files with 11 additions and 9 deletions

View File

@ -35,7 +35,7 @@ test.beforeEach(({isPlainText}) => {
test.skip(isPlainText);
});
test.describe('Links', () => {
test.describe.parallel('Links', () => {
test.beforeEach(({isCollab, page}) => initialize({isCollab, page}));
test(`Can convert a text node into a link`, async ({page}) => {
await focusEditor(page);

View File

@ -68,7 +68,7 @@ test.beforeEach(({isPlainText}) => {
test.skip(isPlainText);
});
test.describe('Nested List', () => {
test.describe.parallel('Nested List', () => {
test.beforeEach(({isCollab, page}) => initialize({isCollab, page}));
test(`Can create a list and partially copy some content out of it`, async ({

View File

@ -49,7 +49,7 @@ async function checkHTMLExpectationsIncludingUndoRedo(
await assertHTML(page, forwardHTML);
}
test.describe('Markdown', () => {
test.describe.parallel('Markdown', () => {
test.beforeEach(({isCollab, page}) => initialize({isCollab, page}));
const triggersAndExpectations = [
{
@ -374,7 +374,7 @@ async function assertMarkdownImportExport(
await assertHTML(page, expectedHTML);
}
test.describe('Markdown', () => {
test.describe.parallel('Markdown', () => {
test.beforeEach(({isCollab, isPlainText, page}) => {
test.skip(isPlainText);
return initialize({isCollab, page});

View File

@ -46,7 +46,7 @@ import {
YOUTUBE_SAMPLE_URL,
} from '../utils/index.mjs';
test.describe('Selection', () => {
test.describe.parallel('Selection', () => {
test.beforeEach(({isCollab, page}) => initialize({isCollab, page}));
test('does not focus the editor on load', async ({page}) => {
const editorHasFocus = async () =>

View File

@ -69,7 +69,7 @@ async function fillTablePartiallyWithText(page) {
await page.keyboard.press('c');
}
test.describe('Tables', () => {
test.describe.parallel('Tables', () => {
test(`Can a table be inserted from the toolbar`, async ({
page,
isPlainText,
@ -152,7 +152,8 @@ test.describe('Tables', () => {
);
});
test.describe(`Can exit tables with the horizontal arrow keys`, () => {
test.describe
.parallel(`Can exit tables with the horizontal arrow keys`, () => {
test(`Can exit the first cell of a non-nested table`, async ({
page,
isPlainText,
@ -488,7 +489,7 @@ test.describe('Tables', () => {
});
});
test.describe(`Can navigate table with keyboard`, () => {
test.describe.parallel(`Can navigate table with keyboard`, () => {
test(`Can navigate cells horizontally`, async ({
page,
isPlainText,

View File

@ -32,7 +32,7 @@ import {
waitForSelector,
} from '../utils/index.mjs';
test.describe('TextFormatting', () => {
test.describe.parallel('TextFormatting', () => {
test.beforeEach(({isCollab, page}) => initialize({isCollab, page}));
test(`Can create bold text using the shortcut`, async ({
page,

View File

@ -48,5 +48,6 @@ const config = {
timeout: 120 * 1000,
}
: undefined,
workers: 4,
};
module.exports = config;