diff --git a/playwright/e2e/embed.spec.ts b/playwright/e2e/embed.spec.ts index 508d921f0..6938fb5ce 100644 --- a/playwright/e2e/embed.spec.ts +++ b/playwright/e2e/embed.spec.ts @@ -12,6 +12,7 @@ test.beforeEach(async ({ page }) => { }) test('embed whiteboard in another whiteboard', async ({ page }) => { + test.skip(process.env.SERVER_VERSION === 'master', 'The Files smart picker and file reference widget do not work with the Nextcloud 36 viewer yet') test.setTimeout(90000) const firstBoardName = `first whiteboard ${Date.now()}` await createWhiteboard(page, { name: firstBoardName }) diff --git a/tests/Unit/Controller/PickerControllerTest.php b/tests/Unit/Controller/PickerControllerTest.php index 9be24bb57..9bbfaa9b1 100644 --- a/tests/Unit/Controller/PickerControllerTest.php +++ b/tests/Unit/Controller/PickerControllerTest.php @@ -15,6 +15,7 @@ use OCP\Files\File; use OCP\Files\Folder; use OCP\Files\IRootFolder; +use OCP\Files\IUserFolder; use OCP\Files\NotFoundException; use OCP\Files\Template\ITemplateManager; use OCP\IConfig; @@ -67,7 +68,7 @@ public function testIndexMergesOrgAndPersonalEntries(): void { $templateManager->method('hasTemplateDirectory')->willReturn(true); $templateManager->method('getTemplatePath')->willReturn('Templates/'); - $userFolder = $this->createMock(Folder::class); + $userFolder = $this->createMock(interface_exists(IUserFolder::class) ? IUserFolder::class : Folder::class); $userFolder->method('get')->with('Templates/')->willReturn($userTemplates); $rootFolder = $this->createMock(IRootFolder::class); diff --git a/tests/Unit/Controller/WhiteboardControllerTest.php b/tests/Unit/Controller/WhiteboardControllerTest.php index 79fd28303..43fbc9dda 100644 --- a/tests/Unit/Controller/WhiteboardControllerTest.php +++ b/tests/Unit/Controller/WhiteboardControllerTest.php @@ -26,6 +26,7 @@ use OCP\Files\File; use OCP\Files\Folder; use OCP\Files\IRootFolder; +use OCP\Files\IUserFolder; use OCP\Files\Template\ITemplateManager; use OCP\ICacheFactory; use OCP\IConfig; @@ -85,7 +86,7 @@ private function makeController( return $folder; }); - $userFolder = $this->createMock(Folder::class); + $userFolder = $this->createMock(interface_exists(IUserFolder::class) ? IUserFolder::class : Folder::class); $userFolder->method('get')->with('Templates/')->willReturn($templatesFolder); $whiteboardFile = $this->createMock(File::class); $whiteboardFile->method('getId')->willReturn(123); diff --git a/tests/Unit/Service/CanvasTemplateServiceTest.php b/tests/Unit/Service/CanvasTemplateServiceTest.php index 24e5a2de1..01ef3047d 100644 --- a/tests/Unit/Service/CanvasTemplateServiceTest.php +++ b/tests/Unit/Service/CanvasTemplateServiceTest.php @@ -13,6 +13,7 @@ use OCP\Files\File; use OCP\Files\Folder; use OCP\Files\IRootFolder; +use OCP\Files\IUserFolder; use OCP\Files\Template\ITemplateManager; use OCP\IConfig; use PHPUnit\Framework\MockObject\MockObject; @@ -38,7 +39,7 @@ protected function setUp(): void { $templateManager->method('getTemplatePath')->willReturn('Templates/'); $templatesFolder = $this->mockFolder($this->templatesChildren); - $userFolder = $this->createMock(Folder::class); + $userFolder = $this->createMock(interface_exists(IUserFolder::class) ? IUserFolder::class : Folder::class); $userFolder->method('get')->with('Templates/')->willReturn($templatesFolder); $orgCanvasTemplatesFolder = $this->mockFolder($this->orgCanvasTemplates); diff --git a/tests/Unit/Service/WhiteboardLibraryServiceTest.php b/tests/Unit/Service/WhiteboardLibraryServiceTest.php index 98159e0d7..ded504729 100644 --- a/tests/Unit/Service/WhiteboardLibraryServiceTest.php +++ b/tests/Unit/Service/WhiteboardLibraryServiceTest.php @@ -13,6 +13,7 @@ use OCP\Files\File; use OCP\Files\Folder; use OCP\Files\IRootFolder; +use OCP\Files\IUserFolder; use OCP\Files\Template\ITemplateManager; use OCP\IConfig; use PHPUnit\Framework\MockObject\MockObject; @@ -41,7 +42,7 @@ protected function setUp(): void { $this->templateManager->method('getTemplatePath')->willReturn('Templates/'); $templatesFolder = $this->mockFolder($this->templatesChildren); - $userFolder = $this->createMock(Folder::class); + $userFolder = $this->createMock(interface_exists(IUserFolder::class) ? IUserFolder::class : Folder::class); $userFolder->method('get')->with('Templates/')->willReturn($templatesFolder); // App data tree: appdata_test/whiteboard/