1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Chore: Disable flaky test: Disable Rich Text Editor case of the editor.setText command test (#11311)

This commit is contained in:
Henry Heino
2024-11-05 01:04:44 -08:00
committed by GitHub
parent ce26e085ff
commit 9b9bb6eb49

View File

@ -3,31 +3,24 @@ import { test } from './util/test';
import MainScreen from './models/MainScreen'; import MainScreen from './models/MainScreen';
test.describe('pluginApi', () => { test.describe('pluginApi', () => {
for (const richTextEditor of [false, true]) { test('the editor.setText command should update the current note (use RTE: false)', async ({ startAppWithPlugins }) => {
test(`the editor.setText command should update the current note (use RTE: ${richTextEditor})`, async ({ startAppWithPlugins }) => { const { app, mainWindow } = await startAppWithPlugins(['resources/test-plugins/execCommand.js']);
const { app, mainWindow } = await startAppWithPlugins(['resources/test-plugins/execCommand.js']); const mainScreen = new MainScreen(mainWindow);
const mainScreen = new MainScreen(mainWindow); await mainScreen.createNewNote('First note');
await mainScreen.createNewNote('First note'); const editor = mainScreen.noteEditor;
const editor = mainScreen.noteEditor;
await editor.focusCodeMirrorEditor(); await editor.focusCodeMirrorEditor();
await mainWindow.keyboard.type('This content should be overwritten.'); await mainWindow.keyboard.type('This content should be overwritten.');
if (richTextEditor) { await editor.expectToHaveText('This content should be overwritten.');
await editor.toggleEditorsButton.click(); await mainScreen.goToAnything.runCommand(app, 'testUpdateEditorText');
await editor.richTextEditor.click(); await editor.expectToHaveText('PASS');
}
await editor.expectToHaveText('This content should be overwritten.'); // Should still have the same text after switching notes:
await mainScreen.goToAnything.runCommand(app, 'testUpdateEditorText'); await mainScreen.createNewNote('Second note');
await editor.expectToHaveText('PASS'); await editor.goBack();
// Should still have the same text after switching notes: await editor.expectToHaveText('PASS');
await mainScreen.createNewNote('Second note'); });
await editor.goBack();
await editor.expectToHaveText('PASS');
});
}
}); });