super-productivity/e2e/n-browser-interface.ts
Johannes Millan d79f9267ac fix(e2e): improve plugin e2e test navigation and setup
- Fix navigateToPluginSettings to properly expand collapsed plugin section
- Add enableTestPlugin command to simplify plugin enabling in tests
- Update all plugin tests to use the new enableTestPlugin helper
- Add better error logging in navigation helper
- Reduce wait times where appropriate

The main issue was that the plugin section is inside a collapsible that
starts collapsed, so tests couldn't find the plugin-management component.
2025-06-27 19:27:17 +02:00

23 lines
938 B
TypeScript

import { NightwatchAPI } from 'nightwatch';
export interface AddTaskWithReminderParams {
title: string;
taskSel?: string;
scheduleTime?: number;
}
export interface NBrowser extends NightwatchAPI {
addTask: (taskTitle: string, isSkipClose?: boolean) => NBrowser;
addTaskWithNewTag: (tagName: string, taskTitle: string) => NBrowser;
addNote: (noteTitle: string) => NBrowser;
draftTask: (taskTitle: string) => NBrowser;
createAndGoToDefaultProject: () => NBrowser;
noError: () => NBrowser;
loadAppAndClickAwayWelcomeDialog: (url?: string) => NBrowser;
openPanelForTask: (taskSel: string) => NBrowser;
sendKeysToActiveEl: (keys: string | string[]) => NBrowser;
addTaskWithReminder: (params: AddTaskWithReminderParams) => NBrowser;
navigateToPluginSettings: () => NBrowser;
checkPluginStatus: (pluginName: string, expectedEnabled?: boolean) => NBrowser;
enableTestPlugin: (pluginName?: string) => NBrowser;
}