diff --git a/composer.lock b/composer.lock index 2b6bcaaf..1e0c28d1 100644 --- a/composer.lock +++ b/composer.lock @@ -67,15 +67,15 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=8.3" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/tests/acceptance/config/behat.php b/tests/acceptance/config/behat.php new file mode 100644 index 00000000..b79e7c74 --- /dev/null +++ b/tests/acceptance/config/behat.php @@ -0,0 +1,292 @@ + + * @copyright Copyright (c) 2026, ownCloud GmbH + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, + * as published by the Free Software Foundation; + * either version 3 of the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see + * + */ + +use Behat\Config\Config; +use Behat\Config\Extension; +use Behat\Config\Profile; +use Behat\Config\Suite; +use Cjm\Behat\StepThroughExtension\ServiceContainer\StepThroughExtension; + +$featureContextArgs = [ + 'baseUrl' => 'http://localhost:8080', + 'adminUsername' => 'admin', + 'adminPassword' => 'admin', + 'regularUserPassword' => 123456, + 'ocPath' => 'apps/testing/api/v1/occ', +]; + +return (new Config()) + ->withProfile( + (new Profile( + 'default', + [ + 'autoload' => [ + '' => '%paths.base%/../features/bootstrap', + ], + ] + )) + ->withExtension(new Extension(StepThroughExtension::class)) + ->withSuite( + (new Suite('webUIActivityComments')) + ->addContext( + 'WebUIActivityContext', + ) + ->addContext( + 'FeatureContext', + $featureContextArgs + ) + ->addContext( + 'ActivityContext', + ) + ->addContext( + 'CommentsContext', + ) + ->addContext( + 'WebUIFilesContext', + ) + ->addContext( + 'WebUIGeneralContext', + ) + ->addContext( + 'WebUILoginContext', + ) + ->addContext( + 'WebUIPersonalGeneralSettingsContext', + ) + ->withPaths('%paths.base%/../features/webUIActivityComments') + ) + ->withSuite( + (new Suite('webUIActivityCreateUpdate')) + ->addContext( + 'WebUIActivityContext', + ) + ->addContext( + 'FeatureContext', + $featureContextArgs + ) + ->addContext( + 'ActivityContext', + ) + ->addContext( + 'WebUIFilesContext', + ) + ->addContext( + 'WebUIGeneralContext', + ) + ->addContext( + 'WebUILoginContext', + ) + ->addContext( + 'WebUIPersonalGeneralSettingsContext', + ) + ->withPaths('%paths.base%/../features/webUIActivityCreateUpdate') + ) + ->withSuite( + (new Suite('webUIActivityDeleteRestore')) + ->addContext( + 'WebUIActivityContext', + ) + ->addContext( + 'FeatureContext', + $featureContextArgs + ) + ->addContext( + 'ActivityContext', + ) + ->addContext( + 'OccContext', + ) + ->addContext( + 'TrashbinContext', + ) + ->addContext( + 'WebUIFilesContext', + ) + ->addContext( + 'WebUIGeneralContext', + ) + ->addContext( + 'WebUILoginContext', + ) + ->addContext( + 'WebUIPersonalGeneralSettingsContext', + ) + ->withPaths('%paths.base%/../features/webUIActivityDeleteRestore') + ) + ->withSuite( + (new Suite('webUIActivityFileMoveAndRename')) + ->addContext( + 'WebUIActivityContext', + ) + ->addContext( + 'FeatureContext', + $featureContextArgs + ) + ->addContext( + 'ActivityContext', + ) + ->addContext( + 'WebUIFilesContext', + ) + ->addContext( + 'WebUIGeneralContext', + ) + ->addContext( + 'WebUILoginContext', + ) + ->addContext( + 'WebUIPersonalGeneralSettingsContext', + ) + ->addContext( + 'WebUISharingContext', + ) + ->addContext( + 'OccContext', + ) + ->withPaths('%paths.base%/../features/webUIActivityFileMoveAndRename') + ) + ->withSuite( + (new Suite('webUIActivitySharingExternal')) + ->addContext( + 'WebUIActivityContext', + ) + ->addContext( + 'FeatureContext', + $featureContextArgs + ) + ->addContext( + 'ActivityContext', + ) + ->addContext( + 'FederationContext', + ) + ->addContext( + 'OccContext', + ) + ->addContext( + 'PublicWebDavContext', + ) + ->addContext( + 'WebUIFilesContext', + ) + ->addContext( + 'WebUIGeneralContext', + ) + ->addContext( + 'WebUILoginContext', + ) + ->addContext( + 'WebUIPersonalGeneralSettingsContext', + ) + ->addContext( + 'WebUISharingContext', + ) + ->withPaths('%paths.base%/../features/webUIActivitySharingExternal') + ) + ->withSuite( + (new Suite('webUIActivitySharingInternal')) + ->addContext( + 'WebUIActivityContext', + ) + ->addContext( + 'FeatureContext', + $featureContextArgs + ) + ->addContext( + 'ActivityContext', + ) + ->addContext( + 'WebUIFilesContext', + ) + ->addContext( + 'WebUIGeneralContext', + ) + ->addContext( + 'WebUILoginContext', + ) + ->addContext( + 'WebUIPersonalGeneralSettingsContext', + ) + ->addContext( + 'WebUISharingContext', + ) + ->addContext( + 'OccContext', + ) + ->addContext( + 'TrashbinContext', + ) + ->withPaths('%paths.base%/../features/webUIActivitySharingInternal') + ) + ->withSuite( + (new Suite('webUIActivityTags')) + ->addContext( + 'WebUIActivityContext', + ) + ->addContext( + 'FeatureContext', + $featureContextArgs + ) + ->addContext( + 'ActivityContext', + ) + ->addContext( + 'TagsContext', + ) + ->addContext( + 'WebUIFilesContext', + ) + ->addContext( + 'WebUIGeneralContext', + ) + ->addContext( + 'WebUILoginContext', + ) + ->addContext( + 'WebUIPersonalGeneralSettingsContext', + ) + ->withPaths('%paths.base%/../features/webUIActivityTags') + ) + ->withSuite( + (new Suite('apiActivity')) + ->addContext( + 'ActivityContext', + ) + ->addContext( + 'OccContext', + ) + ->addContext( + 'TrashbinContext', + ) + ->addContext( + 'PublicWebDavContext', + ) + ->addContext( + 'FeatureContext', + $featureContextArgs + ) + ->addContext( + 'FederationContext', + ) + ->withPaths('%paths.base%/../features/apiActivity') + ) + ); diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml deleted file mode 100644 index df9f5f0b..00000000 --- a/tests/acceptance/config/behat.yml +++ /dev/null @@ -1,120 +0,0 @@ -default: - autoload: - '': '%paths.base%/../features/bootstrap' - - extensions: - Cjm\Behat\StepThroughExtension: ~ - - suites: - webUIActivityComments: - paths: - - '%paths.base%/../features/webUIActivityComments' - contexts: - - WebUIActivityContext: - - FeatureContext: &common_feature_context_params - baseUrl: http://localhost:8080 - adminUsername: admin - adminPassword: admin - regularUserPassword: 123456 - ocPath: apps/testing/api/v1/occ - - ActivityContext: - - CommentsContext: - - WebUIFilesContext: - - WebUIGeneralContext: - - WebUILoginContext: - - WebUIPersonalGeneralSettingsContext: - - webUIActivityCreateUpdate: - paths: - - '%paths.base%/../features/webUIActivityCreateUpdate' - contexts: - - WebUIActivityContext: - - FeatureContext: *common_feature_context_params - - ActivityContext: - - WebUIFilesContext: - - WebUIGeneralContext: - - WebUILoginContext: - - WebUIPersonalGeneralSettingsContext: - - webUIActivityDeleteRestore: - paths: - - '%paths.base%/../features/webUIActivityDeleteRestore' - contexts: - - WebUIActivityContext: - - FeatureContext: *common_feature_context_params - - ActivityContext: - - OccContext: - - TrashbinContext: - - WebUIFilesContext: - - WebUIGeneralContext: - - WebUILoginContext: - - WebUIPersonalGeneralSettingsContext: - - webUIActivityFileMoveAndRename: - paths: - - '%paths.base%/../features/webUIActivityFileMoveAndRename' - contexts: - - WebUIActivityContext: - - FeatureContext: *common_feature_context_params - - ActivityContext: - - WebUIFilesContext: - - WebUIGeneralContext: - - WebUILoginContext: - - WebUIPersonalGeneralSettingsContext: - - WebUISharingContext: - - OccContext: - - webUIActivitySharingExternal: - paths: - - '%paths.base%/../features/webUIActivitySharingExternal' - contexts: - - WebUIActivityContext: - - FeatureContext: *common_feature_context_params - - ActivityContext: - - FederationContext: - - OccContext: - - PublicWebDavContext: - - WebUIFilesContext: - - WebUIGeneralContext: - - WebUILoginContext: - - WebUIPersonalGeneralSettingsContext: - - WebUISharingContext: - - webUIActivitySharingInternal: - paths: - - '%paths.base%/../features/webUIActivitySharingInternal' - contexts: - - WebUIActivityContext: - - FeatureContext: *common_feature_context_params - - ActivityContext: - - WebUIFilesContext: - - WebUIGeneralContext: - - WebUILoginContext: - - WebUIPersonalGeneralSettingsContext: - - WebUISharingContext: - - OccContext: - - TrashbinContext: - - webUIActivityTags: - paths: - - '%paths.base%/../features/webUIActivityTags' - contexts: - - WebUIActivityContext: - - FeatureContext: *common_feature_context_params - - ActivityContext: - - TagsContext: - - WebUIFilesContext: - - WebUIGeneralContext: - - WebUILoginContext: - - WebUIPersonalGeneralSettingsContext: - - apiActivity: - paths: - - '%paths.base%/../features/apiActivity' - contexts: - - ActivityContext: - - OccContext: - - TrashbinContext: - - PublicWebDavContext: - - FeatureContext: *common_feature_context_params - - FederationContext: diff --git a/vendor-bin/behat/composer.json b/vendor-bin/behat/composer.json index d48dccd4..435d25f9 100644 --- a/vendor-bin/behat/composer.json +++ b/vendor-bin/behat/composer.json @@ -1,12 +1,12 @@ { "config" : { "platform": { - "php": "7.4" + "php": "8.3" } }, "require": { - "behat/behat": "^3.13", - "behat/gherkin": "^4.9", + "behat/behat": "^3.31", + "behat/gherkin": "^4.17", "behat/mink": "1.7.1", "friends-of-behat/mink-extension": "^2.7", "behat/mink-selenium2-driver": "^1.5", @@ -15,8 +15,8 @@ "sensiolabs/behat-page-object-extension": "^2.3", "symfony/translation": "^5.4", "sabre/xml": "^2.2", - "guzzlehttp/guzzle": "^7.7", + "guzzlehttp/guzzle": "^7.12", "phpunit/phpunit": "^9.6", - "helmich/phpunit-json-assert": "^3.4" + "helmich/phpunit-json-assert": "^3.5" } }