Skip to content

Commit

Permalink
Merge pull request #164 from humhub/fix/260-tests
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
luke- authored Jan 16, 2023
2 parents bb6a38c + 08e9f7e commit 7fe5510
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/php-test-v1.10.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/php-test-v1.12.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion controllers/rest/FolderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion tests/codeception/acceptance/GuestAccessCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion tests/codeception/acceptance/VisibilityCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down

0 comments on commit 7fe5510

Please sign in to comment.