diff --git a/apps/files_sharing/js/dist/files_sharing_tab.js b/apps/files_sharing/js/dist/files_sharing_tab.js index 724c903cd8..c7a7387958 100644 Binary files a/apps/files_sharing/js/dist/files_sharing_tab.js and b/apps/files_sharing/js/dist/files_sharing_tab.js differ diff --git a/apps/files_sharing/js/dist/files_sharing_tab.js.map b/apps/files_sharing/js/dist/files_sharing_tab.js.map index 64acacdd90..40bda83585 100644 Binary files a/apps/files_sharing/js/dist/files_sharing_tab.js.map and b/apps/files_sharing/js/dist/files_sharing_tab.js.map differ diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index 3cb3d87cfb..e5829389a4 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -49,7 +49,6 @@ use OCP\AppFramework\Utility\IControllerMethodReflector; use OCP\Defaults; use OCP\EventDispatcher\IEventDispatcher; use OCP\Federation\ICloudIdManager; -use OCP\IContainer; use OCP\Files\Config\IMountProviderCollection; use OCP\IContainer; use OCP\IGroup; diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php index ce5ceb1f64..cc207429e7 100644 --- a/apps/files_sharing/tests/TestCase.php +++ b/apps/files_sharing/tests/TestCase.php @@ -71,9 +71,8 @@ abstract class TestCase extends \Test\TestCase { public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); - $application = new Application(); - $application->registerMountProviders(); - + new Application(); + // reset backend \OC_User::clearBackends(); \OC::$server->getGroupManager()->clearBackends(); diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php index 9e5b029d9d..35a5a95718 100644 --- a/apps/files_trashbin/tests/TrashbinTest.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -28,6 +28,7 @@ */ use OCA\Files_Trashbin\Tests; +use OCA\Files_Sharing\AppInfo\Application; /** * Class Test_Encryption @@ -67,8 +68,9 @@ class TrashbinTest extends \Test\TestCase { // clear share hooks \OC_Hook::clear('OCP\\Share'); \OC::registerShareHooks(); - $application = \OC::$server->query(\OCA\Files_Sharing\AppInfo\Application::class); - $application->registerMountProviders(); + + // init files sharing + new Application(); //disable encryption \OC::$server->getAppManager()->disableApp('encryption'); diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php index 3f51f61962..cc326b1892 100644 --- a/apps/files_versions/tests/VersioningTest.php +++ b/apps/files_versions/tests/VersioningTest.php @@ -60,7 +60,6 @@ class VersioningTest extends \Test\TestCase { parent::setUpBeforeClass(); $application = new \OCA\Files_Sharing\AppInfo\Application(); - $application->registerMountProviders(); // create test user self::loginHelper(self::TEST_VERSIONS_USER2, true); diff --git a/tests/karma.config.js b/tests/karma.config.js index fb460ad850..06503bf9bf 100644 --- a/tests/karma.config.js +++ b/tests/karma.config.js @@ -53,10 +53,14 @@ module.exports = function(config) { // only test these files, others are not ready and mess // up with the global namespace/classes/state 'apps/files_sharing/js/app.js', - 'apps/files_sharing/js/sharedfilelist.js', 'apps/files_sharing/js/dist/additionalScripts.js', - 'apps/files_sharing/js/public.js', + 'apps/files_sharing/js/dist/files_sharing_tab.js', + 'apps/files_sharing/js/dist/files_sharing.js', + 'apps/files_sharing/js/dist/main.js', + 'apps/files_sharing/js/dist/sidebar.js', 'apps/files_sharing/js/files_drop.js', + 'apps/files_sharing/js/public.js', + 'apps/files_sharing/js/sharedfilelist.js', 'apps/files_sharing/js/templates.js', ], testFiles: ['apps/files_sharing/tests/js/*.js'] diff --git a/tests/lib/Files/EtagTest.php b/tests/lib/Files/EtagTest.php index acda220d01..554812253f 100644 --- a/tests/lib/Files/EtagTest.php +++ b/tests/lib/Files/EtagTest.php @@ -10,6 +10,7 @@ namespace Test\Files; use OC\Files\Filesystem; use OCP\Share; +use OCA\Files_Sharing\AppInfo\Application; /** * Class EtagTest @@ -32,8 +33,9 @@ class EtagTest extends \Test\TestCase { parent::setUp(); \OC_Hook::clear('OC_Filesystem', 'setup'); - $application = new \OCA\Files_Sharing\AppInfo\Application(); - $application->registerMountProviders(); + // init files sharing + new Application(); + \OC\Share\Share::registerBackend('file', 'OCA\Files_Sharing\ShareBackend\File'); \OC\Share\Share::registerBackend('folder', 'OCA\Files_Sharing\ShareBackend\Folder', 'file');