一些检查失败了
automerge / automerge (push) Has been cancelled
react-native-android-build-apk / AssembleRelease (push) Has been cancelled
Build macOS M1 / Main (push) Has been cancelled
Joplin Continuous Integration / Main (macos-15-intel) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / Main (ubuntu-22.04-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-11-vs2026-arm) (push) Has been cancelled
Joplin Continuous Integration / Main (windows-2025) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04) (push) Has been cancelled
Joplin Continuous Integration / ServerDockerImage (ubuntu-22.04-arm) (push) Has been cancelled
Joplin UI tests / Main (ubuntu-22.04) (push) Has been cancelled
Joplin UI tests / Main (windows-2025) (push) Has been cancelled
Joplin UI tests / Mobile (push) Has been cancelled
Close stale issues / ProcessStaleIssues (push) Has been cancelled
29 行
975 B
TypeScript
29 行
975 B
TypeScript
import { test } from './util/test';
|
|
import MainScreen from './models/MainScreen';
|
|
|
|
test.describe('chatPanel', () => {
|
|
test('should not clear undo history when opening/closing the chat panel', async ({ mainWindow, electronApp }) => {
|
|
const mainScreen = await new MainScreen(mainWindow).setup();
|
|
await mainScreen.createNewNote('test');
|
|
|
|
const noteEditor = mainScreen.noteEditor;
|
|
const markdownEditor = await noteEditor.showMarkdownEditor();
|
|
await markdownEditor.typeText('Testing');
|
|
await noteEditor.expectToHaveText('Testing');
|
|
|
|
await mainScreen.chatPanel.configure(electronApp);
|
|
await mainScreen.chatPanel.open(electronApp);
|
|
await mainScreen.chatPanel.close(electronApp);
|
|
|
|
// Should still have the correct content
|
|
await noteEditor.expectToHaveText('Testing');
|
|
|
|
// Should be possible to undo everything
|
|
for (let i = 0; i < 'Testing'.length; i++) {
|
|
await noteEditor.undo(electronApp);
|
|
}
|
|
await noteEditor.expectToHaveText(/^[\n]?$/);
|
|
});
|
|
});
|
|
|