feat: Initial clean release of CHM
一些检查失败了
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
一些检查失败了
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
这个提交包含在:
@@ -0,0 +1,43 @@
|
||||
import activateMainMenuItem from '../util/activateMainMenuItem';
|
||||
import { ElectronApplication, Locator, Page, expect } from '@playwright/test';
|
||||
|
||||
export default class NoteList {
|
||||
public readonly container: Locator;
|
||||
public readonly sortOrderButton: Locator;
|
||||
|
||||
public constructor(page: Page) {
|
||||
this.container = page.locator('.rli-noteList');
|
||||
this.sortOrderButton = this.container.getByRole('button', { name: 'Toggle sort order' });
|
||||
}
|
||||
|
||||
public waitFor() {
|
||||
return this.container.waitFor();
|
||||
}
|
||||
|
||||
private async sortBy(electronApp: ElectronApplication, sortMethod: string) {
|
||||
await activateMainMenuItem(electronApp, sortMethod, 'Sort notes by');
|
||||
}
|
||||
|
||||
public async sortByTitle(electronApp: ElectronApplication) {
|
||||
await this.sortBy(electronApp, 'Title');
|
||||
await expect(this.sortOrderButton).toHaveAttribute('title', /Toggle sort order field:[\n ]*title ->/);
|
||||
}
|
||||
|
||||
public async focusContent(electronApp: ElectronApplication) {
|
||||
await activateMainMenuItem(electronApp, 'Note list', 'Focus');
|
||||
await expect(this.container.locator(':focus')).toBeAttached();
|
||||
// Wait for the list to have rendered a selected item before the caller
|
||||
// tries to navigate with arrow keys. Without this, the aria-selected
|
||||
// attribute may not be set yet on slow CI runners.
|
||||
await expect(this.container.locator('[aria-selected="true"]')).toBeAttached();
|
||||
}
|
||||
|
||||
// The resultant locator may fail to resolve if the item is not visible
|
||||
public getNoteItemByTitle(title: string|RegExp) {
|
||||
return this.container.getByRole('option', { name: title });
|
||||
}
|
||||
|
||||
public async expectNoteToBeSelected(title: string|RegExp) {
|
||||
await expect(this.getNoteItemByTitle(title)).toHaveAttribute('aria-selected', 'true');
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户