mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	[plugin] Mandatory plugins (#10094)
* Add setting for "mandatory" plugins * Add 'is_active' method to PluginConfig model * Check against plugin config object by priority * Prevent plugin from reporting its own 'active' status * Refactor get_plugin_class for LabelPrint endpoint * Fix typo * Mark internal plugin methods as "final" - Prevent plugins from overriding them * Enhanced checks for bad actor plugins * Enhanced unit test for plugin install via API * Playwright tests for plugin errors * Test that builtin mandatory plugins are always activated * Force mandatory plugins to be marked as active on load * API unit tests * Unit testing for plugin filtering * Updated playwright tests - Force one extra plugin to be mandatory in configuration * Adjust unit tests * Updated docs * Tweak unit test * Another unit test fix * Fix with_mixin - Checking active status first is expensive... * Make with_mixin call much more efficient - Pre-load the PluginConfig objects - Additional unit tests - Ensure fixed query count * Fix the 'is_package' method for PluginConfig * Tweak unit test * Make api_info endpoint more efficient - with_mixin is now very quick * Run just single test * Disable CI test * Revert changes to CI pipeline * Fix typo * Debug for test * Style fix * Additional checks * Ensure reload * Ensure plugin registry is ready before running unit tests * Fix typo * Add debug statements * Additional debug output * Debug logging for MySQL * Ensure config objects are created? * Ensure plugin registry is reloaded before running tests * Remove intentional failure * Reset debug level * Fix CI pipeline * Fix * Fix test mixins * Fix test class * Further updates * Adjust info view * Test refactoring * Fix recursion issue in machine registry * Force cache behavior * Reduce API query limits in testing * Handle potential error case in with_mixin * remove custom query time code * Prevent override of is_mandatory() * Prevent unnecessary reloads * Tweak unit tests * Tweak mandatory active save * Tweak unit test * Enhanced unit testing * Exclude lines from coverage * (final)? cleanup * Prevent recursive reloads --------- Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
		| @@ -137,6 +137,18 @@ test('Plugins - Functionality', async ({ browser }) => { | ||||
|   await page.getByRole('menuitem', { name: 'Deactivate' }).click(); | ||||
|   await page.getByRole('button', { name: 'Submit' }).click(); | ||||
|   await page.getByText('The plugin was deactivated').waitFor(); | ||||
|  | ||||
|   // Check for custom "mandatory" plugin | ||||
|   await clearTableFilters(page); | ||||
|   await setTableChoiceFilter(page, 'Mandatory', 'Yes'); | ||||
|   await setTableChoiceFilter(page, 'Sample', 'Yes'); | ||||
|   await setTableChoiceFilter(page, 'Builtin', 'No'); | ||||
|  | ||||
|   await page.getByText('1 - 1 / 1').waitFor(); | ||||
|   await page | ||||
|     .getByRole('cell', { name: 'SampleLocatePlugin' }) | ||||
|     .first() | ||||
|     .waitFor(); | ||||
| }); | ||||
|  | ||||
| test('Plugins - Panels', async ({ browser, request }) => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user