mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 10:45:57 +00:00
- Remove Angular testability API checks from waitForAngularStability Experiment showed Playwright's auto-waiting is sufficient for most tests - Fix time-tracking-feature test: add missing await, replace hardcoded waitForTimeout with proper toHaveClass assertions - Refactor plugin-simple-enable test to use SettingsPage methods instead of brittle page.evaluate() DOM manipulation (106 -> 33 lines) - Change trace config to 'retain-on-failure' for better debugging
32 lines
1.2 KiB
TypeScript
32 lines
1.2 KiB
TypeScript
import { expect, test } from '../../fixtures/test.fixture';
|
|
import * as path from 'path';
|
|
|
|
const TEST_PLUGIN_ID = 'test-upload-plugin';
|
|
|
|
test.describe('Plugin Simple Enable', () => {
|
|
test('upload and enable test plugin', async ({ workViewPage, settingsPage }) => {
|
|
await workViewPage.waitForTaskList();
|
|
|
|
// Navigate to plugin settings using page object
|
|
await settingsPage.navigateToPluginSettings();
|
|
|
|
// Upload plugin ZIP file
|
|
const testPluginPath = path.resolve(__dirname, '../../../src/assets/test-plugin.zip');
|
|
await settingsPage.uploadPlugin(testPluginPath);
|
|
|
|
// Check if plugin was uploaded using Playwright's built-in waiting
|
|
const pluginExists = await settingsPage.pluginExists(TEST_PLUGIN_ID);
|
|
expect(pluginExists).toBeTruthy();
|
|
|
|
// Enable the plugin using page object
|
|
const enableResult = await settingsPage.enablePlugin(TEST_PLUGIN_ID);
|
|
expect(enableResult).toBeTruthy();
|
|
|
|
// Verify plugin is enabled
|
|
const isEnabled = await settingsPage.isPluginEnabled(TEST_PLUGIN_ID);
|
|
expect(isEnabled).toBeTruthy();
|
|
|
|
// The test plugin has isSkipMenuEntry: true, so no menu entry should appear
|
|
// and iFrame: false, so no iframe view
|
|
});
|
|
});
|