diff --git a/.github/workflows/php-test-v1.10.yml b/.github/workflows/php-test-v1.10.yml deleted file mode 100644 index 231682d..0000000 --- a/.github/workflows/php-test-v1.10.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: PHP Codeception Tests - v1.10 - -on: - push: - -jobs: - tests: - uses: humhub/actions/.github/workflows/module-tests-v1.10.yml@main - with: - module-id: cfiles - use-rest-module: true diff --git a/.github/workflows/php-test-v1.12.yml b/.github/workflows/php-test-v1.12.yml new file mode 100644 index 0000000..f0e6008 --- /dev/null +++ b/.github/workflows/php-test-v1.12.yml @@ -0,0 +1,11 @@ +name: PHP Codeception Tests - v1.12 + +on: + push: + +jobs: + tests: + uses: humhub/actions/.github/workflows/module-tests-v1.12.yml@main + with: + module-id: cfiles + use-rest-module: true diff --git a/controllers/rest/FolderController.php b/controllers/rest/FolderController.php index 29858cc..c269bb7 100644 --- a/controllers/rest/FolderController.php +++ b/controllers/rest/FolderController.php @@ -96,7 +96,7 @@ public function actionUpdate($id) } if ($folder->load(Yii::$app->request->getBodyParams()) && $folder->save()) { - return RestDefinitions::getFolder($folder); + return RestDefinitions::getFolder(Folder::findOne(['id' => $folder->id])); } if ($folder->hasErrors()) { diff --git a/tests/codeception/acceptance/GuestAccessCest.php b/tests/codeception/acceptance/GuestAccessCest.php index 66c7c6e..25ce7cc 100644 --- a/tests/codeception/acceptance/GuestAccessCest.php +++ b/tests/codeception/acceptance/GuestAccessCest.php @@ -34,7 +34,7 @@ public function testGuestAccess(AcceptanceTester $I) $I->logout(); $I->amOnSpace2(); - $I->see('Files', '.layout-nav-container'); + $I->waitForText('Files', null, '.layout-nav-container'); $I->click('Files', '.layout-nav-container'); $I->seeInFileList('guest'); diff --git a/tests/codeception/acceptance/VisibilityCest.php b/tests/codeception/acceptance/VisibilityCest.php index 0507269..1b66dee 100644 --- a/tests/codeception/acceptance/VisibilityCest.php +++ b/tests/codeception/acceptance/VisibilityCest.php @@ -35,7 +35,7 @@ public function testVisibility(AcceptanceTester $I) $I->fillField('Folder[description]', 'visibility2'); $I->expect('The folder visibility to be private'); - $I->seeElement('[for="folder-visibility"] input[type=checkbox]:disabled'); + $I->waitForElement('[for="folder-visibility"] input[type=checkbox]:disabled'); $I->click('Save', '#globalModal'); $I->waitForText('This folder is empty.');