]> source.dussan.org Git - nextcloud-server.git/commitdiff
chore(cypress): Migrate apps acceptance tests to Cypress 41303/head
authorFerdinand Thiessen <opensource@fthiessen.de>
Mon, 6 Nov 2023 11:29:04 +0000 (12:29 +0100)
committerFerdinand Thiessen <opensource@fthiessen.de>
Mon, 6 Nov 2023 14:07:43 +0000 (15:07 +0100)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
43 files changed:
.drone.yml
cypress/e2e/login/login.cy.ts
cypress/e2e/settings/apps.cy.ts [new file with mode: 0644]
tests/acceptance/composer.json [deleted file]
tests/acceptance/composer.lock [deleted file]
tests/acceptance/config/behat.yml [deleted file]
tests/acceptance/config/firefox-profiles/css-grid-enabled.zip [deleted file]
tests/acceptance/features/app-comments.feature [deleted file]
tests/acceptance/features/apps.feature [deleted file]
tests/acceptance/features/bootstrap/AppNavigationContext.php [deleted file]
tests/acceptance/features/bootstrap/AppSettingsContext.php [deleted file]
tests/acceptance/features/bootstrap/AppsManagementContext.php [deleted file]
tests/acceptance/features/bootstrap/CommentsAppContext.php [deleted file]
tests/acceptance/features/bootstrap/ContactsMenuContext.php [deleted file]
tests/acceptance/features/bootstrap/DialogContext.php [deleted file]
tests/acceptance/features/bootstrap/FeatureContext.php [deleted file]
tests/acceptance/features/bootstrap/FileListAncestorSetter.php [deleted file]
tests/acceptance/features/bootstrap/FileListContext.php [deleted file]
tests/acceptance/features/bootstrap/FilesAppContext.php [deleted file]
tests/acceptance/features/bootstrap/FilesAppSharingContext.php [deleted file]
tests/acceptance/features/bootstrap/NotificationsContext.php [deleted file]
tests/acceptance/features/bootstrap/PublicShareContext.php [deleted file]
tests/acceptance/features/bootstrap/SearchContext.php [deleted file]
tests/acceptance/features/bootstrap/SettingsContext.php [deleted file]
tests/acceptance/features/bootstrap/SettingsMenuContext.php [deleted file]
tests/acceptance/features/bootstrap/ToastContext.php [deleted file]
tests/acceptance/features/bootstrap/WaitFor.php [deleted file]
tests/acceptance/features/core/Actor.php [deleted file]
tests/acceptance/features/core/ActorAware.php [deleted file]
tests/acceptance/features/core/ActorAwareInterface.php [deleted file]
tests/acceptance/features/core/ActorContext.php [deleted file]
tests/acceptance/features/core/ElementFinder.php [deleted file]
tests/acceptance/features/core/ElementWrapper.php [deleted file]
tests/acceptance/features/core/Locator.php [deleted file]
tests/acceptance/features/core/NextcloudTestServerContext.php [deleted file]
tests/acceptance/features/core/NextcloudTestServerHelper.php [deleted file]
tests/acceptance/features/core/NextcloudTestServerLocalApacheHelper.php [deleted file]
tests/acceptance/features/core/NextcloudTestServerLocalBuiltInHelper.php [deleted file]
tests/acceptance/features/core/NoSuchElementException.php [deleted file]
tests/acceptance/features/core/Utils.php [deleted file]
tests/acceptance/installAndConfigureServer.sh [deleted file]
tests/acceptance/run-local.sh [deleted file]
tests/acceptance/run.sh [deleted file]

index 3a7574a509ca11338e86ca2c4aaaddfb6ad6c625..c271d9dc4c9974e2c474d0524fe1cea8bcd0ecb8 100644 (file)
@@ -1561,36 +1561,6 @@ trigger:
     - pull_request
     - push
 
----
-kind: pipeline
-name: acceptance-apps
-
-steps:
-- name: submodules
-  image: ghcr.io/nextcloud/continuous-integration-alpine-git:latest
-  commands:
-    - git submodule update --init
-- name: acceptance-apps
-  image: ghcr.io/nextcloud/continuous-integration-acceptance-php8.0:latest
-  commands:
-    - tests/acceptance/run-local.sh --timeout-multiplier 10 --nextcloud-server-domain acceptance-apps --selenium-server selenium:4444 allow-git-repository-modifications features/apps.feature
-
-services:
-- name: selenium
-  image: ghcr.io/nextcloud/continuous-integration-selenium:3.141.59
-  environment:
-    # Reduce default log level for Selenium server (INFO) as it is too
-    # verbose.
-    JAVA_OPTS: -Dselenium.LOGGER.level=WARNING
-
-trigger:
-  branch:
-    - master
-    - stable*
-  event:
-    - pull_request
-    - push
-
 ---
 kind: pipeline
 name: nodb-codecov
index 478512884f63a81a8ac8b80f85f35c660c08cfe9..7d1dd2a5b9c4b6c25e61662c77bf515682e143f9 100644 (file)
@@ -1,3 +1,25 @@
+/**
+ * @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>
+ *
+ * @author Ferdinand Thiessen <opensource@fthiessen.de>
+ *
+ * @license AGPL-3.0-or-later
+ *
+ * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
+ *
+ */
+
 import type { User } from '@nextcloud/cypress'
 import { getNextcloudUserMenu, getNextcloudUserMenuToggle } from '../../support/commonUtils'
 
diff --git a/cypress/e2e/settings/apps.cy.ts b/cypress/e2e/settings/apps.cy.ts
new file mode 100644 (file)
index 0000000..516ddd0
--- /dev/null
@@ -0,0 +1,151 @@
+/**
+ * @copyright Copyright (c) 2023 Ferdinand Thiessen <opensource@fthiessen.de>
+ *
+ * @author Ferdinand Thiessen <opensource@fthiessen.de>
+ *
+ * @license AGPL-3.0-or-later
+ *
+ * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
+ *
+ */
+
+import { User } from '@nextcloud/cypress'
+import { handlePasswordConfirmation } from './usersUtils'
+
+const admin = new User('admin', 'admin')
+
+describe('Settings: App management', { testIsolation: true }, () => {
+       beforeEach(() => {
+               // disable QA if already enabled
+               cy.runOccCommand('app:disable -n testing')
+               // enable notification if already disabled
+               cy.runOccCommand('app:enable -n updatenotification')
+
+               // I am logged in as the admin
+               cy.login(admin)
+               // I open the Apps management
+               cy.visit('/settings/apps')
+       })
+
+       it('Can enable an installed app', () => {
+               cy.get('#apps-list').should('be.visible')
+                       .contains('tr', 'QA testing')
+                       .should('exist')
+                       .find('.actions')
+                       // I enable the "QA testing" app
+                       .contains('button', 'Enable')
+                       .click({ force: true })
+
+               handlePasswordConfirmation(admin.password)
+
+               // Change to enabled apps view
+               cy.get('#app-category-enabled a').click({ force: true })
+               cy.url().should('match', /settings\/apps\/enabled$/)
+               // I see that the "QA testing" app has been enabled
+               cy.get('.apps-list-container').contains('tr', 'QA testing')
+       })
+
+       it('Can disable an installed app', () => {
+               cy.get('#apps-list').should('be.visible')
+                       .contains('tr', 'Update notification')
+                       .should('exist')
+                       .find('.actions')
+                       // I disable the "Update notification" app
+                       .contains('button', 'Disable')
+                       .click({ force: true })
+
+               handlePasswordConfirmation(admin.password)
+
+               // Change to disabled apps view
+               cy.get('#app-category-disabled a').click({ force: true })
+               cy.url().should('match', /settings\/apps\/disabled$/)
+               // I see that the "Update notification" app has been disabled
+               cy.get('.apps-list-container').contains('tr', 'Update notification')
+       })
+
+       it('Browse enabled apps', () => {
+               // When I open the "Active apps" section
+               cy.get('#app-category-enabled a')
+                       .should('contain', 'Active apps')
+                       .click({ force: true })
+               // Then I see that the current section is "Active apps"
+               cy.url().should('match', /settings\/apps\/enabled$/)
+               cy.get('#app-category-enabled').find('.active').should('exist')
+               // I see that there are only enabled apps
+               cy.get('#apps-list')
+                       .should('be.visible')
+                       .find('tr .actions')
+                       .each(($action) => {
+                               cy.wrap($action).should('not.contain', 'Enable')
+                       })
+       })
+
+       it('Browse disabled apps', () => {
+               // When I open the "Active apps" section
+               cy.get('#app-category-disabled a')
+                       .should('contain', 'Disabled apps')
+                       .click({ force: true })
+               // Then I see that the current section is "Active apps"
+               cy.url().should('match', /settings\/apps\/disabled$/)
+               cy.get('#app-category-disabled').find('.active').should('exist')
+               // I see that there are only disabled apps
+               cy.get('#apps-list')
+                       .should('be.visible')
+                       .find('tr .actions')
+                       .each(($action) => {
+                               cy.wrap($action).should('not.contain', 'Disable')
+                       })
+       })
+
+       it('Browse app bundles', () => {
+               // When I open the "App bundles" section
+               cy.get('#app-category-your-bundles a')
+                       .should('contain', 'App bundles')
+                       .click({ force: true })
+               // Then I see that the current section is "App bundles"
+               cy.url().should('match', /settings\/apps\/app-bundles$/)
+               cy.get('#app-category-your-bundles').find('.active').should('exist')
+               // I see the app bundles
+               cy.get('#apps-list').contains('tr', 'Enterprise bundle')
+               cy.get('#apps-list').contains('tr', 'Education Edition')
+               // I see that the "Enterprise bundle" is disabled
+               cy.get('#apps-list').contains('tr', 'Enterprise bundle').contains('button', 'Download and enable all')
+       })
+
+       it('View app details', () => {
+               // When I click on the "QA testing" app
+               cy.get('#apps-list').contains('tr', 'QA testing').click({ force: true })
+               // I see that the app details are shown
+               cy.get('#app-sidebar-vue')
+                       .should('be.visible')
+                       .find('.app-sidebar-header__info')
+                       .should('contain', 'QA testing')
+               cy.get('#app-sidebar-vue').contains('a', 'View in store').should('exist')
+               cy.get('#app-sidebar-vue').find('input[type="button"][value="Enable"]').should('be.visible')
+               cy.get('#app-sidebar-vue').find('input[type="button"][value="Remove"]').should('be.visible')
+               cy.get('#app-sidebar-vue .app-version').contains(/\d+\.\d+\.\d+/)
+       })
+
+       /*
+        * TODO: Improve testing with app store as external API
+        * The following scenarios require the files_antivirus and calendar app
+        * being present in the app store with support for the current server version
+        * Ideally we would have either a dummy app store endpoint with some test apps
+        * or even an app store instance running somewhere to properly test this.
+        * This is also a requirement to properly test updates of apps
+        */
+       // TODO: View app details for app store apps
+       // TODO: Install an app from the app store
+       // TODO: Show section from app store
+})
diff --git a/tests/acceptance/composer.json b/tests/acceptance/composer.json
deleted file mode 100644 (file)
index 142e791..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-  "config": {
-         "platform": {
-                 "php": "7.4"
-         }
-  },
-  "require-dev": {
-    "behat/behat": "3.11.*",
-    "behat/mink": "1.10.*",
-    "behat/mink-extension": "2.3.*",
-    "behat/mink-selenium2-driver": "1.6.*",
-    "phpunit/phpunit": "9.5.19"
-  },
-  "autoload": {
-    "psr-4": {
-      "": ["features/bootstrap", "features/core"]
-    }
-  }
-}
diff --git a/tests/acceptance/composer.lock b/tests/acceptance/composer.lock
deleted file mode 100644 (file)
index ef855cd..0000000
+++ /dev/null
@@ -1,4203 +0,0 @@
-{
-    "_readme": [
-        "This file locks the dependencies of your project to a known state",
-        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
-        "This file is @generated automatically"
-    ],
-    "content-hash": "ec049b32a215727464f8fa17889df43f",
-    "packages": [],
-    "packages-dev": [
-        {
-            "name": "behat/behat",
-            "version": "v3.11.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/Behat/Behat.git",
-                "reference": "a19c72c78eb0cdf7b7c4dabfeec9eb3a282728fc"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/Behat/Behat/zipball/a19c72c78eb0cdf7b7c4dabfeec9eb3a282728fc",
-                "reference": "a19c72c78eb0cdf7b7c4dabfeec9eb3a282728fc",
-                "shasum": ""
-            },
-            "require": {
-                "behat/gherkin": "^4.9.0",
-                "behat/transliterator": "^1.2",
-                "ext-mbstring": "*",
-                "php": "^7.2 || ^8.0",
-                "psr/container": "^1.0 || ^2.0",
-                "symfony/config": "^4.4 || ^5.0 || ^6.0",
-                "symfony/console": "^4.4 || ^5.0 || ^6.0",
-                "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0",
-                "symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0",
-                "symfony/translation": "^4.4 || ^5.0 || ^6.0",
-                "symfony/yaml": "^4.4 || ^5.0 || ^6.0"
-            },
-            "require-dev": {
-                "herrera-io/box": "~1.6.1",
-                "phpunit/phpunit": "^8.5 || ^9.0",
-                "symfony/process": "^4.4 || ^5.0 || ^6.0",
-                "vimeo/psalm": "^4.8"
-            },
-            "suggest": {
-                "ext-dom": "Needed to output test results in JUnit format."
-            },
-            "bin": [
-                "bin/behat"
-            ],
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "3.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Behat\\Hook\\": "src/Behat/Hook/",
-                    "Behat\\Step\\": "src/Behat/Step/",
-                    "Behat\\Behat\\": "src/Behat/Behat/",
-                    "Behat\\Testwork\\": "src/Behat/Testwork/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Konstantin Kudryashov",
-                    "email": "ever.zet@gmail.com",
-                    "homepage": "http://everzet.com"
-                }
-            ],
-            "description": "Scenario-oriented BDD framework for PHP",
-            "homepage": "http://behat.org/",
-            "keywords": [
-                "Agile",
-                "BDD",
-                "ScenarioBDD",
-                "Scrum",
-                "StoryBDD",
-                "User story",
-                "business",
-                "development",
-                "documentation",
-                "examples",
-                "symfony",
-                "testing"
-            ],
-            "support": {
-                "issues": "https://github.com/Behat/Behat/issues",
-                "source": "https://github.com/Behat/Behat/tree/v3.11.0"
-            },
-            "time": "2022-07-07T09:49:27+00:00"
-        },
-        {
-            "name": "behat/gherkin",
-            "version": "v4.9.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/Behat/Gherkin.git",
-                "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/Behat/Gherkin/zipball/0bc8d1e30e96183e4f36db9dc79caead300beff4",
-                "reference": "0bc8d1e30e96183e4f36db9dc79caead300beff4",
-                "shasum": ""
-            },
-            "require": {
-                "php": "~7.2|~8.0"
-            },
-            "require-dev": {
-                "cucumber/cucumber": "dev-gherkin-22.0.0",
-                "phpunit/phpunit": "~8|~9",
-                "symfony/yaml": "~3|~4|~5"
-            },
-            "suggest": {
-                "symfony/yaml": "If you want to parse features, represented in YAML files"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "4.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Behat\\Gherkin": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Konstantin Kudryashov",
-                    "email": "ever.zet@gmail.com",
-                    "homepage": "http://everzet.com"
-                }
-            ],
-            "description": "Gherkin DSL parser for PHP",
-            "homepage": "http://behat.org/",
-            "keywords": [
-                "BDD",
-                "Behat",
-                "Cucumber",
-                "DSL",
-                "gherkin",
-                "parser"
-            ],
-            "support": {
-                "issues": "https://github.com/Behat/Gherkin/issues",
-                "source": "https://github.com/Behat/Gherkin/tree/v4.9.0"
-            },
-            "time": "2021-10-12T13:05:09+00:00"
-        },
-        {
-            "name": "behat/mink",
-            "version": "v1.10.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/minkphp/Mink.git",
-                "reference": "19e58905632e7cfdc5b2bafb9b950a3521af32c5"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/minkphp/Mink/zipball/19e58905632e7cfdc5b2bafb9b950a3521af32c5",
-                "reference": "19e58905632e7cfdc5b2bafb9b950a3521af32c5",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2",
-                "symfony/css-selector": "^4.4 || ^5.0 || ^6.0"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^8.5.22 || ^9.5.11",
-                "symfony/error-handler": "^4.4 || ^5.0 || ^6.0",
-                "symfony/phpunit-bridge": "^5.4 || ^6.0"
-            },
-            "suggest": {
-                "behat/mink-browserkit-driver": "fast headless driver for any app without JS emulation",
-                "behat/mink-selenium2-driver": "slow, but JS-enabled driver for any app (requires Selenium2)",
-                "behat/mink-zombie-driver": "fast and JS-enabled headless driver for any app (requires node.js)",
-                "dmore/chrome-mink-driver": "fast and JS-enabled driver for any app (requires chromium or google chrome)"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Behat\\Mink\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Konstantin Kudryashov",
-                    "email": "ever.zet@gmail.com",
-                    "homepage": "http://everzet.com"
-                }
-            ],
-            "description": "Browser controller/emulator abstraction for PHP",
-            "homepage": "https://mink.behat.org/",
-            "keywords": [
-                "browser",
-                "testing",
-                "web"
-            ],
-            "support": {
-                "issues": "https://github.com/minkphp/Mink/issues",
-                "source": "https://github.com/minkphp/Mink/tree/v1.10.0"
-            },
-            "time": "2022-03-28T14:22:43+00:00"
-        },
-        {
-            "name": "behat/mink-extension",
-            "version": "2.3.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/Behat/MinkExtension.git",
-                "reference": "80f7849ba53867181b7e412df9210e12fba50177"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/Behat/MinkExtension/zipball/80f7849ba53867181b7e412df9210e12fba50177",
-                "reference": "80f7849ba53867181b7e412df9210e12fba50177",
-                "shasum": ""
-            },
-            "require": {
-                "behat/behat": "^3.0.5",
-                "behat/mink": "^1.5",
-                "php": ">=5.3.2",
-                "symfony/config": "^2.7|^3.0|^4.0"
-            },
-            "require-dev": {
-                "behat/mink-goutte-driver": "^1.1",
-                "phpspec/phpspec": "^2.0"
-            },
-            "type": "behat-extension",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.1.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "Behat\\MinkExtension": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Christophe Coevoet",
-                    "email": "stof@notk.org"
-                },
-                {
-                    "name": "Konstantin Kudryashov",
-                    "email": "ever.zet@gmail.com"
-                }
-            ],
-            "description": "Mink extension for Behat",
-            "homepage": "http://extensions.behat.org/mink",
-            "keywords": [
-                "browser",
-                "gui",
-                "test",
-                "web"
-            ],
-            "support": {
-                "issues": "https://github.com/Behat/MinkExtension/issues",
-                "source": "https://github.com/Behat/MinkExtension/tree/master"
-            },
-            "time": "2018-02-06T15:36:30+00:00"
-        },
-        {
-            "name": "behat/mink-selenium2-driver",
-            "version": "v1.6.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/minkphp/MinkSelenium2Driver.git",
-                "reference": "e5f8421654930da725499fb92983e6948c6f973e"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/minkphp/MinkSelenium2Driver/zipball/e5f8421654930da725499fb92983e6948c6f973e",
-                "reference": "e5f8421654930da725499fb92983e6948c6f973e",
-                "shasum": ""
-            },
-            "require": {
-                "behat/mink": "^1.9@dev",
-                "ext-json": "*",
-                "instaclick/php-webdriver": "^1.4",
-                "php": ">=7.2"
-            },
-            "require-dev": {
-                "mink/driver-testsuite": "dev-master",
-                "phpunit/phpunit": "^8.5.22 || ^9.5.11",
-                "symfony/error-handler": "^4.4 || ^5.0"
-            },
-            "type": "mink-driver",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Behat\\Mink\\Driver\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Pete Otaqui",
-                    "email": "pete@otaqui.com",
-                    "homepage": "https://github.com/pete-otaqui"
-                },
-                {
-                    "name": "Konstantin Kudryashov",
-                    "email": "ever.zet@gmail.com",
-                    "homepage": "http://everzet.com"
-                }
-            ],
-            "description": "Selenium2 (WebDriver) driver for Mink framework",
-            "homepage": "https://mink.behat.org/",
-            "keywords": [
-                "ajax",
-                "browser",
-                "javascript",
-                "selenium",
-                "testing",
-                "webdriver"
-            ],
-            "support": {
-                "issues": "https://github.com/minkphp/MinkSelenium2Driver/issues",
-                "source": "https://github.com/minkphp/MinkSelenium2Driver/tree/v1.6.0"
-            },
-            "time": "2022-03-28T14:55:17+00:00"
-        },
-        {
-            "name": "behat/transliterator",
-            "version": "v1.5.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/Behat/Transliterator.git",
-                "reference": "baac5873bac3749887d28ab68e2f74db3a4408af"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/Behat/Transliterator/zipball/baac5873bac3749887d28ab68e2f74db3a4408af",
-                "reference": "baac5873bac3749887d28ab68e2f74db3a4408af",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2"
-            },
-            "require-dev": {
-                "chuyskywalker/rolling-curl": "^3.1",
-                "php-yaoi/php-yaoi": "^1.0",
-                "phpunit/phpunit": "^8.5.25 || ^9.5.19"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Behat\\Transliterator\\": "src/Behat/Transliterator"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "Artistic-1.0"
-            ],
-            "description": "String transliterator",
-            "keywords": [
-                "i18n",
-                "slug",
-                "transliterator"
-            ],
-            "support": {
-                "issues": "https://github.com/Behat/Transliterator/issues",
-                "source": "https://github.com/Behat/Transliterator/tree/v1.5.0"
-            },
-            "time": "2022-03-30T09:27:43+00:00"
-        },
-        {
-            "name": "doctrine/instantiator",
-            "version": "1.4.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/doctrine/instantiator.git",
-                "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
-                "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
-                "shasum": ""
-            },
-            "require": {
-                "php": "^7.1 || ^8.0"
-            },
-            "require-dev": {
-                "doctrine/coding-standard": "^9",
-                "ext-pdo": "*",
-                "ext-phar": "*",
-                "phpbench/phpbench": "^0.16 || ^1",
-                "phpstan/phpstan": "^1.4",
-                "phpstan/phpstan-phpunit": "^1",
-                "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
-                "vimeo/psalm": "^4.22"
-            },
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Marco Pivetta",
-                    "email": "ocramius@gmail.com",
-                    "homepage": "https://ocramius.github.io/"
-                }
-            ],
-            "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
-            "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
-            "keywords": [
-                "constructor",
-                "instantiate"
-            ],
-            "support": {
-                "issues": "https://github.com/doctrine/instantiator/issues",
-                "source": "https://github.com/doctrine/instantiator/tree/1.4.1"
-            },
-            "funding": [
-                {
-                    "url": "https://www.doctrine-project.org/sponsorship.html",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://www.patreon.com/phpdoctrine",
-                    "type": "patreon"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-03-03T08:28:38+00:00"
-        },
-        {
-            "name": "instaclick/php-webdriver",
-            "version": "1.4.15",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/instaclick/php-webdriver.git",
-                "reference": "ed8f7741a0952db42686aae0780a0935138a7cf8"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/instaclick/php-webdriver/zipball/ed8f7741a0952db42686aae0780a0935138a7cf8",
-                "reference": "ed8f7741a0952db42686aae0780a0935138a7cf8",
-                "shasum": ""
-            },
-            "require": {
-                "ext-curl": "*",
-                "php": ">=5.3.2"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^8.5 || ^9.5",
-                "satooshi/php-coveralls": "^1.0 || ^2.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.4.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-0": {
-                    "WebDriver": "lib/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "Apache-2.0"
-            ],
-            "authors": [
-                {
-                    "name": "Justin Bishop",
-                    "email": "jubishop@gmail.com",
-                    "role": "Developer"
-                },
-                {
-                    "name": "Anthon Pang",
-                    "email": "apang@softwaredevelopment.ca",
-                    "role": "Fork Maintainer"
-                }
-            ],
-            "description": "PHP WebDriver for Selenium 2",
-            "homepage": "http://instaclick.com/",
-            "keywords": [
-                "browser",
-                "selenium",
-                "webdriver",
-                "webtest"
-            ],
-            "support": {
-                "issues": "https://github.com/instaclick/php-webdriver/issues",
-                "source": "https://github.com/instaclick/php-webdriver/tree/1.4.15"
-            },
-            "time": "2022-08-09T14:26:29+00:00"
-        },
-        {
-            "name": "myclabs/deep-copy",
-            "version": "1.11.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/myclabs/DeepCopy.git",
-                "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
-                "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
-                "shasum": ""
-            },
-            "require": {
-                "php": "^7.1 || ^8.0"
-            },
-            "conflict": {
-                "doctrine/collections": "<1.6.8",
-                "doctrine/common": "<2.13.3 || >=3,<3.2.2"
-            },
-            "require-dev": {
-                "doctrine/collections": "^1.6.8",
-                "doctrine/common": "^2.13.3 || ^3.2.2",
-                "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
-            },
-            "type": "library",
-            "autoload": {
-                "files": [
-                    "src/DeepCopy/deep_copy.php"
-                ],
-                "psr-4": {
-                    "DeepCopy\\": "src/DeepCopy/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "description": "Create deep copies (clones) of your objects",
-            "keywords": [
-                "clone",
-                "copy",
-                "duplicate",
-                "object",
-                "object graph"
-            ],
-            "support": {
-                "issues": "https://github.com/myclabs/DeepCopy/issues",
-                "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
-            },
-            "funding": [
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-03-03T13:19:32+00:00"
-        },
-        {
-            "name": "nikic/php-parser",
-            "version": "v4.15.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/nikic/PHP-Parser.git",
-                "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
-                "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900",
-                "shasum": ""
-            },
-            "require": {
-                "ext-tokenizer": "*",
-                "php": ">=7.0"
-            },
-            "require-dev": {
-                "ircmaxell/php-yacc": "^0.0.7",
-                "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
-            },
-            "bin": [
-                "bin/php-parse"
-            ],
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "4.9-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "PhpParser\\": "lib/PhpParser"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Nikita Popov"
-                }
-            ],
-            "description": "A PHP parser written in PHP",
-            "keywords": [
-                "parser",
-                "php"
-            ],
-            "support": {
-                "issues": "https://github.com/nikic/PHP-Parser/issues",
-                "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1"
-            },
-            "time": "2022-09-04T07:30:47+00:00"
-        },
-        {
-            "name": "phar-io/manifest",
-            "version": "2.0.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/phar-io/manifest.git",
-                "reference": "97803eca37d319dfa7826cc2437fc020857acb53"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53",
-                "reference": "97803eca37d319dfa7826cc2437fc020857acb53",
-                "shasum": ""
-            },
-            "require": {
-                "ext-dom": "*",
-                "ext-phar": "*",
-                "ext-xmlwriter": "*",
-                "phar-io/version": "^3.0.1",
-                "php": "^7.2 || ^8.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.0.x-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Arne Blankerts",
-                    "email": "arne@blankerts.de",
-                    "role": "Developer"
-                },
-                {
-                    "name": "Sebastian Heuer",
-                    "email": "sebastian@phpeople.de",
-                    "role": "Developer"
-                },
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "Developer"
-                }
-            ],
-            "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
-            "support": {
-                "issues": "https://github.com/phar-io/manifest/issues",
-                "source": "https://github.com/phar-io/manifest/tree/2.0.3"
-            },
-            "time": "2021-07-20T11:28:43+00:00"
-        },
-        {
-            "name": "phar-io/version",
-            "version": "3.2.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/phar-io/version.git",
-                "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
-                "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74",
-                "shasum": ""
-            },
-            "require": {
-                "php": "^7.2 || ^8.0"
-            },
-            "type": "library",
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Arne Blankerts",
-                    "email": "arne@blankerts.de",
-                    "role": "Developer"
-                },
-                {
-                    "name": "Sebastian Heuer",
-                    "email": "sebastian@phpeople.de",
-                    "role": "Developer"
-                },
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "Developer"
-                }
-            ],
-            "description": "Library for handling version information and constraints",
-            "support": {
-                "issues": "https://github.com/phar-io/version/issues",
-                "source": "https://github.com/phar-io/version/tree/3.2.1"
-            },
-            "time": "2022-02-21T01:04:05+00:00"
-        },
-        {
-            "name": "phpdocumentor/reflection-common",
-            "version": "2.2.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
-                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
-                "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
-                "shasum": ""
-            },
-            "require": {
-                "php": "^7.2 || ^8.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-2.x": "2.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "phpDocumentor\\Reflection\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Jaap van Otterdijk",
-                    "email": "opensource@ijaap.nl"
-                }
-            ],
-            "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
-            "homepage": "http://www.phpdoc.org",
-            "keywords": [
-                "FQSEN",
-                "phpDocumentor",
-                "phpdoc",
-                "reflection",
-                "static analysis"
-            ],
-            "support": {
-                "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
-                "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
-            },
-            "time": "2020-06-27T09:03:43+00:00"
-        },
-        {
-            "name": "phpdocumentor/reflection-docblock",
-            "version": "5.3.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
-                "reference": "622548b623e81ca6d78b721c5e029f4ce664f170"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170",
-                "reference": "622548b623e81ca6d78b721c5e029f4ce664f170",
-                "shasum": ""
-            },
-            "require": {
-                "ext-filter": "*",
-                "php": "^7.2 || ^8.0",
-                "phpdocumentor/reflection-common": "^2.2",
-                "phpdocumentor/type-resolver": "^1.3",
-                "webmozart/assert": "^1.9.1"
-            },
-            "require-dev": {
-                "mockery/mockery": "~1.3.2",
-                "psalm/phar": "^4.8"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "5.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "phpDocumentor\\Reflection\\": "src"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Mike van Riel",
-                    "email": "me@mikevanriel.com"
-                },
-                {
-                    "name": "Jaap van Otterdijk",
-                    "email": "account@ijaap.nl"
-                }
-            ],
-            "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
-            "support": {
-                "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
-                "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0"
-            },
-            "time": "2021-10-19T17:43:47+00:00"
-        },
-        {
-            "name": "phpdocumentor/type-resolver",
-            "version": "1.6.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/phpDocumentor/TypeResolver.git",
-                "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d",
-                "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d",
-                "shasum": ""
-            },
-            "require": {
-                "php": "^7.4 || ^8.0",
-                "phpdocumentor/reflection-common": "^2.0"
-            },
-            "require-dev": {
-                "ext-tokenizer": "*",
-                "phpstan/extension-installer": "^1.1",
-                "phpstan/phpstan": "^1.8",
-                "phpstan/phpstan-phpunit": "^1.1",
-                "phpunit/phpunit": "^9.5",
-                "rector/rector": "^0.13.9",
-                "vimeo/psalm": "^4.25"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-1.x": "1.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "phpDocumentor\\Reflection\\": "src"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Mike van Riel",
-                    "email": "me@mikevanriel.com"
-                }
-            ],
-            "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
-            "support": {
-                "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
-                "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2"
-            },
-            "time": "2022-10-14T12:47:21+00:00"
-        },
-        {
-            "name": "phpspec/prophecy",
-            "version": "v1.15.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/phpspec/prophecy.git",
-                "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
-                "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13",
-                "shasum": ""
-            },
-            "require": {
-                "doctrine/instantiator": "^1.2",
-                "php": "^7.2 || ~8.0, <8.2",
-                "phpdocumentor/reflection-docblock": "^5.2",
-                "sebastian/comparator": "^3.0 || ^4.0",
-                "sebastian/recursion-context": "^3.0 || ^4.0"
-            },
-            "require-dev": {
-                "phpspec/phpspec": "^6.0 || ^7.0",
-                "phpunit/phpunit": "^8.0 || ^9.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Prophecy\\": "src/Prophecy"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Konstantin Kudryashov",
-                    "email": "ever.zet@gmail.com",
-                    "homepage": "http://everzet.com"
-                },
-                {
-                    "name": "Marcello Duarte",
-                    "email": "marcello.duarte@gmail.com"
-                }
-            ],
-            "description": "Highly opinionated mocking framework for PHP 5.3+",
-            "homepage": "https://github.com/phpspec/prophecy",
-            "keywords": [
-                "Double",
-                "Dummy",
-                "fake",
-                "mock",
-                "spy",
-                "stub"
-            ],
-            "support": {
-                "issues": "https://github.com/phpspec/prophecy/issues",
-                "source": "https://github.com/phpspec/prophecy/tree/v1.15.0"
-            },
-            "time": "2021-12-08T12:19:24+00:00"
-        },
-        {
-            "name": "phpunit/php-code-coverage",
-            "version": "9.2.17",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8",
-                "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8",
-                "shasum": ""
-            },
-            "require": {
-                "ext-dom": "*",
-                "ext-libxml": "*",
-                "ext-xmlwriter": "*",
-                "nikic/php-parser": "^4.14",
-                "php": ">=7.3",
-                "phpunit/php-file-iterator": "^3.0.3",
-                "phpunit/php-text-template": "^2.0.2",
-                "sebastian/code-unit-reverse-lookup": "^2.0.2",
-                "sebastian/complexity": "^2.0",
-                "sebastian/environment": "^5.1.2",
-                "sebastian/lines-of-code": "^1.0.3",
-                "sebastian/version": "^3.0.1",
-                "theseer/tokenizer": "^1.2.0"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "suggest": {
-                "ext-pcov": "*",
-                "ext-xdebug": "*"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "9.2-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
-            "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
-            "keywords": [
-                "coverage",
-                "testing",
-                "xunit"
-            ],
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
-                "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2022-08-30T12:24:04+00:00"
-        },
-        {
-            "name": "phpunit/php-file-iterator",
-            "version": "3.0.6",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
-                "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
-                "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "3.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "FilterIterator implementation that filters files based on a list of suffixes.",
-            "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
-            "keywords": [
-                "filesystem",
-                "iterator"
-            ],
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
-                "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2021-12-02T12:48:52+00:00"
-        },
-        {
-            "name": "phpunit/php-invoker",
-            "version": "3.1.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/php-invoker.git",
-                "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
-                "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "ext-pcntl": "*",
-                "phpunit/phpunit": "^9.3"
-            },
-            "suggest": {
-                "ext-pcntl": "*"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "3.1-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Invoke callables with a timeout",
-            "homepage": "https://github.com/sebastianbergmann/php-invoker/",
-            "keywords": [
-                "process"
-            ],
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/php-invoker/issues",
-                "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-09-28T05:58:55+00:00"
-        },
-        {
-            "name": "phpunit/php-text-template",
-            "version": "2.0.4",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/php-text-template.git",
-                "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
-                "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Simple template engine.",
-            "homepage": "https://github.com/sebastianbergmann/php-text-template/",
-            "keywords": [
-                "template"
-            ],
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/php-text-template/issues",
-                "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-10-26T05:33:50+00:00"
-        },
-        {
-            "name": "phpunit/php-timer",
-            "version": "5.0.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/php-timer.git",
-                "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
-                "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "5.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Utility class for timing",
-            "homepage": "https://github.com/sebastianbergmann/php-timer/",
-            "keywords": [
-                "timer"
-            ],
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/php-timer/issues",
-                "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-10-26T13:16:10+00:00"
-        },
-        {
-            "name": "phpunit/phpunit",
-            "version": "9.5.19",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/35ea4b7f3acabb26f4bb640f8c30866c401da807",
-                "reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807",
-                "shasum": ""
-            },
-            "require": {
-                "doctrine/instantiator": "^1.3.1",
-                "ext-dom": "*",
-                "ext-json": "*",
-                "ext-libxml": "*",
-                "ext-mbstring": "*",
-                "ext-xml": "*",
-                "ext-xmlwriter": "*",
-                "myclabs/deep-copy": "^1.10.1",
-                "phar-io/manifest": "^2.0.3",
-                "phar-io/version": "^3.0.2",
-                "php": ">=7.3",
-                "phpspec/prophecy": "^1.12.1",
-                "phpunit/php-code-coverage": "^9.2.13",
-                "phpunit/php-file-iterator": "^3.0.5",
-                "phpunit/php-invoker": "^3.1.1",
-                "phpunit/php-text-template": "^2.0.3",
-                "phpunit/php-timer": "^5.0.2",
-                "sebastian/cli-parser": "^1.0.1",
-                "sebastian/code-unit": "^1.0.6",
-                "sebastian/comparator": "^4.0.5",
-                "sebastian/diff": "^4.0.3",
-                "sebastian/environment": "^5.1.3",
-                "sebastian/exporter": "^4.0.3",
-                "sebastian/global-state": "^5.0.1",
-                "sebastian/object-enumerator": "^4.0.3",
-                "sebastian/resource-operations": "^3.0.3",
-                "sebastian/type": "^3.0",
-                "sebastian/version": "^3.0.2"
-            },
-            "require-dev": {
-                "ext-pdo": "*",
-                "phpspec/prophecy-phpunit": "^2.0.1"
-            },
-            "suggest": {
-                "ext-soap": "*",
-                "ext-xdebug": "*"
-            },
-            "bin": [
-                "phpunit"
-            ],
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "9.5-dev"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "src/Framework/Assert/Functions.php"
-                ],
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "The PHP Unit Testing framework.",
-            "homepage": "https://phpunit.de/",
-            "keywords": [
-                "phpunit",
-                "testing",
-                "xunit"
-            ],
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/phpunit/issues",
-                "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.19"
-            },
-            "funding": [
-                {
-                    "url": "https://phpunit.de/sponsors.html",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2022-03-15T09:57:31+00:00"
-        },
-        {
-            "name": "psr/container",
-            "version": "1.1.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/php-fig/container.git",
-                "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
-                "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.4.0"
-            },
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Psr\\Container\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "PHP-FIG",
-                    "homepage": "https://www.php-fig.org/"
-                }
-            ],
-            "description": "Common Container Interface (PHP FIG PSR-11)",
-            "homepage": "https://github.com/php-fig/container",
-            "keywords": [
-                "PSR-11",
-                "container",
-                "container-interface",
-                "container-interop",
-                "psr"
-            ],
-            "support": {
-                "issues": "https://github.com/php-fig/container/issues",
-                "source": "https://github.com/php-fig/container/tree/1.1.2"
-            },
-            "time": "2021-11-05T16:50:12+00:00"
-        },
-        {
-            "name": "psr/event-dispatcher",
-            "version": "1.0.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/php-fig/event-dispatcher.git",
-                "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0",
-                "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.0.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Psr\\EventDispatcher\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "PHP-FIG",
-                    "homepage": "http://www.php-fig.org/"
-                }
-            ],
-            "description": "Standard interfaces for event handling.",
-            "keywords": [
-                "events",
-                "psr",
-                "psr-14"
-            ],
-            "support": {
-                "issues": "https://github.com/php-fig/event-dispatcher/issues",
-                "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0"
-            },
-            "time": "2019-01-08T18:20:26+00:00"
-        },
-        {
-            "name": "sebastian/cli-parser",
-            "version": "1.0.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/cli-parser.git",
-                "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
-                "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Library for parsing CLI options",
-            "homepage": "https://github.com/sebastianbergmann/cli-parser",
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/cli-parser/issues",
-                "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-09-28T06:08:49+00:00"
-        },
-        {
-            "name": "sebastian/code-unit",
-            "version": "1.0.8",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/code-unit.git",
-                "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
-                "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Collection of value objects that represent the PHP code units",
-            "homepage": "https://github.com/sebastianbergmann/code-unit",
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/code-unit/issues",
-                "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-10-26T13:08:54+00:00"
-        },
-        {
-            "name": "sebastian/code-unit-reverse-lookup",
-            "version": "2.0.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
-                "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
-                "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de"
-                }
-            ],
-            "description": "Looks up which function or method a line of code belongs to",
-            "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
-                "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-09-28T05:30:19+00:00"
-        },
-        {
-            "name": "sebastian/comparator",
-            "version": "4.0.8",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/comparator.git",
-                "reference": "fa0f136dd2334583309d32b62544682ee972b51a"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
-                "reference": "fa0f136dd2334583309d32b62544682ee972b51a",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3",
-                "sebastian/diff": "^4.0",
-                "sebastian/exporter": "^4.0"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "4.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de"
-                },
-                {
-                    "name": "Jeff Welch",
-                    "email": "whatthejeff@gmail.com"
-                },
-                {
-                    "name": "Volker Dusch",
-                    "email": "github@wallbash.com"
-                },
-                {
-                    "name": "Bernhard Schussek",
-                    "email": "bschussek@2bepublished.at"
-                }
-            ],
-            "description": "Provides the functionality to compare PHP values for equality",
-            "homepage": "https://github.com/sebastianbergmann/comparator",
-            "keywords": [
-                "comparator",
-                "compare",
-                "equality"
-            ],
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/comparator/issues",
-                "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2022-09-14T12:41:17+00:00"
-        },
-        {
-            "name": "sebastian/complexity",
-            "version": "2.0.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/complexity.git",
-                "reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
-                "reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
-                "shasum": ""
-            },
-            "require": {
-                "nikic/php-parser": "^4.7",
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Library for calculating the complexity of PHP code units",
-            "homepage": "https://github.com/sebastianbergmann/complexity",
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/complexity/issues",
-                "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-10-26T15:52:27+00:00"
-        },
-        {
-            "name": "sebastian/diff",
-            "version": "4.0.4",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/diff.git",
-                "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d",
-                "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3",
-                "symfony/process": "^4.2 || ^5"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "4.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de"
-                },
-                {
-                    "name": "Kore Nordmann",
-                    "email": "mail@kore-nordmann.de"
-                }
-            ],
-            "description": "Diff implementation",
-            "homepage": "https://github.com/sebastianbergmann/diff",
-            "keywords": [
-                "diff",
-                "udiff",
-                "unidiff",
-                "unified diff"
-            ],
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/diff/issues",
-                "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-10-26T13:10:38+00:00"
-        },
-        {
-            "name": "sebastian/environment",
-            "version": "5.1.4",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/environment.git",
-                "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7",
-                "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "suggest": {
-                "ext-posix": "*"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "5.1-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de"
-                }
-            ],
-            "description": "Provides functionality to handle HHVM/PHP environments",
-            "homepage": "http://www.github.com/sebastianbergmann/environment",
-            "keywords": [
-                "Xdebug",
-                "environment",
-                "hhvm"
-            ],
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/environment/issues",
-                "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2022-04-03T09:37:03+00:00"
-        },
-        {
-            "name": "sebastian/exporter",
-            "version": "4.0.5",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/exporter.git",
-                "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
-                "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3",
-                "sebastian/recursion-context": "^4.0"
-            },
-            "require-dev": {
-                "ext-mbstring": "*",
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "4.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de"
-                },
-                {
-                    "name": "Jeff Welch",
-                    "email": "whatthejeff@gmail.com"
-                },
-                {
-                    "name": "Volker Dusch",
-                    "email": "github@wallbash.com"
-                },
-                {
-                    "name": "Adam Harvey",
-                    "email": "aharvey@php.net"
-                },
-                {
-                    "name": "Bernhard Schussek",
-                    "email": "bschussek@gmail.com"
-                }
-            ],
-            "description": "Provides the functionality to export PHP variables for visualization",
-            "homepage": "https://www.github.com/sebastianbergmann/exporter",
-            "keywords": [
-                "export",
-                "exporter"
-            ],
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/exporter/issues",
-                "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2022-09-14T06:03:37+00:00"
-        },
-        {
-            "name": "sebastian/global-state",
-            "version": "5.0.5",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/global-state.git",
-                "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2",
-                "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3",
-                "sebastian/object-reflector": "^2.0",
-                "sebastian/recursion-context": "^4.0"
-            },
-            "require-dev": {
-                "ext-dom": "*",
-                "phpunit/phpunit": "^9.3"
-            },
-            "suggest": {
-                "ext-uopz": "*"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "5.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de"
-                }
-            ],
-            "description": "Snapshotting of global state",
-            "homepage": "http://www.github.com/sebastianbergmann/global-state",
-            "keywords": [
-                "global state"
-            ],
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/global-state/issues",
-                "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2022-02-14T08:28:10+00:00"
-        },
-        {
-            "name": "sebastian/lines-of-code",
-            "version": "1.0.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/lines-of-code.git",
-                "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
-                "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
-                "shasum": ""
-            },
-            "require": {
-                "nikic/php-parser": "^4.6",
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Library for counting the lines of code in PHP source code",
-            "homepage": "https://github.com/sebastianbergmann/lines-of-code",
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
-                "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-11-28T06:42:11+00:00"
-        },
-        {
-            "name": "sebastian/object-enumerator",
-            "version": "4.0.4",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/object-enumerator.git",
-                "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
-                "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3",
-                "sebastian/object-reflector": "^2.0",
-                "sebastian/recursion-context": "^4.0"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "4.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de"
-                }
-            ],
-            "description": "Traverses array structures and object graphs to enumerate all referenced objects",
-            "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
-                "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-10-26T13:12:34+00:00"
-        },
-        {
-            "name": "sebastian/object-reflector",
-            "version": "2.0.4",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/object-reflector.git",
-                "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
-                "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de"
-                }
-            ],
-            "description": "Allows reflection of object attributes, including inherited and non-public ones",
-            "homepage": "https://github.com/sebastianbergmann/object-reflector/",
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/object-reflector/issues",
-                "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-10-26T13:14:26+00:00"
-        },
-        {
-            "name": "sebastian/recursion-context",
-            "version": "4.0.4",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/recursion-context.git",
-                "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172",
-                "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "4.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de"
-                },
-                {
-                    "name": "Jeff Welch",
-                    "email": "whatthejeff@gmail.com"
-                },
-                {
-                    "name": "Adam Harvey",
-                    "email": "aharvey@php.net"
-                }
-            ],
-            "description": "Provides functionality to recursively process PHP variables",
-            "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
-                "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-10-26T13:17:30+00:00"
-        },
-        {
-            "name": "sebastian/resource-operations",
-            "version": "3.0.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/resource-operations.git",
-                "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
-                "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "3.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de"
-                }
-            ],
-            "description": "Provides a list of PHP built-in functions that operate on resources",
-            "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/resource-operations/issues",
-                "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-09-28T06:45:17+00:00"
-        },
-        {
-            "name": "sebastian/type",
-            "version": "3.2.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/type.git",
-                "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
-                "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^9.5"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "3.2-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Collection of value objects that represent the types of the PHP type system",
-            "homepage": "https://github.com/sebastianbergmann/type",
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/type/issues",
-                "source": "https://github.com/sebastianbergmann/type/tree/3.2.0"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2022-09-12T14:47:03+00:00"
-        },
-        {
-            "name": "sebastian/version",
-            "version": "3.0.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/sebastianbergmann/version.git",
-                "reference": "c6c1022351a901512170118436c764e473f6de8c"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
-                "reference": "c6c1022351a901512170118436c764e473f6de8c",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.3"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "3.0-dev"
-                }
-            },
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Sebastian Bergmann",
-                    "email": "sebastian@phpunit.de",
-                    "role": "lead"
-                }
-            ],
-            "description": "Library that helps with managing the version number of Git-hosted PHP projects",
-            "homepage": "https://github.com/sebastianbergmann/version",
-            "support": {
-                "issues": "https://github.com/sebastianbergmann/version/issues",
-                "source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/sebastianbergmann",
-                    "type": "github"
-                }
-            ],
-            "time": "2020-09-28T06:39:44+00:00"
-        },
-        {
-            "name": "symfony/config",
-            "version": "v4.4.44",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/config.git",
-                "reference": "ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/config/zipball/ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658",
-                "reference": "ed42f8f9da528d2c6cae36fe1f380b0c1d8f0658",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1.3",
-                "symfony/filesystem": "^3.4|^4.0|^5.0",
-                "symfony/polyfill-ctype": "~1.8",
-                "symfony/polyfill-php80": "^1.16",
-                "symfony/polyfill-php81": "^1.22"
-            },
-            "conflict": {
-                "symfony/finder": "<3.4"
-            },
-            "require-dev": {
-                "symfony/event-dispatcher": "^3.4|^4.0|^5.0",
-                "symfony/finder": "^3.4|^4.0|^5.0",
-                "symfony/messenger": "^4.1|^5.0",
-                "symfony/service-contracts": "^1.1|^2",
-                "symfony/yaml": "^3.4|^4.0|^5.0"
-            },
-            "suggest": {
-                "symfony/yaml": "To use the yaml reference dumper"
-            },
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Component\\Config\\": ""
-                },
-                "exclude-from-classmap": [
-                    "/Tests/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
-            "homepage": "https://symfony.com",
-            "support": {
-                "source": "https://github.com/symfony/config/tree/v4.4.44"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-07-20T09:59:04+00:00"
-        },
-        {
-            "name": "symfony/console",
-            "version": "v5.4.14",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/console.git",
-                "reference": "984ea2c0f45f42dfed01d2f3987b187467c4b16d"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/console/zipball/984ea2c0f45f42dfed01d2f3987b187467c4b16d",
-                "reference": "984ea2c0f45f42dfed01d2f3987b187467c4b16d",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2.5",
-                "symfony/deprecation-contracts": "^2.1|^3",
-                "symfony/polyfill-mbstring": "~1.0",
-                "symfony/polyfill-php73": "^1.9",
-                "symfony/polyfill-php80": "^1.16",
-                "symfony/service-contracts": "^1.1|^2|^3",
-                "symfony/string": "^5.1|^6.0"
-            },
-            "conflict": {
-                "psr/log": ">=3",
-                "symfony/dependency-injection": "<4.4",
-                "symfony/dotenv": "<5.1",
-                "symfony/event-dispatcher": "<4.4",
-                "symfony/lock": "<4.4",
-                "symfony/process": "<4.4"
-            },
-            "provide": {
-                "psr/log-implementation": "1.0|2.0"
-            },
-            "require-dev": {
-                "psr/log": "^1|^2",
-                "symfony/config": "^4.4|^5.0|^6.0",
-                "symfony/dependency-injection": "^4.4|^5.0|^6.0",
-                "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
-                "symfony/lock": "^4.4|^5.0|^6.0",
-                "symfony/process": "^4.4|^5.0|^6.0",
-                "symfony/var-dumper": "^4.4|^5.0|^6.0"
-            },
-            "suggest": {
-                "psr/log": "For using the console logger",
-                "symfony/event-dispatcher": "",
-                "symfony/lock": "",
-                "symfony/process": ""
-            },
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Component\\Console\\": ""
-                },
-                "exclude-from-classmap": [
-                    "/Tests/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Eases the creation of beautiful and testable command line interfaces",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "cli",
-                "command line",
-                "console",
-                "terminal"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/console/tree/v5.4.14"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-10-07T08:01:20+00:00"
-        },
-        {
-            "name": "symfony/css-selector",
-            "version": "v5.4.11",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/css-selector.git",
-                "reference": "c1681789f059ab756001052164726ae88512ae3d"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/css-selector/zipball/c1681789f059ab756001052164726ae88512ae3d",
-                "reference": "c1681789f059ab756001052164726ae88512ae3d",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2.5",
-                "symfony/polyfill-php80": "^1.16"
-            },
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Component\\CssSelector\\": ""
-                },
-                "exclude-from-classmap": [
-                    "/Tests/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Jean-François Simon",
-                    "email": "jeanfrancois.simon@sensiolabs.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Converts CSS selectors to XPath expressions",
-            "homepage": "https://symfony.com",
-            "support": {
-                "source": "https://github.com/symfony/css-selector/tree/v5.4.11"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-06-27T16:58:25+00:00"
-        },
-        {
-            "name": "symfony/dependency-injection",
-            "version": "v4.4.44",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/dependency-injection.git",
-                "reference": "25502a57182ba1e15da0afd64c975cae4d0a1471"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/25502a57182ba1e15da0afd64c975cae4d0a1471",
-                "reference": "25502a57182ba1e15da0afd64c975cae4d0a1471",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1.3",
-                "psr/container": "^1.0",
-                "symfony/polyfill-php80": "^1.16",
-                "symfony/service-contracts": "^1.1.6|^2"
-            },
-            "conflict": {
-                "symfony/config": "<4.3|>=5.0",
-                "symfony/finder": "<3.4",
-                "symfony/proxy-manager-bridge": "<3.4",
-                "symfony/yaml": "<4.4.26"
-            },
-            "provide": {
-                "psr/container-implementation": "1.0",
-                "symfony/service-implementation": "1.0|2.0"
-            },
-            "require-dev": {
-                "symfony/config": "^4.3",
-                "symfony/expression-language": "^3.4|^4.0|^5.0",
-                "symfony/yaml": "^4.4.26|^5.0"
-            },
-            "suggest": {
-                "symfony/config": "",
-                "symfony/expression-language": "For using expressions in service container configuration",
-                "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required",
-                "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
-                "symfony/yaml": ""
-            },
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Component\\DependencyInjection\\": ""
-                },
-                "exclude-from-classmap": [
-                    "/Tests/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Allows you to standardize and centralize the way objects are constructed in your application",
-            "homepage": "https://symfony.com",
-            "support": {
-                "source": "https://github.com/symfony/dependency-injection/tree/v4.4.44"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-07-20T09:59:04+00:00"
-        },
-        {
-            "name": "symfony/deprecation-contracts",
-            "version": "v2.5.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/deprecation-contracts.git",
-                "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
-                "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "2.5-dev"
-                },
-                "thanks": {
-                    "name": "symfony/contracts",
-                    "url": "https://github.com/symfony/contracts"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "function.php"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "A generic function and convention to trigger deprecation notices",
-            "homepage": "https://symfony.com",
-            "support": {
-                "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-01-02T09:53:40+00:00"
-        },
-        {
-            "name": "symfony/event-dispatcher",
-            "version": "v5.4.9",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/event-dispatcher.git",
-                "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc",
-                "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2.5",
-                "symfony/deprecation-contracts": "^2.1|^3",
-                "symfony/event-dispatcher-contracts": "^2|^3",
-                "symfony/polyfill-php80": "^1.16"
-            },
-            "conflict": {
-                "symfony/dependency-injection": "<4.4"
-            },
-            "provide": {
-                "psr/event-dispatcher-implementation": "1.0",
-                "symfony/event-dispatcher-implementation": "2.0"
-            },
-            "require-dev": {
-                "psr/log": "^1|^2|^3",
-                "symfony/config": "^4.4|^5.0|^6.0",
-                "symfony/dependency-injection": "^4.4|^5.0|^6.0",
-                "symfony/error-handler": "^4.4|^5.0|^6.0",
-                "symfony/expression-language": "^4.4|^5.0|^6.0",
-                "symfony/http-foundation": "^4.4|^5.0|^6.0",
-                "symfony/service-contracts": "^1.1|^2|^3",
-                "symfony/stopwatch": "^4.4|^5.0|^6.0"
-            },
-            "suggest": {
-                "symfony/dependency-injection": "",
-                "symfony/http-kernel": ""
-            },
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Component\\EventDispatcher\\": ""
-                },
-                "exclude-from-classmap": [
-                    "/Tests/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
-            "homepage": "https://symfony.com",
-            "support": {
-                "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.9"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-05-05T16:45:39+00:00"
-        },
-        {
-            "name": "symfony/event-dispatcher-contracts",
-            "version": "v2.5.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/event-dispatcher-contracts.git",
-                "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1",
-                "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2.5",
-                "psr/event-dispatcher": "^1"
-            },
-            "suggest": {
-                "symfony/event-dispatcher-implementation": ""
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "2.5-dev"
-                },
-                "thanks": {
-                    "name": "symfony/contracts",
-                    "url": "https://github.com/symfony/contracts"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Contracts\\EventDispatcher\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Generic abstractions related to dispatching event",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "abstractions",
-                "contracts",
-                "decoupling",
-                "interfaces",
-                "interoperability",
-                "standards"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-01-02T09:53:40+00:00"
-        },
-        {
-            "name": "symfony/filesystem",
-            "version": "v5.4.13",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/filesystem.git",
-                "reference": "ac09569844a9109a5966b9438fc29113ce77cf51"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/filesystem/zipball/ac09569844a9109a5966b9438fc29113ce77cf51",
-                "reference": "ac09569844a9109a5966b9438fc29113ce77cf51",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2.5",
-                "symfony/polyfill-ctype": "~1.8",
-                "symfony/polyfill-mbstring": "~1.8",
-                "symfony/polyfill-php80": "^1.16"
-            },
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Component\\Filesystem\\": ""
-                },
-                "exclude-from-classmap": [
-                    "/Tests/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Provides basic utilities for the filesystem",
-            "homepage": "https://symfony.com",
-            "support": {
-                "source": "https://github.com/symfony/filesystem/tree/v5.4.13"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-09-21T19:53:16+00:00"
-        },
-        {
-            "name": "symfony/polyfill-ctype",
-            "version": "v1.26.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-ctype.git",
-                "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
-                "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1"
-            },
-            "provide": {
-                "ext-ctype": "*"
-            },
-            "suggest": {
-                "ext-ctype": "For best performance"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "1.26-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "bootstrap.php"
-                ],
-                "psr-4": {
-                    "Symfony\\Polyfill\\Ctype\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Gert de Pagter",
-                    "email": "BackEndTea@gmail.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill for ctype functions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "ctype",
-                "polyfill",
-                "portable"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-05-24T11:49:31+00:00"
-        },
-        {
-            "name": "symfony/polyfill-intl-grapheme",
-            "version": "v1.26.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
-                "reference": "433d05519ce6990bf3530fba6957499d327395c2"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2",
-                "reference": "433d05519ce6990bf3530fba6957499d327395c2",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1"
-            },
-            "suggest": {
-                "ext-intl": "For best performance"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "1.26-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "bootstrap.php"
-                ],
-                "psr-4": {
-                    "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill for intl's grapheme_* functions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "grapheme",
-                "intl",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-05-24T11:49:31+00:00"
-        },
-        {
-            "name": "symfony/polyfill-intl-normalizer",
-            "version": "v1.26.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
-                "reference": "219aa369ceff116e673852dce47c3a41794c14bd"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd",
-                "reference": "219aa369ceff116e673852dce47c3a41794c14bd",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1"
-            },
-            "suggest": {
-                "ext-intl": "For best performance"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "1.26-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "bootstrap.php"
-                ],
-                "psr-4": {
-                    "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
-                },
-                "classmap": [
-                    "Resources/stubs"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill for intl's Normalizer class and related functions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "intl",
-                "normalizer",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-05-24T11:49:31+00:00"
-        },
-        {
-            "name": "symfony/polyfill-mbstring",
-            "version": "v1.26.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-mbstring.git",
-                "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
-                "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1"
-            },
-            "provide": {
-                "ext-mbstring": "*"
-            },
-            "suggest": {
-                "ext-mbstring": "For best performance"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "1.26-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "bootstrap.php"
-                ],
-                "psr-4": {
-                    "Symfony\\Polyfill\\Mbstring\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill for the Mbstring extension",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "mbstring",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-05-24T11:49:31+00:00"
-        },
-        {
-            "name": "symfony/polyfill-php73",
-            "version": "v1.26.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-php73.git",
-                "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85",
-                "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "1.26-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "bootstrap.php"
-                ],
-                "psr-4": {
-                    "Symfony\\Polyfill\\Php73\\": ""
-                },
-                "classmap": [
-                    "Resources/stubs"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-05-24T11:49:31+00:00"
-        },
-        {
-            "name": "symfony/polyfill-php80",
-            "version": "v1.26.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-php80.git",
-                "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace",
-                "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "1.26-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "bootstrap.php"
-                ],
-                "psr-4": {
-                    "Symfony\\Polyfill\\Php80\\": ""
-                },
-                "classmap": [
-                    "Resources/stubs"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Ion Bazan",
-                    "email": "ion.bazan@gmail.com"
-                },
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-05-10T07:21:04+00:00"
-        },
-        {
-            "name": "symfony/polyfill-php81",
-            "version": "v1.26.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-php81.git",
-                "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1",
-                "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "1.26-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "bootstrap.php"
-                ],
-                "psr-4": {
-                    "Symfony\\Polyfill\\Php81\\": ""
-                },
-                "classmap": [
-                    "Resources/stubs"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-05-24T11:49:31+00:00"
-        },
-        {
-            "name": "symfony/service-contracts",
-            "version": "v2.5.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/service-contracts.git",
-                "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c",
-                "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2.5",
-                "psr/container": "^1.1",
-                "symfony/deprecation-contracts": "^2.1|^3"
-            },
-            "conflict": {
-                "ext-psr": "<1.1|>=2"
-            },
-            "suggest": {
-                "symfony/service-implementation": ""
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "2.5-dev"
-                },
-                "thanks": {
-                    "name": "symfony/contracts",
-                    "url": "https://github.com/symfony/contracts"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Contracts\\Service\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Generic abstractions related to writing services",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "abstractions",
-                "contracts",
-                "decoupling",
-                "interfaces",
-                "interoperability",
-                "standards"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/service-contracts/tree/v2.5.2"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-05-30T19:17:29+00:00"
-        },
-        {
-            "name": "symfony/string",
-            "version": "v5.4.14",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/string.git",
-                "reference": "089e7237497fae7a9c404d0c3aeb8db3254733e4"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/string/zipball/089e7237497fae7a9c404d0c3aeb8db3254733e4",
-                "reference": "089e7237497fae7a9c404d0c3aeb8db3254733e4",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2.5",
-                "symfony/polyfill-ctype": "~1.8",
-                "symfony/polyfill-intl-grapheme": "~1.0",
-                "symfony/polyfill-intl-normalizer": "~1.0",
-                "symfony/polyfill-mbstring": "~1.0",
-                "symfony/polyfill-php80": "~1.15"
-            },
-            "conflict": {
-                "symfony/translation-contracts": ">=3.0"
-            },
-            "require-dev": {
-                "symfony/error-handler": "^4.4|^5.0|^6.0",
-                "symfony/http-client": "^4.4|^5.0|^6.0",
-                "symfony/translation-contracts": "^1.1|^2",
-                "symfony/var-exporter": "^4.4|^5.0|^6.0"
-            },
-            "type": "library",
-            "autoload": {
-                "files": [
-                    "Resources/functions.php"
-                ],
-                "psr-4": {
-                    "Symfony\\Component\\String\\": ""
-                },
-                "exclude-from-classmap": [
-                    "/Tests/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "grapheme",
-                "i18n",
-                "string",
-                "unicode",
-                "utf-8",
-                "utf8"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/string/tree/v5.4.14"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-10-05T15:16:54+00:00"
-        },
-        {
-            "name": "symfony/translation",
-            "version": "v4.4.47",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/translation.git",
-                "reference": "45036b1d53accc48fe9bab71ccd86d57eba0dd94"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/translation/zipball/45036b1d53accc48fe9bab71ccd86d57eba0dd94",
-                "reference": "45036b1d53accc48fe9bab71ccd86d57eba0dd94",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1.3",
-                "symfony/polyfill-mbstring": "~1.0",
-                "symfony/polyfill-php80": "^1.16",
-                "symfony/translation-contracts": "^1.1.6|^2"
-            },
-            "conflict": {
-                "symfony/config": "<3.4",
-                "symfony/dependency-injection": "<3.4",
-                "symfony/http-kernel": "<4.4",
-                "symfony/yaml": "<3.4"
-            },
-            "provide": {
-                "symfony/translation-implementation": "1.0|2.0"
-            },
-            "require-dev": {
-                "psr/log": "^1|^2|^3",
-                "symfony/config": "^3.4|^4.0|^5.0",
-                "symfony/console": "^3.4|^4.0|^5.0",
-                "symfony/dependency-injection": "^3.4|^4.0|^5.0",
-                "symfony/finder": "~2.8|~3.0|~4.0|^5.0",
-                "symfony/http-kernel": "^4.4",
-                "symfony/intl": "^3.4|^4.0|^5.0",
-                "symfony/service-contracts": "^1.1.2|^2",
-                "symfony/yaml": "^3.4|^4.0|^5.0"
-            },
-            "suggest": {
-                "psr/log-implementation": "To use logging capability in translator",
-                "symfony/config": "",
-                "symfony/yaml": ""
-            },
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Component\\Translation\\": ""
-                },
-                "exclude-from-classmap": [
-                    "/Tests/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Provides tools to internationalize your application",
-            "homepage": "https://symfony.com",
-            "support": {
-                "source": "https://github.com/symfony/translation/tree/v4.4.47"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-10-03T15:15:11+00:00"
-        },
-        {
-            "name": "symfony/translation-contracts",
-            "version": "v2.5.2",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/translation-contracts.git",
-                "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/136b19dd05cdf0709db6537d058bcab6dd6e2dbe",
-                "reference": "136b19dd05cdf0709db6537d058bcab6dd6e2dbe",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2.5"
-            },
-            "suggest": {
-                "symfony/translation-implementation": ""
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "2.5-dev"
-                },
-                "thanks": {
-                    "name": "symfony/contracts",
-                    "url": "https://github.com/symfony/contracts"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Contracts\\Translation\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Generic abstractions related to translation",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "abstractions",
-                "contracts",
-                "decoupling",
-                "interfaces",
-                "interoperability",
-                "standards"
-            ],
-            "support": {
-                "source": "https://github.com/symfony/translation-contracts/tree/v2.5.2"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-06-27T16:58:25+00:00"
-        },
-        {
-            "name": "symfony/yaml",
-            "version": "v5.4.14",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/yaml.git",
-                "reference": "e83fe9a72011f07c662da46a05603d66deeeb487"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/yaml/zipball/e83fe9a72011f07c662da46a05603d66deeeb487",
-                "reference": "e83fe9a72011f07c662da46a05603d66deeeb487",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.2.5",
-                "symfony/deprecation-contracts": "^2.1|^3",
-                "symfony/polyfill-ctype": "^1.8"
-            },
-            "conflict": {
-                "symfony/console": "<5.3"
-            },
-            "require-dev": {
-                "symfony/console": "^5.3|^6.0"
-            },
-            "suggest": {
-                "symfony/console": "For validating YAML files using the lint command"
-            },
-            "bin": [
-                "Resources/bin/yaml-lint"
-            ],
-            "type": "library",
-            "autoload": {
-                "psr-4": {
-                    "Symfony\\Component\\Yaml\\": ""
-                },
-                "exclude-from-classmap": [
-                    "/Tests/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Fabien Potencier",
-                    "email": "fabien@symfony.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Loads and dumps YAML files",
-            "homepage": "https://symfony.com",
-            "support": {
-                "source": "https://github.com/symfony/yaml/tree/v5.4.14"
-            },
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2022-10-03T15:15:50+00:00"
-        },
-        {
-            "name": "theseer/tokenizer",
-            "version": "1.2.1",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/theseer/tokenizer.git",
-                "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
-                "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
-                "shasum": ""
-            },
-            "require": {
-                "ext-dom": "*",
-                "ext-tokenizer": "*",
-                "ext-xmlwriter": "*",
-                "php": "^7.2 || ^8.0"
-            },
-            "type": "library",
-            "autoload": {
-                "classmap": [
-                    "src/"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "BSD-3-Clause"
-            ],
-            "authors": [
-                {
-                    "name": "Arne Blankerts",
-                    "email": "arne@blankerts.de",
-                    "role": "Developer"
-                }
-            ],
-            "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
-            "support": {
-                "issues": "https://github.com/theseer/tokenizer/issues",
-                "source": "https://github.com/theseer/tokenizer/tree/1.2.1"
-            },
-            "funding": [
-                {
-                    "url": "https://github.com/theseer",
-                    "type": "github"
-                }
-            ],
-            "time": "2021-07-28T10:34:58+00:00"
-        },
-        {
-            "name": "webmozart/assert",
-            "version": "1.11.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/webmozarts/assert.git",
-                "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991",
-                "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991",
-                "shasum": ""
-            },
-            "require": {
-                "ext-ctype": "*",
-                "php": "^7.2 || ^8.0"
-            },
-            "conflict": {
-                "phpstan/phpstan": "<0.12.20",
-                "vimeo/psalm": "<4.6.1 || 4.6.2"
-            },
-            "require-dev": {
-                "phpunit/phpunit": "^8.5.13"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "1.10-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Webmozart\\Assert\\": "src/"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Bernhard Schussek",
-                    "email": "bschussek@gmail.com"
-                }
-            ],
-            "description": "Assertions to validate method input/output with nice error messages.",
-            "keywords": [
-                "assert",
-                "check",
-                "validate"
-            ],
-            "support": {
-                "issues": "https://github.com/webmozarts/assert/issues",
-                "source": "https://github.com/webmozarts/assert/tree/1.11.0"
-            },
-            "time": "2022-06-03T18:03:27+00:00"
-        }
-    ],
-    "aliases": [],
-    "minimum-stability": "stable",
-    "stability-flags": [],
-    "prefer-stable": false,
-    "prefer-lowest": false,
-    "platform": [],
-    "platform-dev": [],
-    "platform-overrides": {
-        "php": "7.4"
-    },
-    "plugin-api-version": "2.3.0"
-}
diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml
deleted file mode 100644 (file)
index 3ff26c8..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-default:
-  suites:
-    default:
-      paths:
-        - "%paths.base%/../features"
-      contexts:
-        - ActorContext
-        - NextcloudTestServerContext
-
-        - AppNavigationContext
-        - AppSettingsContext
-        - AppsManagementContext
-        - CommentsAppContext
-        - ContactsMenuContext
-        - DialogContext
-        - FeatureContext
-        - FileListContext
-        - FilesAppContext
-        - FilesAppSharingContext
-        - NotificationsContext
-        - PublicShareContext
-        - SearchContext
-        - SettingsContext
-        - SettingsMenuContext
-        - ToastContext
-      filters:
-        tags: "~@apache"
-    apache:
-      paths:
-        - "%paths.base%/../features"
-      contexts:
-        - ActorContext
-        - NextcloudTestServerContext:
-            nextcloudTestServerHelper: NextcloudTestServerLocalApacheHelper
-
-        - AppNavigationContext
-        - AppSettingsContext
-        - AppsManagementContext
-        - CommentsAppContext
-        - ContactsMenuContext
-        - DialogContext
-        - FeatureContext
-        - FileListContext
-        - FilesAppContext
-        - FilesAppSharingContext
-        - NotificationsContext
-        - PublicShareContext
-        - SearchContext
-        - SettingsContext
-        - SettingsMenuContext
-        - ToastContext
-      filters:
-        tags: "@apache"
-  extensions:
-    Behat\MinkExtension:
-      sessions:
-        default:
-          selenium2:
-            wd_host: %selenium.server%
-            browser: "chrome"
-            capabilities:
-              extra_capabilities:
-                goog:chromeOptions:
-                  args: ["disable-dev-shm-usage"]
-                  w3c: false
-        John:
-          selenium2:
-            wd_host: %selenium.server%
-            browser: "chrome"
-            capabilities:
-              extra_capabilities:
-                goog:chromeOptions:
-                  args: ["disable-dev-shm-usage"]
-                  w3c: false
-        Jane:
-          selenium2:
-            wd_host: %selenium.server%
-            browser: "chrome"
-            capabilities:
-              extra_capabilities:
-                goog:chromeOptions:
-                  args: ["disable-dev-shm-usage"]
-                  w3c: false
-        Jim:
-          selenium2:
-            wd_host: %selenium.server%
-            browser: "chrome"
-            capabilities:
-              extra_capabilities:
-                goog:chromeOptions:
-                  args: ["disable-dev-shm-usage"]
-                  w3c: false
-        Rubeus:
-          # Rubeus uses a browser that has CSS grid support.
-          selenium2:
-            wd_host: %selenium.server%
-            capabilities:
-              firefox:
-                profile: %paths.base%/firefox-profiles/css-grid-enabled.zip
diff --git a/tests/acceptance/config/firefox-profiles/css-grid-enabled.zip b/tests/acceptance/config/firefox-profiles/css-grid-enabled.zip
deleted file mode 100644 (file)
index 8f06180..0000000
Binary files a/tests/acceptance/config/firefox-profiles/css-grid-enabled.zip and /dev/null differ
diff --git a/tests/acceptance/features/app-comments.feature b/tests/acceptance/features/app-comments.feature
deleted file mode 100644 (file)
index b57883d..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-Feature: app-comments
-
-#  Scenario: Writing a comment
-#    Given I am logged in
-#    And I open the details view for "welcome.txt"
-#    And I open the "Comments" tab in the details view
-#    When I create a new comment with "Hello world" as message
-#    Then I see a comment with "Hello world" as message
-
-#  Scenario: open the comments for a different file
-#    Given I am logged in
-#    And I create a new folder named "Folder"
-#    And I open the details view for "welcome.txt"
-#    And I open the "Comments" tab in the details view
-#    And I create a new comment with "Hello world" as message
-#    And I see a comment with "Hello world" as message
-#    When I open the details view for "Folder"
-    # The "Comments" tab should already be opened
-#    Then I see that there are no comments
-
-  Scenario: write a comment in a file right after writing a comment in another file
-    Given I am logged in
-    And I create a new folder named "Folder"
-    And I open the details view for "Folder"
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Comment in Folder" as message
-    And I see a comment with "Comment in Folder" as message
-    And I open the details view for "welcome.txt"
-    # The "Comments" tab should already be opened
-    When I create a new comment with "Comment in welcome.txt" as message
-    Then I see a comment with "Comment in welcome.txt" as message
-    And I see that there is no comment with "Comment in Folder" as message
-
-
-
-  Scenario: read a comment written by the sharer
-    Given I act as John
-    And I am logged in as the admin
-    And I act as Jane
-    And I am logged in
-    And I act as John
-    And I rename "welcome.txt" to "shared.txt"
-    And I share "shared.txt" with "user0"
-    And I see that the file is shared with "user0"
-    # The details view should already be open
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    When I act as Jane
-    # The Files app is open again to reload the file list and the comments
-    And I open the Files app
-    And I open the details view for "shared.txt"
-    And I open the "Comments" tab in the details view
-    Then I see a comment with "Hello world" as message
-
-  Scenario: read a comment written by the sharee
-    Given I act as John
-    And I am logged in as the admin
-    And I act as Jane
-    And I am logged in
-    And I act as John
-    And I rename "welcome.txt" to "shared.txt"
-    And I share "shared.txt" with "user0"
-    And I see that the file is shared with "user0"
-    And I act as Jane
-    # The Files app is open again to reload the file list
-    And I open the Files app
-    And I open the details view for "shared.txt"
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    When I act as John
-    # The Files app is open again to reload the file list and the comments
-    And I open the Files app
-    And I open the details view for "shared.txt"
-    And I open the "Comments" tab in the details view
-    Then I see a comment with "Hello world" as message
-
-
-
-  Scenario: unread comment icon shown for comment written by the sharer in a shared file
-    Given I act as John
-    And I am logged in as the admin
-    And I act as Jane
-    And I am logged in
-    And I act as John
-    And I rename "welcome.txt" to "shared.txt"
-    And I share "shared.txt" with "user0"
-    And I see that the file is shared with "user0"
-    # The details view should already be open
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    When I act as Jane
-    # The Files app is open again to reload the file list and the comments
-    And I open the Files app
-    Then I see that "shared.txt" has unread comments
-    And I open the unread comments for "shared.txt"
-    And I see that the details view is open
-    And I see a comment with "Hello world" as message
-
-  Scenario: unread comment icon shown for comment written by the sharee in a shared file
-    Given I act as John
-    And I am logged in as the admin
-    And I act as Jane
-    And I am logged in
-    And I act as John
-    And I rename "welcome.txt" to "shared.txt"
-    And I share "shared.txt" with "user0"
-    And I see that the file is shared with "user0"
-    And I act as Jane
-    # The Files app is open again to reload the file list
-    And I open the Files app
-    And I open the details view for "shared.txt"
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    When I act as John
-    # The Files app is open again to reload the file list and the comments
-    And I open the Files app
-    Then I see that "shared.txt" has unread comments
-    And I open the unread comments for "shared.txt"
-    And I see that the details view is open
-    And I see a comment with "Hello world" as message
-
-  Scenario: unread comment icon shown for comment written by the sharer in a shared folder
-    Given I act as John
-    And I am logged in as the admin
-    And I act as Jane
-    And I am logged in
-    And I act as John
-    And I create a new folder named "Folder"
-    And I share "Folder" with "user0"
-    And I see that the file is shared with "user0"
-    # The details view should already be open
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    When I act as Jane
-    # The Files app is open again to reload the file list and the comments
-    And I open the Files app
-    Then I see that "Folder" has unread comments
-    And I open the unread comments for "Folder"
-    And I see that the details view is open
-    And I see a comment with "Hello world" as message
-
-  Scenario: unread comment icon shown for comment written by the sharee in a shared folder
-    Given I act as John
-    And I am logged in as the admin
-    And I act as Jane
-    And I am logged in
-    And I act as John
-    And I create a new folder named "Folder"
-    And I share "Folder" with "user0"
-    And I see that the file is shared with "user0"
-    And I act as Jane
-    # The Files app is open again to reload the file list
-    And I open the Files app
-    And I open the details view for "Folder"
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    When I act as John
-    # The Files app is open again to reload the file list and the comments
-    And I open the Files app
-    Then I see that "Folder" has unread comments
-    And I open the unread comments for "Folder"
-    And I see that the details view is open
-    And I see a comment with "Hello world" as message
-
-  Scenario: unread comment icon shown for comment written by the sharer in a child folder of a shared folder
-    Given I act as John
-    And I am logged in as the admin
-    And I act as Jane
-    And I am logged in
-    And I act as John
-    And I create a new folder named "Folder"
-    And I share "Folder" with "user0"
-    And I see that the file is shared with "user0"
-    And I enter in the folder named "Folder"
-    And I create a new folder named "Child folder"
-    # The details view should already be open
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    When I act as Jane
-    # The Files app is open again to reload the file list and the comments
-    And I open the Files app
-    And I enter in the folder named "Folder"
-    Then I see that "Child folder" has unread comments
-    And I open the unread comments for "Child folder"
-    And I see that the details view is open
-    And I see a comment with "Hello world" as message
-
-  Scenario: unread comment icon shown for comment written by the sharee in a child folder of a shared folder
-    Given I act as John
-    And I am logged in as the admin
-    And I act as Jane
-    And I am logged in
-    And I act as John
-    And I create a new folder named "Folder"
-    And I share "Folder" with "user0"
-    And I see that the file is shared with "user0"
-    And I act as Jane
-    # The Files app is open again to reload the file list
-    And I open the Files app
-    And I enter in the folder named "Folder"
-    And I create a new folder named "Child folder"
-    # The details view should already be open
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    When I act as John
-    And I enter in the folder named "Folder"
-    Then I see that "Child folder" has unread comments
-    And I open the unread comments for "Child folder"
-    And I see that the details view is open
-    And I see a comment with "Hello world" as message
-
-
-
-  Scenario: search a comment
-    Given I am logged in
-    And I open the details view for "welcome.txt"
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    When I search for "hello"
-    # Search results for comments also include the user that wrote the comment.
-    Then I see that the search result 1 is "user0Hello world"
-    And I see that the search result 1 was found in "welcome.txt"
-
-  Scenario: search a comment in a child folder
-    Given I am logged in
-    And I create a new folder named "Folder"
-    And I enter in the folder named "Folder"
-    And I create a new folder named "Child folder"
-    And I open the details view for "Child folder"
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    # The Files app is open again to reload the file list
-    And I open the Files app
-    When I search for "hello"
-    # Search results for comments also include the user that wrote the comment.
-    Then I see that the search result 1 is "user0Hello world"
-    And I see that the search result 1 was found in "Folder/Child folder"
-
-  Scenario: search a comment by a another user
-    Given I act as John
-    And I am logged in as the admin
-    And I act as Jane
-    And I am logged in
-    And I act as John
-    And I rename "welcome.txt" to "shared.txt"
-    And I share "shared.txt" with "user0"
-    And I see that the file is shared with "user0"
-    And I act as Jane
-    # The Files app is open again to reload the file list
-    And I open the Files app
-    And I open the details view for "shared.txt"
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    When I act as John
-    And I search for "hello"
-    # Search results for comments also include the user that wrote the comment.
-    Then I see that the search result 1 is "user0Hello world"
-    And I see that the search result 1 was found in "shared.txt"
-
-  Scenario: open a search result for a comment in a file
-    Given I am logged in
-    And I open the details view for "welcome.txt"
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    # Force the details view to change to a different file before closing it
-    And I create a new folder named "Folder"
-    And I close the details view
-    When I search for "hello"
-    And I open the search result 1
-    Then I see that the details view is open
-    And I see that the file name shown in the details view is "welcome.txt"
-    And I see a comment with "Hello world" as message
-    And I see that the file list is currently in "Home"
-    And I see that the file list contains a file named "welcome.txt"
-
-  Scenario: open a search result for a comment in a folder named like its child folder
-    Given I am logged in
-    And I create a new folder named "Folder"
-    And I open the details view for "Folder"
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    And I enter in the folder named "Folder"
-    And I create a new folder named "Folder"
-    # The Files app is open again to reload the file list
-    And I open the Files app
-    When I search for "hello"
-    And I open the search result 1
-    Then I see that the details view is open
-    And I see that the file name shown in the details view is "Folder"
-    And I see a comment with "Hello world" as message
-    And I see that the file list is currently in "Home"
-    And I see that the file list contains a file named "welcome.txt"
-    And I see that the file list contains a file named "Folder"
-
-  Scenario: open a search result for a comment in a child folder
-    Given I am logged in
-    And I create a new folder named "Folder"
-    And I enter in the folder named "Folder"
-    And I create a new folder named "Child folder"
-    And I open the details view for "Child folder"
-    And I open the "Comments" tab in the details view
-    And I create a new comment with "Hello world" as message
-    And I see a comment with "Hello world" as message
-    # The Files app is open again to reload the file list
-    And I open the Files app
-    When I search for "hello"
-    And I open the search result 1
-    Then I see that the details view is open
-    And I see that the file name shown in the details view is "Child folder"
-    And I see a comment with "Hello world" as message
-    And I see that the file list is currently in "Home/Folder"
-    And I see that the file list contains a file named "Child folder"
diff --git a/tests/acceptance/features/apps.feature b/tests/acceptance/features/apps.feature
deleted file mode 100644 (file)
index 0fc2f2a..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-@apache
-Feature: apps
-
-  Scenario: enable an installed app
-    Given I act as Jane
-    And I am logged in as the admin
-    And I open the Apps management
-    When I enable the "QA testing" app
-    Then I see that the "QA testing" app has been enabled
-
-  Scenario: disable a installed app
-    Given I act as Jane
-    And I am logged in as the admin
-    And I open the Apps management
-    When I disable the "Update notification" app
-    Then I see that the "Update notification" app has been disabled
-
-  Scenario: Browse enabled apps
-    Given I act as Jane
-    And I am logged in as the admin
-    And I open the Apps management
-    When I open the "Active apps" section
-    Then I see that the current section is "Active apps"
-    And I see that there are only enabled apps
-
-  Scenario: Browse disabled apps
-    Given I act as Jane
-    And I am logged in as the admin
-    And I open the Apps management
-    When I open the "Disabled apps" section
-    Then I see that the current section is "Disabled apps"
-    And I see that there are only disabled apps
-
-  Scenario: Browse app bundles
-    Given I act as Jane
-    And I am logged in as the admin
-    And I open the Apps management
-    When I open the "App bundles" section
-    Then I see that the current section is "App bundles"
-    And I see the app bundles
-    And I see that the "Enterprise bundle" is disabled
-
-# Enabling an app bundle fails when not all apps have a matching version available
-#  Scenario: Enable an app bundle
-#    Given I act as Jane
-#    And I am logged in as the admin
-#    And I open the Apps management
-#    And I open the "App bundles" section
-#    When I enable all apps from the "Enterprise bundle"
-#    Then I see that the "Auditing / Logging" app has been enabled
-#    And I see that the "LDAP user and group backend" app has been enabled
-
-  Scenario: View app details
-    Given I act as Jane
-    And I am logged in as the admin
-    And I open the Apps management
-    When I click on the "QA testing" app
-    Then I see that the app details are shown
-
-  # TODO: Improve testing with app store as external API
-  # The following scenarios require the files_antivirus and calendar app
-  # being present in the app store with support for the current server version
-  # Ideally we would have either a dummy app store endpoint with some test apps
-  # or even an app store instance running somewhere to properly test this.
-  # This is also a requirement to properly test updates of apps
-
-  Scenario: Show section from app store
-    Given I act as Jane
-    And I am logged in as the admin
-    And I open the Apps management
-    And I see that the current section is "Your apps"
-    #When I open the "Files" section
-    #Then I see that there some apps listed from the app store
-    #And I see that the current section is "Files"
-
-#  Scenario: View app details for app store apps
-#    Given I act as Jane
-#    And I am logged in as the admin
-#    And I open the Apps management
-#    And I open the "Tools" section
-#    When I click on the "Antivirus for files" app
-#    Then I see that the app details are shown
-
-#  Scenario: Install an app from the app store
-#    Given I act as Jane
-#    And I am logged in as the admin
-#    And I open the Apps management
-#    And I open the "Tools" section
-#    And I click on the "Antivirus for files" app
-#    And I see that the app details are shown
-#    Then I download and enable the "Antivirus for files" app
-#    And I see that the "Antivirus for files" app has been enabled
diff --git a/tests/acceptance/features/bootstrap/AppNavigationContext.php b/tests/acceptance/features/bootstrap/AppNavigationContext.php
deleted file mode 100644 (file)
index 49d664e..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class AppNavigationContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function appNavigation() {
-               return Locator::forThe()->xpath("//*[@id=\"app-navigation\" or contains(@class, 'app-navigation')]")->
-                       describedAs("App navigation");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function appNavigationSectionItemFor($sectionText) {
-               return Locator::forThe()->xpath("//li/*[contains(normalize-space(), '$sectionText')]/..")->
-                       descendantOf(self::appNavigation())->
-                       describedAs($sectionText . " section item in App Navigation");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function appNavigationSectionItemInFor($caption, $sectionText) {
-               return Locator::forThe()->xpath("//li[normalize-space() = '$caption']/following-sibling::li/a[normalize-space() = '$sectionText']/..")->
-                       descendantOf(self::appNavigation())->
-                       describedAs($sectionText . " section item of the $caption group in App Navigation");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function appNavigationCurrentSectionItem() {
-               return Locator::forThe()->css(".active")->
-                       descendantOf(self::appNavigation())->
-                       describedAs("Current section item in App Navigation");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function buttonForTheSection($class, $section) {
-               return Locator::forThe()->css("." . $class)->
-                       descendantOf(self::appNavigationSectionItemFor($section))->
-                       describedAs("The $class button on the $section section in App Navigation");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function counterForTheSection($section) {
-               return Locator::forThe()->css(".app-navigation-entry-utils-counter")->
-                       descendantOf(self::appNavigationSectionItemFor($section))->
-                       describedAs("The counter for the $section section in App Navigation");
-       }
-
-       /**
-        * @Given I open the :section section
-        */
-       public function iOpenTheSection($section) {
-               $this->actor->find(self::appNavigationSectionItemFor($section), 10)->click();
-       }
-
-       /**
-        * @Given I open the :section section of the :caption group
-        */
-       public function iOpenTheSectionOf($caption, $section) {
-               $this->actor->find(self::appNavigationSectionItemInFor($caption, $section), 10)->click();
-       }
-
-       /**
-        * @Given I click the :class button on the :section section
-        */
-       public function iClickTheButtonInTheSection($class, $section) {
-               $this->actor->find(self::buttonForTheSection($class, $section), 10)->click();
-       }
-
-       /**
-        * @Then I see that the current section is :section
-        */
-       public function iSeeThatTheCurrentSectionIs($section) {
-               Assert::assertEquals($this->actor->find(self::appNavigationCurrentSectionItem(), 10)->getText(), $section);
-       }
-
-       /**
-        * @Then I see that the section :section is shown
-        */
-       public function iSeeThatTheSectionIsShown($section) {
-               if (!WaitFor::elementToBeEventuallyShown(
-                       $this->actor,
-                       self::appNavigationSectionItemFor($section),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The section $section in the app navigation is not shown yet after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that the section :section is not shown
-        */
-       public function iSeeThatTheSectionIsNotShown($section) {
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::appNavigationSectionItemFor($section),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The section $section in the app navigation is still shown after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that the section :section has a count of :count
-        */
-       public function iSeeThatTheSectionHasACountOf($section, $count) {
-               Assert::assertEquals($this->actor->find(self::counterForTheSection($section), 10)->getText(), $count);
-       }
-
-       /**
-        * @Then I see that the section :section does not have a count
-        */
-       public function iSeeThatTheSectionDoesNotHaveACount($section) {
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::counterForTheSection($section),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The counter for section $section is still shown after $timeout seconds");
-               }
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/AppSettingsContext.php b/tests/acceptance/features/bootstrap/AppSettingsContext.php
deleted file mode 100644 (file)
index 785664f..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class AppSettingsContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function appSettings() {
-               return Locator::forThe()->id("app-settings")->
-                       describedAs("App settings");
-       }
-       /**
-        * @return Locator
-        */
-       public static function appSettingsContent() {
-               return Locator::forThe()->xpath("//div[@id = 'app-settings-content' or  @id = 'app-settings__content']")->
-                       descendantOf(self::appSettings())->
-                       describedAs("App settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function appSettingsOpenButton() {
-               return Locator::forThe()->xpath("//div[@id = 'app-settings-header' or  @id = 'app-settings__header']/button")->
-                       descendantOf(self::appSettings())->
-                       describedAs("The button to open the app settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function checkboxInTheSettings($id) {
-               return Locator::forThe()->xpath("//input[@id = '$id']")->
-                       descendantOf(self::appSettingsContent())->
-                       describedAs("The $id checkbox in the settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function checkboxLabelInTheSettings($id) {
-               return Locator::forThe()->css("[data-test=\"$id\"]")->
-                       descendantOf(self::appSettingsContent())->
-                       describedAs("The label for the $id checkbox in the settings");
-       }
-
-       /**
-        * @Given I open the settings
-        */
-       public function iOpenTheSettings() {
-               $this->actor->find(self::appSettingsOpenButton(), 10)->click();
-       }
-
-       /**
-        * @Given I toggle the :id checkbox in the settings
-        */
-       public function iToggleTheCheckboxInTheSettingsTo($id) {
-               $this->actor->find(self::checkboxLabelInTheSettings($id), 10)->click();
-       }
-
-       /**
-        * @Then I see that the settings are opened
-        */
-       public function iSeeThatTheSettingsAreOpened() {
-               if (!WaitFor::elementToBeEventuallyShown(
-                       $this->actor,
-                       self::appSettingsContent(),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The app settings are not open yet after $timeout seconds");
-               }
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/AppsManagementContext.php b/tests/acceptance/features/bootstrap/AppsManagementContext.php
deleted file mode 100644 (file)
index 24985e3..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @author Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class AppsManagementContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function appsList() {
-               return Locator::forThe()->xpath("//main[@id='app-content' or contains(@class, 'app-content')]//*[@id='apps-list']")->
-                               describedAs("Apps list in Apps Management");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function enableButtonForApp($app) {
-               return Locator::forThe()->button("Enable")->
-                               descendantOf(self::rowForApp($app))->
-                               describedAs("Enable button in the app list for $app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function enableButtonForAnyApp() {
-               return Locator::forThe()->button("Enable")->
-                               descendantOf(self::appsList())->
-                               describedAs("Enable button in the app list for any app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function downloadAndEnableButtonForApp($app) {
-               return Locator::forThe()->button("Download and enable")->
-                               descendantOf(self::rowForApp($app))->
-                               describedAs("Download & enable button in the app list for $app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function disableButtonForApp($app) {
-               return Locator::forThe()->button("Disable")->
-                               descendantOf(self::rowForApp($app))->
-                               describedAs("Disable button in the app list for $app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function disableButtonForAnyApp() {
-               return Locator::forThe()->button("Disable")->
-                               descendantOf(self::appsList())->
-                               describedAs("Disable button in the app list for any app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function enableAllBundleButton($bundle) {
-               return Locator::forThe()->xpath("//th[//*[normalize-space() = '$bundle']]//button[normalize-space() = 'Download and enable all']")->
-                               descendantOf(self::appsList())->
-                               describedAs("Button to enable bundles");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function rowForApp($app) {
-               return Locator::forThe()->xpath("//*[@class='app-name'][normalize-space() = '$app']/..")->
-                               descendantOf(self::appsList())->
-                               describedAs("Row for app $app in Apps Management");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function emptyAppList() {
-               return Locator::forThe()->xpath("//*[@id='apps-list-empty']")->
-                               descendantOf(self::appsList())->
-                               describedAs("Empty apps list view");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function appEntries() {
-               return Locator::forThe()->xpath("//div[@class='section']")->
-                               descendantOf(self::appsList())->
-                               describedAs("Entries in apps list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function disabledAppEntries() {
-               return Locator::forThe()->button("Disable")->
-                               descendantOf(self::appEntries())->
-                               describedAs("Disable button in the app list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function enabledAppEntries() {
-               return Locator::forThe()->button("Enable")->
-                               descendantOf(self::appEntries())->
-                               describedAs("Enable button in the app list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function sidebar() {
-               return Locator::forThe()->xpath("//*[@id=\"app-sidebar\" or contains(@class, 'app-sidebar')]")->
-                               describedAs("Sidebar in apps management");
-       }
-
-
-       /**
-        * @When I enable the :app app
-        */
-       public function iEnableTheApp($app) {
-               $this->actor->find(self::enableButtonForApp($app), 10)->click();
-       }
-
-       /**
-        * @When I download and enable the :app app
-        */
-       public function iDownloadAndEnableTheApp($app) {
-               $this->actor->find(self::downloadAndEnableButtonForApp($app), 10)->click();
-       }
-
-       /**
-        * @When I disable the :app app
-        */
-       public function iDisableTheApp($app) {
-               $this->actor->find(self::disableButtonForApp($app), 10)->click();
-       }
-
-       /**
-        * @Then I see that the :app app has been enabled
-        */
-       public function iSeeThatTheAppHasBeenEnabled($app) {
-               // TODO: Find a way to check if the enable button is removed
-               Assert::assertTrue(
-                       $this->actor->find(self::disableButtonForApp($app), 10)->isVisible()
-               );
-       }
-
-       /**
-        * @Then I see that the :app app has been disabled
-        */
-       public function iSeeThatTheAppHasBeenDisabled($app) {
-               // TODO: Find a way to check if the disable button is removed
-               Assert::assertTrue(
-                       $this->actor->find(self::enableButtonForApp($app), 10)->isVisible()
-               );
-       }
-
-       /**
-        * @Then /^I see that there are no available updates$/
-        */
-       public function iSeeThatThereAreNoAvailableUpdates() {
-               Assert::assertTrue(
-                       $this->actor->find(self::emptyAppList(), 10)->isVisible()
-               );
-       }
-
-       /**
-        * @Then /^I see that there some apps listed from the app store$/
-        */
-       public function iSeeThatThereSomeAppsListedFromTheAppStore() {
-               if (!WaitFor::elementToBeEventuallyShown(
-                       $this->actor,
-                       self::appEntries(),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The apps from the app store were not shown yet after $timeout seconds");
-               }
-       }
-
-       /**
-        * @When /^I click on the "([^"]*)" app$/
-        */
-       public function iClickOnTheApp($app) {
-               $this->actor->find(self::rowForApp($app), 10)->click();
-       }
-
-       /**
-        * @Given /^I see that there are only disabled apps$/
-        */
-       public function iSeeThatThereAreOnlyDisabledApps() {
-               try {
-                       $this->actor->find(self::disableButtonForAnyApp(), 2);
-
-                       Assert::fail("Found enabled apps");
-               } catch (NoSuchElementException $exception) {
-               }
-       }
-
-       /**
-        * @Given /^I see that there are only enabled apps$/
-        */
-       public function iSeeThatThereAreOnlyEnabledApps() {
-               try {
-                       $this->actor->find(self::enableButtonForAnyApp(), 2);
-
-                       Assert::fail("Found disabled apps");
-               } catch (NoSuchElementException $exception) {
-               }
-       }
-
-       /**
-        * @Given /^I see the app bundles$/
-        */
-       public function iSeeTheAppBundles() {
-               Assert::assertTrue(
-                       $this->actor->find(self::rowForApp('Auditing / Logging'), 10)->isVisible()
-               );
-               Assert::assertTrue(
-                       $this->actor->find(self::rowForApp('LDAP user and group backend'), 2)->isVisible()
-               );
-       }
-
-       /**
-        * @When /^I enable all apps from the "([^"]*)"$/
-        */
-       public function iEnableAllAppsFromThe($bundle) {
-               $this->actor->find(self::enableAllBundleButton($bundle), 2)->click();
-       }
-
-       /**
-        * @Given /^I see that the "([^"]*)" is disabled$/
-        */
-       public function iSeeThatTheIsDisabled($bundle) {
-               Assert::assertTrue(
-                       $this->actor->find(self::enableAllBundleButton($bundle), 2)->isVisible()
-               );
-       }
-
-       /**
-        * @Given /^I see that the app details are shown$/
-        */
-       public function iSeeThatTheAppDetailsAreShown() {
-               // The sidebar always exists in the DOM, so it has to be explicitly
-               // waited for it to be visible instead of relying on the implicit wait
-               // made to find the element.
-               if (!WaitFor::elementToBeEventuallyShown(
-                       $this->actor,
-                       self::sidebar(),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The sidebar was not shown yet after $timeout seconds");
-               }
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/CommentsAppContext.php b/tests/acceptance/features/bootstrap/CommentsAppContext.php
deleted file mode 100644 (file)
index b193ba9..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de>
- *
- * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class CommentsAppContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function newCommentField() {
-               return Locator::forThe()->css("div.newCommentRow .message")->
-                               descendantOf(FilesAppContext::detailsView())->
-                               describedAs("New comment field in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function submitNewCommentButton() {
-               return Locator::forThe()->css("div.newCommentRow .submit")->
-                               descendantOf(FilesAppContext::detailsView())->
-                               describedAs("Submit new comment button in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function commentList() {
-               return Locator::forThe()->css("ul.comments")->
-                               descendantOf(FilesAppContext::detailsView())->
-                               describedAs("Comment list in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function commentWithText($text) {
-               return Locator::forThe()->xpath("//div[normalize-space() = '$text']/ancestor::li")->
-                               descendantOf(self::commentList())->
-                               describedAs("Comment with text \"$text\" in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function emptyContent() {
-               return Locator::forThe()->css(".emptycontent")->
-                               descendantOf(FilesAppContext::detailsView())->
-                               describedAs("Empty content in details view in Files app");
-       }
-
-       /**
-        * @When /^I create a new comment with "([^"]*)" as message$/
-        */
-       public function iCreateANewCommentWithAsMessage($commentText) {
-               $this->actor->find(self::newCommentField(), 10)->setValue($commentText);
-               $this->actor->find(self::submitNewCommentButton())->click();
-       }
-
-       /**
-        * @Then /^I see that there are no comments$/
-        */
-       public function iSeeThatThereAreNoComments() {
-               if (!WaitFor::elementToBeEventuallyShown(
-                       $this->actor,
-                       self::emptyContent(),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The no comments message is not visible yet after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then /^I see a comment with "([^"]*)" as message$/
-        */
-       public function iSeeACommentWithAsMessage($commentText) {
-               Assert::assertTrue(
-                       $this->actor->find(self::commentWithText($commentText), 10)->isVisible());
-       }
-
-       /**
-        * @Then /^I see that there is no comment with "([^"]*)" as message$/
-        */
-       public function iSeeThatThereIsNoCommentWithAsMessage($commentText) {
-               try {
-                       Assert::assertFalse(
-                               $this->actor->find(self::commentWithText($commentText))->isVisible());
-               } catch (NoSuchElementException $exception) {
-               }
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/ContactsMenuContext.php b/tests/acceptance/features/bootstrap/ContactsMenuContext.php
deleted file mode 100644 (file)
index de79ecc..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) (skjnldsv@protonmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class ContactsMenuContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function contactsMenuButton() {
-               return Locator::forThe()->xpath("//*[@id = 'header']//*[@id = 'contactsmenu']//*[contains(@class, 'header-menu__trigger')]")->
-                               describedAs("Contacts menu button");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function contactsMenu() {
-               return Locator::forThe()->xpath("//*[@id = 'header']//*[@id = 'contactsmenu']//*[@class = 'contactsmenu__menu']")->
-                               describedAs("Contacts menu");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function contactsMenuSearchInput() {
-               return Locator::forThe()->id("contactsmenu__menu__search")->
-                               descendantOf(self::contactsMenu())->
-                               describedAs("Contacts menu search input");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function noResultsMessage() {
-               return Locator::forThe()->xpath("//*[@class = 'empty-content' and normalize-space() = 'No contacts found']")->
-                               descendantOf(self::contactsMenu())->
-                               describedAs("No results message in Contacts menu");
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function menuItemFor($contactName) {
-               return Locator::forThe()->xpath("//*[@class = 'contact__body__full-name' and normalize-space() = '$contactName']")->
-                               descendantOf(self::contactsMenu())->
-                               describedAs($contactName . " contact in Contacts menu");
-       }
-
-       /**
-        * @When I open the Contacts menu
-        */
-       public function iOpenTheContactsMenu() {
-               $this->actor->find(self::contactsMenuButton(), 10)->click();
-       }
-
-       /**
-        * @When I search for the user :user
-        */
-       public function iSearchForTheUser($user) {
-               $this->actor->find(self::contactsMenuSearchInput(), 10)->setValue($user);
-       }
-
-       /**
-        * @Then I see that the Contacts menu is shown
-        */
-       public function iSeeThatTheContactsMenuIsShown() {
-               Assert::assertTrue(
-                       $this->actor->find(self::contactsMenu(), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the Contacts menu search input is shown
-        */
-       public function iSeeThatTheContactsMenuSearchInputIsShown() {
-               Assert::assertTrue(
-                       $this->actor->find(self::contactsMenuSearchInput(), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the no results message in the Contacts menu is shown
-        */
-       public function iSeeThatTheNoResultsMessageInTheContactsMenuIsShown() {
-               Assert::assertTrue(
-                       $this->actor->find(self::noResultsMessage(), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the contact :contactName in the Contacts menu is shown
-        */
-       public function iSeeThatTheContactInTheContactsMenuIsShown($contactName) {
-               Assert::assertTrue(
-                       $this->actor->find(self::menuItemFor($contactName), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the contact :contactName in the Contacts menu is not shown
-        */
-       public function iSeeThatTheContactInTheContactsMenuIsNotShown($contactName) {
-               $this->iSeeThatThecontactsMenuIsShown();
-
-               try {
-                       Assert::assertFalse(
-                               $this->actor->find(self::menuItemFor($contactName))->isVisible());
-               } catch (NoSuchElementException $exception) {
-               }
-       }
-
-       /**
-        * @Then I see that the contact :contactName in the Contacts menu is eventually not shown
-        */
-       public function iSeeThatTheContactInTheContactsMenuIsEventuallyNotShown($contactName) {
-               $this->iSeeThatThecontactsMenuIsShown();
-
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::menuItemFor($contactName),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The $contactName contact in Contacts menu is still shown after $timeout seconds");
-               }
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/DialogContext.php b/tests/acceptance/features/bootstrap/DialogContext.php
deleted file mode 100644 (file)
index 3deea2f..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class DialogContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function theDialog() {
-               return Locator::forThe()->css(".oc-dialog")->
-                       describedAs("The dialog");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function theDialogButton($text) {
-               return Locator::forThe()->xpath("//button[normalize-space() = \"$text\"]")->
-                       descendantOf(self::theDialog())->
-                       describedAs($text . " button of the dialog");
-       }
-
-       /**
-        * @Given I click the :text button of the confirmation dialog
-        */
-       public function iClickTheDialogButton($text) {
-               $this->actor->find(self::theDialogButton($text), 10)->click();
-       }
-
-       /**
-        * @Then I see that the confirmation dialog is shown
-        */
-       public function iSeeThatTheConfirmationDialogIsShown() {
-               if (!WaitFor::elementToBeEventuallyShown(
-                       $this->actor,
-                       self::theDialog(),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The confirmation dialog was not shown yet after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that the confirmation dialog is not shown
-        */
-       public function iSeeThatTheConfirmationDialogIsNotShown() {
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::theDialog(),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The confirmation dialog is still shown after $timeout seconds");
-               }
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/FeatureContext.php b/tests/acceptance/features/bootstrap/FeatureContext.php
deleted file mode 100644 (file)
index 72798ea..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-
-class FeatureContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @When I visit the Home page
-        */
-       public function iVisitTheHomePage() {
-               $this->actor->getSession()->visit($this->actor->locatePath("/"));
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/FileListAncestorSetter.php b/tests/acceptance/features/bootstrap/FileListAncestorSetter.php
deleted file mode 100644 (file)
index b87d1d7..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2018, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Hook\Scope\BeforeScenarioScope;
-
-/**
- * Helper trait to set the ancestor of the file list.
- *
- * The FileListContext provides steps to interact with and check the behaviour
- * of a file list. However, the FileListContext does not know the right file
- * list ancestor that has to be used by the file list steps; this has to be set
- * from other contexts, for example, when the Files app or the public page for a
- * shared folder is opened.
- *
- * Contexts that "know" that certain file list ancestor has to be used by the
- * FileListContext steps should use this trait and call
- * "setFileListAncestorForActor" when needed.
- */
-trait FileListAncestorSetter {
-       /**
-        * @var FileListContext
-        */
-       private $fileListContext;
-
-       /**
-        * @BeforeScenario
-        */
-       public function getSiblingFileListContext(BeforeScenarioScope $scope) {
-               $environment = $scope->getEnvironment();
-
-               $this->fileListContext = $environment->getContext("FileListContext");
-       }
-
-       /**
-        * Sets the file list ancestor to be used in the file list steps performed
-        * by the given actor.
-        *
-        * @param null|Locator $fileListAncestor the file list ancestor
-        * @param Actor $actor the actor
-        */
-       private function setFileListAncestorForActor($fileListAncestor, Actor $actor) {
-               $this->fileListContext->setFileListAncestorForActor($fileListAncestor, $actor);
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/FileListContext.php b/tests/acceptance/features/bootstrap/FileListContext.php
deleted file mode 100644 (file)
index 501bad7..0000000
+++ /dev/null
@@ -1,595 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2018, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class FileListContext implements Context, ActorAwareInterface {
-       /**
-        * @var Actor
-        */
-       private $actor;
-
-       /**
-        * @var array
-        */
-       private $fileListAncestorsByActor;
-
-       /**
-        * @var Locator
-        */
-       private $fileListAncestor;
-
-       /**
-        * @BeforeScenario
-        */
-       public function initializeFileListAncestors() {
-               $this->fileListAncestorsByActor = [];
-               $this->fileListAncestor = null;
-       }
-
-       /**
-        * @param Actor $actor
-        */
-       public function setCurrentActor(Actor $actor) {
-               $this->actor = $actor;
-
-               if (array_key_exists($actor->getName(), $this->fileListAncestorsByActor)) {
-                       $this->fileListAncestor = $this->fileListAncestorsByActor[$actor->getName()];
-               } else {
-                       $this->fileListAncestor = null;
-               }
-       }
-
-       /**
-        * Sets the file list ancestor to be used in the steps performed by the
-        * given actor from that point on (until changed again).
-        *
-        * This is meant to be called from other contexts, for example, when the
-        * Files app or the public page for a shared folder are opened.
-        *
-        * The FileListAncestorSetter trait can be used to reduce the boilerplate
-        * needed to set the file list ancestor from other contexts.
-        *
-        * @param null|Locator $fileListAncestor the file list ancestor
-        * @param Actor $actor the actor
-        */
-       public function setFileListAncestorForActor($fileListAncestor, Actor $actor) {
-               $this->fileListAncestorsByActor[$actor->getName()] = $fileListAncestor;
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function mainWorkingIcon($fileListAncestor) {
-               return Locator::forThe()->css(".mask.icon-loading")->
-                               descendantOf($fileListAncestor)->
-                               describedAs("Main working icon in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function breadcrumbs($fileListAncestor) {
-               return Locator::forThe()->css(".files-controls .breadcrumb")->
-                               descendantOf($fileListAncestor)->
-                               describedAs("Breadcrumbs in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function createMenuButton($fileListAncestor) {
-               return Locator::forThe()->css(".files-controls .button.new")->
-                               descendantOf($fileListAncestor)->
-                               describedAs("Create menu button in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function createMenuItemFor($fileListAncestor, $newType) {
-               return Locator::forThe()->xpath("//div[contains(concat(' ', normalize-space(@class), ' '), ' newFileMenu ')]//span[normalize-space() = '$newType']/ancestor::li")->
-                               descendantOf($fileListAncestor)->
-                               describedAs("Create $newType menu item in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function createNewFolderMenuItem($fileListAncestor) {
-               return self::createMenuItemFor($fileListAncestor, "New folder");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function createNewFolderMenuItemNameInput($fileListAncestor) {
-               return Locator::forThe()->css(".filenameform input[type=text]")->
-                               descendantOf(self::createNewFolderMenuItem($fileListAncestor))->
-                               describedAs("Name input in create new folder menu item in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function createNewFolderMenuItemConfirmButton($fileListAncestor) {
-               return Locator::forThe()->css(".filenameform input[type=submit]")->
-                               descendantOf(self::createNewFolderMenuItem($fileListAncestor))->
-                               describedAs("Confirm button in create new folder menu item in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function fileListHeader($fileListAncestor) {
-               return Locator::forThe()->css("thead")->
-                               descendantOf($fileListAncestor)->
-                               describedAs("Header in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function selectedFilesActionsMenuButton($fileListAncestor) {
-               return Locator::forThe()->css(".actions-selected")->
-                               descendantOf(self::fileListHeader($fileListAncestor))->
-                               describedAs("Selected files actions menu button in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function selectedFilesActionsMenu() {
-               return Locator::forThe()->css(".filesSelectMenu")->
-                               describedAs("Selected files actions menu in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function selectedFilesActionsMenuItemFor($itemText) {
-               return Locator::forThe()->xpath("//a[normalize-space() = '$itemText']")->
-                               descendantOf(self::selectedFilesActionsMenu())->
-                               describedAs($itemText . " item in selected files actions menu in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function moveOrCopySelectedFilesMenuItem() {
-               return self::selectedFilesActionsMenuItemFor("Move or copy");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function rowForFile($fileListAncestor, $fileName) {
-               return Locator::forThe()->xpath("//*[@class = 'files-fileList']//span[contains(concat(' ', normalize-space(@class), ' '), ' nametext ') and normalize-space() = '$fileName']/ancestor::tr")->
-                               descendantOf($fileListAncestor)->
-                               describedAs("Row for file $fileName in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function rowForFilePreceding($fileListAncestor, $fileName1, $fileName2) {
-               return Locator::forThe()->xpath("//preceding-sibling::tr//span[contains(concat(' ', normalize-space(@class), ' '), ' nametext ') and normalize-space() = '$fileName1']/ancestor::tr")->
-                               descendantOf(self::rowForFile($fileListAncestor, $fileName2))->
-                               describedAs("Row for file $fileName1 preceding $fileName2 in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function selectionCheckboxForFile($fileListAncestor, $fileName) {
-               // Note that the element that the user interacts with is the label, not
-               // the checbox itself.
-               return Locator::forThe()->css(".selection label")->
-                               descendantOf(self::rowForFile($fileListAncestor, $fileName))->
-                               describedAs("Selection checkbox for file $fileName in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function selectionCheckboxInputForFile($fileListAncestor, $fileName) {
-               return Locator::forThe()->css(".selection input[type=checkbox]")->
-                               descendantOf(self::rowForFile($fileListAncestor, $fileName))->
-                               describedAs("Selection checkbox input for file $fileName in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function favoriteMarkForFile($fileListAncestor, $fileName) {
-               return Locator::forThe()->css(".favorite-mark")->
-                               descendantOf(self::rowForFile($fileListAncestor, $fileName))->
-                               describedAs("Favorite mark for file $fileName in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function notFavoritedStateIconForFile($fileListAncestor, $fileName) {
-               return Locator::forThe()->css(".icon-star")->
-                               descendantOf(self::favoriteMarkForFile($fileListAncestor, $fileName))->
-                               describedAs("Not favorited state icon for file $fileName in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function favoritedStateIconForFile($fileListAncestor, $fileName) {
-               return Locator::forThe()->css(".icon-starred")->
-                               descendantOf(self::favoriteMarkForFile($fileListAncestor, $fileName))->
-                               describedAs("Favorited state icon for file $fileName in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function mainLinkForFile($fileListAncestor, $fileName) {
-               return Locator::forThe()->css(".name")->
-                               descendantOf(self::rowForFile($fileListAncestor, $fileName))->
-                               describedAs("Main link for file $fileName in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function renameInputForFile($fileListAncestor, $fileName) {
-               return Locator::forThe()->css("input.filename")->
-                               descendantOf(self::rowForFile($fileListAncestor, $fileName))->
-                               describedAs("Rename input for file $fileName in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function commentActionForFile($fileListAncestor, $fileName) {
-               return Locator::forThe()->css(".action-comment")->
-                               descendantOf(self::rowForFile($fileListAncestor, $fileName))->
-                               describedAs("Comment action for file $fileName in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareActionForFile($fileListAncestor, $fileName) {
-               return Locator::forThe()->css(".action-share")->
-                               descendantOf(self::rowForFile($fileListAncestor, $fileName))->
-                               describedAs("Share action for file $fileName in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function fileActionsMenuButtonForFile($fileListAncestor, $fileName) {
-               return Locator::forThe()->css(".action-menu")->
-                               descendantOf(self::rowForFile($fileListAncestor, $fileName))->
-                               describedAs("File actions menu button for file $fileName in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function fileActionsMenu() {
-               return Locator::forThe()->css(".fileActionsMenu")->
-                               describedAs("File actions menu in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function fileActionsMenuItemFor($itemText) {
-               return Locator::forThe()->xpath("//a[normalize-space() = '$itemText']")->
-                               descendantOf(self::fileActionsMenu())->
-                               describedAs($itemText . " item in file actions menu in file list");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function addToFavoritesMenuItem() {
-               return self::fileActionsMenuItemFor("Add to favorites");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function removeFromFavoritesMenuItem() {
-               return self::fileActionsMenuItemFor("Remove from favorites");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function detailsMenuItem() {
-               return self::fileActionsMenuItemFor("Details");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function renameMenuItem() {
-               return self::fileActionsMenuItemFor("Rename");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function moveOrCopyMenuItem() {
-               return self::fileActionsMenuItemFor("Move or copy");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function viewFileInFolderMenuItem() {
-               return self::fileActionsMenuItemFor("View in folder");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function deleteMenuItem() {
-               return self::fileActionsMenuItemFor("Delete");
-       }
-
-       /**
-        * @Given I create a new folder named :folderName
-        */
-       public function iCreateANewFolderNamed($folderName) {
-               $this->actor->find(self::createMenuButton($this->fileListAncestor), 10)->click();
-
-               $this->actor->find(self::createNewFolderMenuItem($this->fileListAncestor), 2)->click();
-               $this->actor->find(self::createNewFolderMenuItemNameInput($this->fileListAncestor), 2)->setValue($folderName);
-               $this->actor->find(self::createNewFolderMenuItemConfirmButton($this->fileListAncestor), 2)->click();
-       }
-
-       /**
-        * @Given I enter in the folder named :folderName
-        */
-       public function iEnterInTheFolderNamed($folderName) {
-               $this->actor->find(self::mainLinkForFile($this->fileListAncestor, $folderName), 10)->click();
-       }
-
-       /**
-        * @Given I select :fileName
-        */
-       public function iSelect($fileName) {
-               $this->iSeeThatIsNotSelected($fileName);
-
-               $this->actor->find(self::selectionCheckboxForFile($this->fileListAncestor, $fileName), 10)->click();
-       }
-
-       /**
-        * @Given I start the move or copy operation for the selected files
-        */
-       public function iStartTheMoveOrCopyOperationForTheSelectedFiles() {
-               $this->actor->find(self::selectedFilesActionsMenuButton($this->fileListAncestor), 10)->click();
-
-               $this->actor->find(self::moveOrCopySelectedFilesMenuItem(), 2)->click();
-       }
-
-       /**
-        * @Given I open the details view for :fileName
-        */
-       public function iOpenTheDetailsViewFor($fileName) {
-               $this->openFileActionsMenuForFile($fileName);
-
-               $this->actor->find(self::detailsMenuItem(), 2)->click();
-       }
-
-       /**
-        * @Given I rename :fileName1 to :fileName2
-        */
-       public function iRenameTo($fileName1, $fileName2) {
-               $this->openFileActionsMenuForFile($fileName1);
-
-               $this->actor->find(self::renameMenuItem(), 2)->click();
-
-               // For reference, due to a bug in the Firefox driver of Selenium and/or
-               // maybe in Firefox itself, as a range is selected in the rename input
-               // (the name of the file, without its extension) when the value is set
-               // the window must be in the foreground. Otherwise, if the window is in
-               // the background, instead of setting the value in the whole field it
-               // would be set only in the selected range.
-               // This should not be a problem, though, as the default behaviour is to
-               // bring the browser window to the foreground when switching to a
-               // different actor.
-               $this->actor->find(self::renameInputForFile($this->fileListAncestor, $fileName1), 10)->setValue($fileName2);
-       }
-
-       /**
-        * @Given I start the move or copy operation for :fileName
-        */
-       public function iStartTheMoveOrCopyOperationFor($fileName) {
-               $this->openFileActionsMenuForFile($fileName);
-
-               $this->actor->find(self::moveOrCopyMenuItem(), 2)->click();
-       }
-
-       /**
-        * @Given I mark :fileName as favorite
-        */
-       public function iMarkAsFavorite($fileName) {
-               $this->iSeeThatIsNotMarkedAsFavorite($fileName);
-
-               $this->openFileActionsMenuForFile($fileName);
-
-               $this->actor->find(self::addToFavoritesMenuItem(), 2)->click();
-       }
-
-       /**
-        * @Given I unmark :fileName as favorite
-        */
-       public function iUnmarkAsFavorite($fileName) {
-               $this->iSeeThatIsMarkedAsFavorite($fileName);
-
-               $this->openFileActionsMenuForFile($fileName);
-
-               $this->actor->find(self::removeFromFavoritesMenuItem(), 2)->click();
-       }
-
-       /**
-        * @When I view :fileName in folder
-        */
-       public function iViewInFolder($fileName) {
-               $this->openFileActionsMenuForFile($fileName);
-
-               $this->actor->find(self::viewFileInFolderMenuItem(), 2)->click();
-       }
-
-       /**
-        * @When I delete :fileName
-        */
-       public function iDelete($fileName) {
-               $this->openFileActionsMenuForFile($fileName);
-
-               $this->actor->find(self::deleteMenuItem(), 2)->click();
-       }
-
-       /**
-        * @When I open the unread comments for :fileName
-        */
-       public function iOpenTheUnreadCommentsFor($fileName) {
-               $this->actor->find(self::commentActionForFile($this->fileListAncestor, $fileName), 10)->click();
-       }
-
-       /**
-        * @Then I see that the file list is eventually loaded
-        */
-       public function iSeeThatTheFileListIsEventuallyLoaded() {
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::mainWorkingIcon($this->fileListAncestor),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The main working icon for the file list is still shown after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that the file list is currently in :path
-        */
-       public function iSeeThatTheFileListIsCurrentlyIn($path) {
-               // The text of the breadcrumbs is the text of all the crumbs separated
-               // by white spaces.
-               Assert::assertEquals(
-                       str_replace('/', ' ', $path), $this->actor->find(self::breadcrumbs($this->fileListAncestor), 10)->getText());
-       }
-
-       /**
-        * @Then I see that it is not possible to create new files
-        */
-       public function iSeeThatItIsNotPossibleToCreateNewFiles() {
-               // Once a file list is loaded the "Create" menu button is always in the
-               // DOM, so it is checked if it is visible or not.
-               Assert::assertFalse($this->actor->find(self::createMenuButton($this->fileListAncestor))->isVisible());
-       }
-
-       /**
-        * @Then I see that the file list contains a file named :fileName
-        */
-       public function iSeeThatTheFileListContainsAFileNamed($fileName) {
-               Assert::assertNotNull($this->actor->find(self::rowForFile($this->fileListAncestor, $fileName), 10));
-       }
-
-       /**
-        * @Then I see that the file list does not contain a file named :fileName
-        */
-       public function iSeeThatTheFileListDoesNotContainAFileNamed($fileName) {
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::rowForFile($this->fileListAncestor, $fileName),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The file list still contains a file named $fileName after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that :fileName1 precedes :fileName2 in the file list
-        */
-       public function iSeeThatPrecedesInTheFileList($fileName1, $fileName2) {
-               Assert::assertNotNull($this->actor->find(self::rowForFilePreceding($this->fileListAncestor, $fileName1, $fileName2), 10));
-       }
-
-       /**
-        * @Then I see that :fileName is not selected
-        */
-       public function iSeeThatIsNotSelected($fileName) {
-               Assert::assertFalse($this->actor->find(self::selectionCheckboxInputForFile($this->fileListAncestor, $fileName), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that :fileName is marked as favorite
-        */
-       public function iSeeThatIsMarkedAsFavorite($fileName) {
-               Assert::assertNotNull($this->actor->find(self::favoritedStateIconForFile($this->fileListAncestor, $fileName), 10));
-       }
-
-       /**
-        * @Then I see that :fileName is not marked as favorite
-        */
-       public function iSeeThatIsNotMarkedAsFavorite($fileName) {
-               Assert::assertNotNull($this->actor->find(self::notFavoritedStateIconForFile($this->fileListAncestor, $fileName), 10));
-       }
-
-       /**
-        * @Then I see that :fileName has unread comments
-        */
-       public function iSeeThatHasUnreadComments($fileName) {
-               Assert::assertTrue($this->actor->find(self::commentActionForFile($this->fileListAncestor, $fileName), 10)->isVisible());
-       }
-
-       private function waitForRowForFileToBeFullyOpaque($fileName) {
-               $actor = $this->actor;
-               $fileRowXpathExpression = $this->actor->find(self::rowForFile($this->fileListAncestor, $fileName), 10)->getWrappedElement()->getXpath();
-
-               $fileRowIsFullyOpaqueCallback = function () use ($actor, $fileRowXpathExpression) {
-                       $opacity = $actor->getSession()->evaluateScript("return window.getComputedStyle(document.evaluate(\"" . $fileRowXpathExpression . "\", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue).opacity;");
-                       if ($opacity === "1") {
-                               return true;
-                       }
-
-                       return false;
-               };
-
-               if (!Utils::waitFor($fileRowIsFullyOpaqueCallback, $timeout = 2 * $this->actor->getFindTimeoutMultiplier(), $timeoutStep = 1)) {
-                       Assert::fail("The row for file $fileName in file list is not fully opaque after $timeout seconds");
-               }
-       }
-
-       private function openFileActionsMenuForFile($fileName) {
-               // When a row is added to the file list the opacity of the file row is
-               // animated from transparent to fully opaque. As the file actions menu
-               // is a descendant of the row but overflows it when the row is not fully
-               // opaque clicks on the menu entries "fall-through" and are received
-               // instead by the rows behind. Therefore it should be waited until the
-               // row of the file is fully opaque before using the menu.
-               $this->waitForRowForFileToBeFullyOpaque($fileName);
-
-               $this->actor->find(self::fileActionsMenuButtonForFile($this->fileListAncestor, $fileName), 10)->click();
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/FilesAppContext.php b/tests/acceptance/features/bootstrap/FilesAppContext.php
deleted file mode 100644 (file)
index b73b838..0000000
+++ /dev/null
@@ -1,416 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class FilesAppContext implements Context, ActorAwareInterface {
-       use ActorAware;
-       use FileListAncestorSetter;
-
-       /**
-        * @return array
-        */
-       public static function sections() {
-               return [ "All files" => "files",
-                       "Recent" => "recent",
-                       "Favorites" => "favorites",
-                       "Shared with you" => "sharingin",
-                       "Shared with others" => "sharingout",
-                       "Shared by link" => "sharinglinks",
-                       "Tags" => "systemtagsfilter",
-                       "Deleted files" => "trashbin" ];
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function appMenu() {
-               return Locator::forThe()->css("header nav.app-menu")->
-                               describedAs("App menu in header");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function filesItemInAppMenu() {
-               return Locator::forThe()->xpath("//li[@data-app-id = 'files']")->
-                               descendantOf(self::appMenu())->
-                               describedAs("Files item in app menu in header");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function mainViewForSection($section) {
-               $sectionId = self::sections()[$section];
-
-               return Locator::forThe()->id("app-content-$sectionId")->
-                               describedAs("Main view for section $section in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function currentSectionMainView() {
-               return Locator::forThe()->xpath("//*[starts-with(@id, 'app-content-') and not(@id = 'app-content-vue') and not(contains(concat(' ', normalize-space(@class), ' '), ' hidden '))]")->
-                               describedAs("Current section main view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function detailsView() {
-               return Locator::forThe()->xpath("//*[@id=\"app-sidebar\" or contains(@class, 'app-sidebar')]")->
-                               describedAs("Details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function closeDetailsViewButton() {
-               return Locator::forThe()->css(".app-sidebar__close")->
-                               descendantOf(self::detailsView())->
-                               describedAs("Close details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function fileNameInDetailsView() {
-               return Locator::forThe()->css(".app-sidebar-header__title")->
-                               descendantOf(self::detailsView())->
-                               describedAs("File name in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function favoriteActionInFileDetailsInDetailsView() {
-               return Locator::forThe()->css(".app-sidebar-header__star")->
-                               descendantOf(self::fileDetailsInDetailsView())->
-                               describedAs("Favorite action in file details in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function notFavoritedStateIconInFileDetailsInDetailsView() {
-               return Locator::forThe()->css(".star-outline-icon")->
-                               descendantOf(self::favoriteActionInFileDetailsInDetailsView())->
-                               describedAs("Not favorited state icon in file details in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function favoritedStateIconInFileDetailsInDetailsView() {
-               return Locator::forThe()->css(".star-icon")->
-                               descendantOf(self::favoriteActionInFileDetailsInDetailsView())->
-                               describedAs("Favorited state icon in file details in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function fileDetailsInDetailsViewWithText($fileDetailsText) {
-               return Locator::forThe()->xpath("//span[normalize-space() = '$fileDetailsText']")->
-                               descendantOf(self::fileDetailsInDetailsView())->
-                               describedAs("File details with text \"$fileDetailsText\" in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function fileDetailsInDetailsView() {
-               return Locator::forThe()->css(".app-sidebar-header__desc")->
-                               descendantOf(self::detailsView())->
-                               describedAs("File details in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function inputFieldForTagsInDetailsView() {
-               return Locator::forThe()->css(".systemTagsInfoView")->
-                               descendantOf(self::detailsView())->
-                               describedAs("Input field for tags in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function itemInInputFieldForTagsInDetailsViewForTag($tag) {
-               return Locator::forThe()->xpath("//span[normalize-space() = '$tag']")->
-                               descendantOf(self::inputFieldForTagsInDetailsView())->
-                               describedAs("Item in input field for tags in details view for tag $tag in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function itemInDropdownForTag($tag) {
-               return Locator::forThe()->xpath("//*[contains(concat(' ', normalize-space(@class), ' '), ' select2-result-label ')]//span[normalize-space() = '$tag']/ancestor::li")->
-                               descendantOf(self::select2Dropdown())->
-                               describedAs("Item in dropdown for tag $tag in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function checkmarkInItemInDropdownForTag($tag) {
-               return Locator::forThe()->css(".checkmark")->
-                               descendantOf(self::itemInDropdownForTag($tag))->
-                               describedAs("Checkmark in item in dropdown for tag $tag in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function select2Dropdown() {
-               return Locator::forThe()->css("#select2-drop")->
-                               describedAs("Select2 dropdown in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function tabHeaderInDetailsViewNamed($tabHeaderName) {
-               return Locator::forThe()->xpath("//span[contains(@class, 'app-sidebar-tabs__tab') and normalize-space() = '$tabHeaderName']")->
-                               descendantOf(self::tabHeadersInDetailsView())->
-                               describedAs("Tab header named $tabHeaderName in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function tabHeadersInDetailsView() {
-               return Locator::forThe()->css(".app-sidebar-tabs__nav")->
-                               descendantOf(self::detailsView())->
-                               describedAs("Tab headers in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function tabInDetailsViewNamed($tabName) {
-               return Locator::forThe()->xpath("//div[contains(concat(' ', normalize-space(@class), ' '), ' app-sidebar-tabs__content ')]/section[@aria-labelledby = '$tabName' and @role = 'tabpanel']")->
-                               descendantOf(self::detailsView())->
-                               describedAs("Tab named $tabName in details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function loadingIconForTabInDetailsViewNamed($tabName) {
-               return Locator::forThe()->css(".icon-loading")->
-                               descendantOf(self::tabInDetailsViewNamed($tabName))->
-                               describedAs("Loading icon for tab named $tabName in details view in Files app");
-       }
-
-       /**
-        * @Given I open the Files app
-        */
-       public function iOpenTheFilesApp() {
-               $this->actor->find(self::filesItemInAppMenu(), 10)->click();
-       }
-
-       /**
-        * @Given I close the details view
-        */
-       public function iCloseTheDetailsView() {
-               $this->actor->find(self::closeDetailsViewButton(), 10)->click();
-       }
-
-       /**
-        * @Given I open the input field for tags in the details view
-        */
-       public function iOpenTheInputFieldForTagsInTheDetailsView() {
-               $this->actor->find(self::fileDetailsInDetailsViewWithText("Tags"), 10)->click();
-       }
-
-       /**
-        * @Given I open the :tabName tab in the details view
-        */
-       public function iOpenTheTabInTheDetailsView($tabName) {
-               $this->actor->find(self::tabHeaderInDetailsViewNamed($tabName), 10)->click();
-       }
-
-       /**
-        * @When I mark the file as favorite in the details view
-        */
-       public function iMarkTheFileAsFavoriteInTheDetailsView() {
-               $this->iSeeThatTheFileIsNotMarkedAsFavoriteInTheDetailsView();
-
-               $this->actor->find(self::favoriteActionInFileDetailsInDetailsView(), 10)->click();
-       }
-
-       /**
-        * @When I unmark the file as favorite in the details view
-        */
-       public function iUnmarkTheFileAsFavoriteInTheDetailsView() {
-               $this->iSeeThatTheFileIsMarkedAsFavoriteInTheDetailsView();
-
-               $this->actor->find(self::favoriteActionInFileDetailsInDetailsView(), 10)->click();
-       }
-
-       /**
-        * @When I check the tag :tag in the dropdown for tags in the details view
-        */
-       public function iCheckTheTagInTheDropdownForTagsInTheDetailsView($tag) {
-               $this->iSeeThatTheTagInTheDropdownForTagsInTheDetailsViewIsNotChecked($tag);
-
-               $this->actor->find(self::itemInDropdownForTag($tag), 10)->click();
-       }
-
-       /**
-        * @When I uncheck the tag :tag in the dropdown for tags in the details view
-        */
-       public function iUncheckTheTagInTheDropdownForTagsInTheDetailsView($tag) {
-               $this->iSeeThatTheTagInTheDropdownForTagsInTheDetailsViewIsChecked($tag);
-
-               $this->actor->find(self::itemInDropdownForTag($tag), 10)->click();
-       }
-
-       /**
-        * @Then I see that the current page is the Files app
-        */
-       public function iSeeThatTheCurrentPageIsTheFilesApp() {
-               Assert::assertStringStartsWith(
-                       $this->actor->locatePath("/apps/files/"),
-                       $this->actor->getSession()->getCurrentUrl());
-
-               $this->setFileListAncestorForActor(self::currentSectionMainView(), $this->actor);
-       }
-
-       /**
-        * @Then I see that the details view is open
-        */
-       public function iSeeThatTheDetailsViewIsOpen() {
-               // The sidebar always exists in the DOM, so it has to be explicitly
-               // waited for it to be visible instead of relying on the implicit wait
-               // made to find the element.
-               if (!WaitFor::elementToBeEventuallyShown(
-                       $this->actor,
-                       self::detailsView(),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The details view is not open yet after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that the details view is closed
-        */
-       public function iSeeThatTheDetailsViewIsClosed() {
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::detailsView(),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The details view is not closed yet after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that the file name shown in the details view is :fileName
-        */
-       public function iSeeThatTheFileNameShownInTheDetailsViewIs($fileName) {
-               Assert::assertEquals(
-                       $this->actor->find(self::fileNameInDetailsView(), 10)->getText(), $fileName);
-       }
-
-       /**
-        * @Then I see that the file is marked as favorite in the details view
-        */
-       public function iSeeThatTheFileIsMarkedAsFavoriteInTheDetailsView() {
-               Assert::assertNotNull(
-                       $this->actor->find(self::favoritedStateIconInFileDetailsInDetailsView(), 10));
-       }
-
-       /**
-        * @Then I see that the file is not marked as favorite in the details view
-        */
-       public function iSeeThatTheFileIsNotMarkedAsFavoriteInTheDetailsView() {
-               Assert::assertNotNull(
-                       $this->actor->find(self::notFavoritedStateIconInFileDetailsInDetailsView(), 10));
-       }
-
-       /**
-        * @Then I see that the input field for tags in the details view is shown
-        */
-       public function iSeeThatTheInputFieldForTagsInTheDetailsViewIsShown() {
-               Assert::assertTrue(
-                       $this->actor->find(self::inputFieldForTagsInDetailsView(), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the input field for tags in the details view contains the tag :tag
-        */
-       public function iSeeThatTheInputFieldForTagsInTheDetailsViewContainsTheTag($tag) {
-               Assert::assertTrue(
-                       $this->actor->find(self::itemInInputFieldForTagsInDetailsViewForTag($tag), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the input field for tags in the details view does not contain the tag :tag
-        */
-       public function iSeeThatTheInputFieldForTagsInTheDetailsViewDoesNotContainTheTag($tag) {
-               $this->iSeeThatTheInputFieldForTagsInTheDetailsViewIsShown();
-
-               try {
-                       Assert::assertFalse(
-                               $this->actor->find(self::itemInInputFieldForTagsInDetailsViewForTag($tag))->isVisible());
-               } catch (NoSuchElementException $exception) {
-               }
-       }
-
-       /**
-        * @Then I see that the tag :tag in the dropdown for tags in the details view is checked
-        */
-       public function iSeeThatTheTagInTheDropdownForTagsInTheDetailsViewIsChecked($tag) {
-               Assert::assertTrue(
-                       $this->actor->find(self::checkmarkInItemInDropdownForTag($tag), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the tag :tag in the dropdown for tags in the details view is not checked
-        */
-       public function iSeeThatTheTagInTheDropdownForTagsInTheDetailsViewIsNotChecked($tag) {
-               Assert::assertTrue(
-                       $this->actor->find(self::itemInDropdownForTag($tag), 10)->isVisible());
-
-               Assert::assertFalse(
-                       $this->actor->find(self::checkmarkInItemInDropdownForTag($tag))->isVisible());
-       }
-
-       /**
-        * @When I see that the :tabName tab in the details view is eventually loaded
-        */
-       public function iSeeThatTheTabInTheDetailsViewIsEventuallyLoaded($tabName) {
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::loadingIconForTabInDetailsViewNamed($tabName),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The $tabName tab in the details view has not been loaded after $timeout seconds");
-               }
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/FilesAppSharingContext.php b/tests/acceptance/features/bootstrap/FilesAppSharingContext.php
deleted file mode 100644 (file)
index 3c2b4a8..0000000
+++ /dev/null
@@ -1,811 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2018, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-use WebDriver\Key;
-
-class FilesAppSharingContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function sharedByLabel() {
-               return Locator::forThe()->css(".sharing-entry__reshare")->
-                               descendantOf(FilesAppContext::detailsView())->
-                               describedAs("Shared by label in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareWithInput() {
-               return Locator::forThe()->css(".sharing-search__input input")->
-                               descendantOf(FilesAppContext::detailsView())->
-                               describedAs("Share with input in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareWithInputResults() {
-               return Locator::forThe()->css(".vs__dropdown-menu")->
-                               describedAs("Share with input results list in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareWithInputResult($result) {
-               return Locator::forThe()->xpath("//li//span[normalize-space() = '$result']/ancestor::li")->
-                               descendantOf(self::shareWithInputResults())->
-                               describedAs("Share with input result from the results list in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareeList() {
-               return Locator::forThe()->css(".sharing-sharee-list")->
-                               descendantOf(FilesAppContext::detailsView())->
-                               describedAs("Sharee list in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function sharedWithRow($sharedWithName) {
-               // "username" class is used for any type of share, not only for shares
-               // with users.
-               return Locator::forThe()->xpath("//li[contains(concat(' ', normalize-space(@class), ' '), ' sharing-entry ')]//span[normalize-space() = '$sharedWithName']/ancestor::li")->
-                               descendantOf(self::shareeList())->
-                               describedAs("Shared with $sharedWithName row in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareWithMenuTrigger($sharedWithName) {
-               return Locator::forThe()->css(".sharing-entry__actions button")->
-                               descendantOf(self::sharedWithRow($sharedWithName))->
-                               describedAs("Share with $sharedWithName menu trigger in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareWithMenuButton($sharedWithName) {
-               return Locator::forThe()->css(".action-item__menutoggle")->
-                               descendantOf(self::shareWithMenuTrigger($sharedWithName))->
-                               describedAs("Share with $sharedWithName menu button in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareWithMenu($sharedWithName, $shareWithMenuTriggerElement) {
-               return Locator::forThe()->xpath("//*[@id = " . $shareWithMenuTriggerElement->getWrappedElement()->getXpath() . "/@aria-describedby]")->
-                               describedAs("Share with $sharedWithName menu in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function permissionCheckboxFor($sharedWithName, $shareWithMenuTriggerElement, $itemText) {
-               // forThe()->checkbox($itemText) can not be used here; that would return
-               // the checkbox itself, but the element that the user interacts with is
-               // the label.
-               return Locator::forThe()->xpath("//label[normalize-space() = '$itemText']")->
-                               descendantOf(self::shareWithMenu($sharedWithName, $shareWithMenuTriggerElement))->
-                               describedAs("$itemText checkbox in the share with $sharedWithName menu in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function permissionCheckboxInputFor($sharedWithName, $shareWithMenuTriggerElement, $itemText) {
-               return Locator::forThe()->checkbox($itemText)->
-                               descendantOf(self::shareWithMenu($sharedWithName, $shareWithMenuTriggerElement))->
-                               describedAs("$itemText checkbox input in the share with $sharedWithName menu in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function canEditCheckbox($sharedWithName, $shareWithMenuTriggerElement) {
-               return self::permissionCheckboxFor($sharedWithName, $shareWithMenuTriggerElement, 'Allow editing');
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function canEditCheckboxInput($sharedWithName, $shareWithMenuTriggerElement) {
-               return self::permissionCheckboxInputFor($sharedWithName, $shareWithMenuTriggerElement, 'Allow editing');
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function canCreateCheckbox($sharedWithName, $shareWithMenuTriggerElement) {
-               return self::permissionCheckboxFor($sharedWithName, $shareWithMenuTriggerElement, 'Allow creating');
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function canCreateCheckboxInput($sharedWithName, $shareWithMenuTriggerElement) {
-               return self::permissionCheckboxInputFor($sharedWithName, $shareWithMenuTriggerElement, 'Allow creating');
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function canReshareCheckbox($sharedWithName, $shareWithMenuTriggerElement) {
-               return self::permissionCheckboxFor($sharedWithName, $shareWithMenuTriggerElement, 'Allow resharing');
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function canReshareCheckboxInput($sharedWithName, $shareWithMenuTriggerElement) {
-               return self::permissionCheckboxInputFor($sharedWithName, $shareWithMenuTriggerElement, 'Allow resharing');
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function unshareButton($sharedWithName, $shareWithMenuTriggerElement) {
-               return Locator::forThe()->xpath("//li[contains(concat(' ', normalize-space(@class), ' '), ' action ')]//button[normalize-space() = 'Unshare']")->
-                               descendantOf(self::shareWithMenu($sharedWithName, $shareWithMenuTriggerElement))->
-                               describedAs("Unshare button in the share with $sharedWithName menu in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareLinkRow() {
-               return Locator::forThe()->css(".sharing-link-list .sharing-entry__link:first-child")->
-                               descendantOf(FilesAppContext::detailsView())->
-                               describedAs("Share link row in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareLinkAddNewButton() {
-               // When there is no link share the "Add new share" item is shown instead
-               // of the menu button as a direct child of ".share-menu".
-               return Locator::forThe()->css(".action-item.new-share-link")->
-                               descendantOf(self::shareLinkRow())->
-                               describedAs("Add new share link button in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function copyLinkButton() {
-               return Locator::forThe()->css("a.sharing-entry__copy")->
-                               descendantOf(self::shareLinkRow())->
-                               describedAs("Copy link button in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareLinkMenuTrigger() {
-               return Locator::forThe()->css(".sharing-entry__actions .action-item__menutoggle")->
-                               descendantOf(self::shareLinkRow())->
-                               describedAs("Share link menu trigger in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareLinkSingleUnshareAction() {
-               return Locator::forThe()->css(".sharing-entry__actions.icon-close")->
-                       descendantOf(self::shareLinkRow())->
-                       describedAs("Unshare link single action in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareLinkMenuButton() {
-               return Locator::forThe()->css(".action-item__menutoggle")->
-                               descendantOf(self::shareLinkMenuTrigger())->
-                               describedAs("Share link menu button in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareLinkMenu($shareLinkMenuTriggerElement) {
-               return Locator::forThe()->xpath("//*[@id = " . $shareLinkMenuTriggerElement->getWrappedElement()->getXpath() . "/@aria-describedby]")->
-                               describedAs("Share link menu in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function hideDownloadCheckbox($shareLinkMenuTriggerElement) {
-               // forThe()->checkbox("Hide download") can not be used here; that would
-               // return the checkbox itself, but the element that the user interacts
-               // with is the label.
-               return Locator::forThe()->xpath("//label[normalize-space() = 'Hide download']")->
-                               descendantOf(self::shareLinkMenu($shareLinkMenuTriggerElement))->
-                               describedAs("Hide download checkbox in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function hideDownloadCheckboxInput($shareLinkMenuTriggerElement) {
-               return Locator::forThe()->checkbox("Hide download")->
-                               descendantOf(self::shareLinkMenu($shareLinkMenuTriggerElement))->
-                               describedAs("Hide download checkbox input in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function allowUploadAndEditingRadioButton($shareLinkMenuTriggerElement) {
-               // forThe()->radio("Allow upload and editing") can not be used here;
-               // that would return the radio button itself, but the element that the
-               // user interacts with is the label.
-               return Locator::forThe()->xpath("//label[normalize-space() = 'Allow upload and editing']")->
-                               descendantOf(self::shareLinkMenu($shareLinkMenuTriggerElement))->
-                               describedAs("Allow upload and editing radio button in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function passwordProtectCheckbox($shareLinkMenuTriggerElement) {
-               // forThe()->checkbox("Password protect") can not be used here; that
-               // would return the checkbox itself, but the element that the user
-               // interacts with is the label.
-               return Locator::forThe()->xpath("//label[normalize-space() = 'Password protect']")->
-                               descendantOf(self::shareLinkMenu($shareLinkMenuTriggerElement))->
-                               describedAs("Password protect checkbox in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function passwordProtectCheckboxInput($shareLinkMenuTriggerElement) {
-               return Locator::forThe()->checkbox("Password protect")->
-                               descendantOf(self::shareLinkMenu($shareLinkMenuTriggerElement))->
-                               describedAs("Password protect checkbox input in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function passwordProtectField($shareLinkMenuTriggerElement) {
-               return Locator::forThe()->css(".share-link-password input.input-field__input")->descendantOf(self::shareLinkMenu($shareLinkMenuTriggerElement))->
-                               describedAs("Password protect field in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function disabledPasswordProtectField($shareLinkMenuTriggerElement) {
-               return Locator::forThe()->css(".share-link-password input.input-field__input[disabled]")->descendantOf(self::shareLinkMenu($shareLinkMenuTriggerElement))->
-                               describedAs("Disabled password protect field in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function passwordProtectByTalkCheckbox($shareLinkMenuTriggerElement) {
-               // forThe()->checkbox("Password protect by Talk") can not be used here;
-               // that would return the checkbox itself, but the element that the user
-               // interacts with is the label.
-               return Locator::forThe()->xpath("//label[normalize-space() = 'Password protect by Talk']")->
-                               descendantOf(self::shareLinkMenu($shareLinkMenuTriggerElement))->
-                               describedAs("Password protect by Talk checkbox in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function passwordProtectByTalkCheckboxInput($shareLinkMenuTriggerElement) {
-               return Locator::forThe()->checkbox("Password protect by Talk")->
-                               descendantOf(self::shareLinkMenu($shareLinkMenuTriggerElement))->
-                               describedAs("Password protect by Talk checkbox input in the details view in Files app");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function unshareLinkButton($shareLinkMenuTriggerElement) {
-               return Locator::forThe()->xpath("//li[contains(concat(' ', normalize-space(@class), ' '), ' action ')]//button[normalize-space() = 'Unshare']")->
-                               descendantOf(self::shareLinkMenu($shareLinkMenuTriggerElement))->
-                               describedAs("Unshare link button in the details view in Files app");
-       }
-
-       /**
-        * @Given I share the link for :fileName
-        */
-       public function iShareTheLinkFor($fileName) {
-               $this->actor->find(FileListContext::shareActionForFile(FilesAppContext::currentSectionMainView(), $fileName), 10)->click();
-
-               $this->actor->find(self::shareLinkAddNewButton(), 5)->click();
-       }
-
-       /**
-        * @Given I share :fileName with :shareWithName
-        */
-       public function iShareWith($fileName, $shareWithName) {
-               $this->actor->find(FileListContext::shareActionForFile(FilesAppContext::currentSectionMainView(), $fileName), 10)->click();
-
-               $this->actor->find(self::shareWithInput(), 5)->setValue($shareWithName);
-               // "setValue()" ends sending a tab, which unfocuses the input and causes
-               // the results to be hidden, so the input needs to be clicked to show
-               // the results again.
-               $this->actor->find(self::shareWithInput())->click();
-               $this->actor->find(self::shareWithInputResult($shareWithName), 5)->click();
-       }
-
-       /**
-        * @Given I write down the shared link
-        */
-       public function iWriteDownTheSharedLink() {
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 2);
-
-               // Close the share link menu if it is open to ensure that it does not
-               // cover the copy link button.
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::shareLinkMenu($shareLinkMenuTriggerElement),
-                       $timeout = 2 * $this->actor->getFindTimeoutMultiplier())) {
-                       // It may not be possible to click on the menu button (due to the
-                       // menu itself covering it), so "Enter" key is pressed instead.
-                       $this->actor->find(self::shareLinkMenuButton(), 2)->getWrappedElement()->keyPress(13);
-               }
-
-               $this->actor->find(self::copyLinkButton(), 10)->click();
-
-               // Clicking on the menu item copies the link to the clipboard, but it is
-               // not possible to access that value from the acceptance tests. Due to
-               // this the value of the attribute that holds the URL is used instead.
-               $this->actor->getSharedNotebook()["shared link"] = $this->actor->find(self::copyLinkButton(), 2)->getWrappedElement()->getAttribute("href");
-       }
-
-       /**
-        * @When I set the download of the shared link as hidden
-        */
-       public function iSetTheDownloadOfTheSharedLinkAsHidden() {
-               $this->showShareLinkMenuIfNeeded();
-
-               $this->iSeeThatTheDownloadOfTheLinkShareIsShown();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 2);
-               $this->actor->find(self::hideDownloadCheckbox($shareLinkMenuTriggerElement), 2)->click();
-       }
-
-       /**
-        * @When I set the download of the shared link as shown
-        */
-       public function iSetTheDownloadOfTheSharedLinkAsShown() {
-               $this->showShareLinkMenuIfNeeded();
-
-               $this->iSeeThatTheDownloadOfTheLinkShareIsHidden();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 2);
-               $this->actor->find(self::hideDownloadCheckbox($shareLinkMenuTriggerElement), 2)->click();
-       }
-
-       /**
-        * @When I set the shared link as editable
-        */
-       public function iSetTheSharedLinkAsEditable() {
-               $this->showShareLinkMenuIfNeeded();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 2);
-               $this->actor->find(self::allowUploadAndEditingRadioButton($shareLinkMenuTriggerElement), 2)->click();
-       }
-
-       /**
-        * @When I protect the shared link with the password :password
-        */
-       public function iProtectTheSharedLinkWithThePassword($password) {
-               $this->showShareLinkMenuIfNeeded();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 2);
-               $this->actor->find(self::passwordProtectCheckbox($shareLinkMenuTriggerElement), 2)->click();
-
-               $this->actor->find(self::passwordProtectField($shareLinkMenuTriggerElement), 2)->setValue($password . Key::ENTER);
-       }
-
-       /**
-        * @When I set the password of the shared link as protected by Talk
-        */
-       public function iSetThePasswordOfTheSharedLinkAsProtectedByTalk() {
-               $this->showShareLinkMenuIfNeeded();
-
-               $this->iSeeThatThePasswordOfTheLinkShareIsNotProtectedByTalk();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 2);
-               $this->actor->find(self::passwordProtectByTalkCheckbox($shareLinkMenuTriggerElement), 2)->click();
-       }
-
-       /**
-        * @When I set the password of the shared link as not protected by Talk
-        */
-       public function iSetThePasswordOfTheSharedLinkAsNotProtectedByTalk() {
-               $this->showShareLinkMenuIfNeeded();
-
-               $this->iSeeThatThePasswordOfTheLinkShareIsProtectedByTalk();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 2);
-               $this->actor->find(self::passwordProtectByTalkCheckbox($shareLinkMenuTriggerElement), 2)->click();
-       }
-
-       /**
-        * @When I set the share with :shareWithName as not editable
-        */
-       public function iSetTheShareWithAsNotEditable($shareWithName) {
-               $this->showShareWithMenuIfNeeded($shareWithName);
-
-               $this->iSeeThatCanEditTheShare($shareWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($shareWithName), 2);
-               $this->actor->find(self::canEditCheckbox($shareWithName, $shareWithMenuTriggerElement), 2)->click();
-       }
-
-       /**
-        * @When I set the share with :shareWithName as not creatable
-        */
-       public function iSetTheShareWithAsNotCreatable($shareWithName) {
-               $this->showShareWithMenuIfNeeded($shareWithName);
-
-               $this->iSeeThatCanCreateInTheShare($shareWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($shareWithName), 2);
-               $this->actor->find(self::canCreateCheckbox($shareWithName, $shareWithMenuTriggerElement), 2)->click();
-       }
-
-       /**
-        * @When I set the share with :shareWithName as not reshareable
-        */
-       public function iSetTheShareWithAsNotReshareable($shareWithName) {
-               $this->showShareWithMenuIfNeeded($shareWithName);
-
-               $this->iSeeThatCanReshareTheShare($shareWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($shareWithName), 2);
-               $this->actor->find(self::canReshareCheckbox($shareWithName, $shareWithMenuTriggerElement), 2)->click();
-       }
-
-       /**
-        * @When I unshare the share with :shareWithName
-        */
-       public function iUnshareTheFileWith($shareWithName) {
-               $this->showShareWithMenuIfNeeded($shareWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($shareWithName), 2);
-               $this->actor->find(self::unshareButton($shareWithName, $shareWithMenuTriggerElement), 2)->click();
-       }
-
-       /**
-        * @When I unshare the link share
-        */
-       public function iUnshareTheLink() {
-               try {
-                       $this->actor->find(self::shareLinkSingleUnshareAction(), 2)->click();
-               } catch (NoSuchElementException $e) {
-                       $this->showShareLinkMenuIfNeeded();
-                       $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 2);
-                       $this->actor->find(self::unshareLinkButton($shareLinkMenuTriggerElement), 2)->click();
-               }
-       }
-
-       /**
-        * @Then I see that the file is shared with me by :sharedByName
-        */
-       public function iSeeThatTheFileIsSharedWithMeBy($sharedByName) {
-               Assert::assertEquals(
-                       $this->actor->find(self::sharedByLabel(), 10)->getText(), "Shared with you by $sharedByName");
-       }
-
-       /**
-        * @Then I see that the file is shared with :sharedWithName
-        */
-       public function iSeeThatTheFileIsSharedWith($sharedWithName) {
-               Assert::assertTrue(
-                       $this->actor->find(self::sharedWithRow($sharedWithName), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the file is not shared with :sharedWithName
-        */
-       public function iSeeThatTheFileIsNotSharedWith($sharedWithName) {
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::sharedWithRow($sharedWithName),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The shared with $sharedWithName row is still shown after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that resharing the file is not allowed
-        */
-       public function iSeeThatResharingTheFileIsNotAllowed() {
-               Assert::assertEquals(
-                       $this->actor->find(self::shareWithInput(), 10)->getWrappedElement()->getAttribute("disabled"), "disabled");
-               Assert::assertEquals(
-                       $this->actor->find(self::shareWithInput(), 10)->getWrappedElement()->getAttribute("placeholder"), "Resharing is not allowed");
-       }
-
-       /**
-        * @Then I see that resharing the file by link is not available
-        */
-       public function iSeeThatResharingTheFileByLinkIsNotAvailable() {
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::shareLinkAddNewButton(),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The add new share link button is still shown after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that :sharedWithName can not be allowed to edit the share
-        */
-       public function iSeeThatCanNotBeAllowedToEditTheShare($sharedWithName) {
-               $this->showShareWithMenuIfNeeded($sharedWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($sharedWithName), 10);
-               Assert::assertEquals(
-                       $this->actor->find(self::canEditCheckboxInput($sharedWithName, $shareWithMenuTriggerElement), 10)->getWrappedElement()->getAttribute("disabled"), "disabled");
-       }
-
-       /**
-        * @Then I see that :sharedWithName can edit the share
-        */
-       public function iSeeThatCanEditTheShare($sharedWithName) {
-               $this->showShareWithMenuIfNeeded($sharedWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($sharedWithName), 10);
-               Assert::assertTrue(
-                       $this->actor->find(self::canEditCheckboxInput($sharedWithName, $shareWithMenuTriggerElement), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that :sharedWithName can not edit the share
-        */
-       public function iSeeThatCanNotEditTheShare($sharedWithName) {
-               $this->showShareWithMenuIfNeeded($sharedWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($sharedWithName), 10);
-               Assert::assertFalse(
-                       $this->actor->find(self::canEditCheckboxInput($sharedWithName, $shareWithMenuTriggerElement), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that :sharedWithName can not be allowed to create in the share
-        */
-       public function iSeeThatCanNotBeAllowedToCreateInTheShare($sharedWithName) {
-               $this->showShareWithMenuIfNeeded($sharedWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($sharedWithName), 10);
-               Assert::assertEquals(
-                       $this->actor->find(self::canCreateCheckboxInput($sharedWithName, $shareWithMenuTriggerElement), 10)->getWrappedElement()->getAttribute("disabled"), "disabled");
-       }
-
-       /**
-        * @Then I see that :sharedWithName can create in the share
-        */
-       public function iSeeThatCanCreateInTheShare($sharedWithName) {
-               $this->showShareWithMenuIfNeeded($sharedWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($sharedWithName), 10);
-               Assert::assertTrue(
-                       $this->actor->find(self::canCreateCheckboxInput($sharedWithName, $shareWithMenuTriggerElement), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that :sharedWithName can not create in the share
-        */
-       public function iSeeThatCanNotCreateInTheShare($sharedWithName) {
-               $this->showShareWithMenuIfNeeded($sharedWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($sharedWithName), 10);
-               Assert::assertFalse(
-                       $this->actor->find(self::canCreateCheckboxInput($sharedWithName, $shareWithMenuTriggerElement), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that resharing for :sharedWithName is not available
-        */
-       public function iSeeThatResharingForIsNotAvailable($sharedWithName) {
-               $this->showShareWithMenuIfNeeded($sharedWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($sharedWithName), 10);
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::canReshareCheckbox($sharedWithName, $shareWithMenuTriggerElement),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The resharing checkbox for $sharedWithName is still shown after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that :sharedWithName can reshare the share
-        */
-       public function iSeeThatCanReshareTheShare($sharedWithName) {
-               $this->showShareWithMenuIfNeeded($sharedWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($sharedWithName), 10);
-               Assert::assertTrue(
-                       $this->actor->find(self::canReshareCheckboxInput($sharedWithName, $shareWithMenuTriggerElement), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that :sharedWithName can not reshare the share
-        */
-       public function iSeeThatCanNotReshareTheShare($sharedWithName) {
-               $this->showShareWithMenuIfNeeded($sharedWithName);
-
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($sharedWithName), 10);
-               Assert::assertFalse(
-                       $this->actor->find(self::canReshareCheckboxInput($sharedWithName, $shareWithMenuTriggerElement), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that the download of the link share is hidden
-        */
-       public function iSeeThatTheDownloadOfTheLinkShareIsHidden() {
-               $this->showShareLinkMenuIfNeeded();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 10);
-               Assert::assertTrue($this->actor->find(self::hideDownloadCheckboxInput($shareLinkMenuTriggerElement), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that the download of the link share is shown
-        */
-       public function iSeeThatTheDownloadOfTheLinkShareIsShown() {
-               $this->showShareLinkMenuIfNeeded();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 10);
-               Assert::assertFalse($this->actor->find(self::hideDownloadCheckboxInput($shareLinkMenuTriggerElement), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that the password protect is disabled while loading
-        */
-       public function iSeeThatThePasswordProtectIsDisabledWhileLoading() {
-               // Due to the additional time needed to find the menu trigger element it
-               // could happen that the request to modify the password protect was
-               // completed and the field enabled again even before finding the
-               // disabled field started. Therefore, if the disabled field could not be
-               // found it is just assumed that it was already enabled again.
-               // Nevertheless, this check should be done anyway to ensure that the
-               // following scenario steps are not executed before the request to the
-               // server was done.
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 10);
-
-               try {
-                       $this->actor->find(self::disabledPasswordProtectField($shareLinkMenuTriggerElement), 5);
-               } catch (NoSuchElementException $exception) {
-                       echo "The password protect field was not found disabled after " . (5 * $this->actor->getFindTimeoutMultiplier()) . " seconds, assumming that it was disabled and enabled again before the check started and continuing";
-
-                       return;
-               }
-
-               if (!WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::disabledPasswordProtectField($shareLinkMenuTriggerElement),
-                       $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The password protect field is still disabled after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that the link share is password protected
-        */
-       public function iSeeThatTheLinkShareIsPasswordProtected() {
-               $this->showShareLinkMenuIfNeeded();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 10);
-               Assert::assertTrue($this->actor->find(self::passwordProtectCheckboxInput($shareLinkMenuTriggerElement), 10)->isChecked(), "Password protect checkbox is checked");
-               Assert::assertTrue($this->actor->find(self::passwordProtectField($shareLinkMenuTriggerElement), 10)->isVisible(), "Password protect field is visible");
-       }
-
-       /**
-        * @Then I see that the password of the link share is protected by Talk
-        */
-       public function iSeeThatThePasswordOfTheLinkShareIsProtectedByTalk() {
-               $this->showShareLinkMenuIfNeeded();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 10);
-               Assert::assertTrue($this->actor->find(self::passwordProtectByTalkCheckboxInput($shareLinkMenuTriggerElement), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that the password of the link share is not protected by Talk
-        */
-       public function iSeeThatThePasswordOfTheLinkShareIsNotProtectedByTalk() {
-               $this->showShareLinkMenuIfNeeded();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 10);
-               Assert::assertFalse($this->actor->find(self::passwordProtectByTalkCheckboxInput($shareLinkMenuTriggerElement), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that the checkbox to protect the password of the link share by Talk is not shown
-        */
-       public function iSeeThatTheCheckboxToProtectThePasswordOfTheLinkShareByTalkIsNotShown() {
-               $this->showShareLinkMenuIfNeeded();
-
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 10);
-               try {
-                       Assert::assertFalse(
-                               $this->actor->find(self::passwordProtectByTalkCheckbox($shareLinkMenuTriggerElement))->isVisible());
-               } catch (NoSuchElementException $exception) {
-               }
-       }
-
-       /**
-        * @Given I share the link for :fileName protected by the password :password
-        */
-       public function iShareTheLinkForProtectedByThePassword($fileName, $password) {
-               $this->iShareTheLinkFor($fileName);
-               $this->iProtectTheSharedLinkWithThePassword($password);
-               $this->iSeeThatThePasswordProtectIsDisabledWhileLoading();
-       }
-
-       private function showShareLinkMenuIfNeeded() {
-               $shareLinkMenuTriggerElement = $this->actor->find(self::shareLinkMenuTrigger(), 2);
-
-               // In some cases the share menu is hidden after clicking on an action of
-               // the menu. Therefore, if the menu is visible, wait a little just in
-               // case it is in the process of being hidden due to a previous action,
-               // in which case it is shown again.
-               if (WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::shareLinkMenu($shareLinkMenuTriggerElement),
-                       $timeout = 2 * $this->actor->getFindTimeoutMultiplier())) {
-                       $this->actor->find(self::shareLinkMenuButton(), 10)->click();
-               }
-       }
-
-       private function showShareWithMenuIfNeeded($shareWithName) {
-               $shareWithMenuTriggerElement = $this->actor->find(self::shareWithMenuTrigger($shareWithName), 2);
-
-               // In some cases the share menu is hidden after clicking on an action of
-               // the menu. Therefore, if the menu is visible, wait a little just in
-               // case it is in the process of being hidden due to a previous action,
-               // in which case it is shown again.
-               if (WaitFor::elementToBeEventuallyNotShown(
-                       $this->actor,
-                       self::shareWithMenu($shareWithName, $shareWithMenuTriggerElement),
-                       $timeout = 2 * $this->actor->getFindTimeoutMultiplier())) {
-                       $this->actor->find(self::shareWithMenuButton($shareWithName), 10)->click();
-               }
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/NotificationsContext.php b/tests/acceptance/features/bootstrap/NotificationsContext.php
deleted file mode 100644 (file)
index fb8ca2a..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2019, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-
-class NotificationsContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function notificationsButton() {
-               return Locator::forThe()->css("#header #notifications.notifications-button")->
-                               describedAs("Notifications button in the header");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function notificationsContainer() {
-               return Locator::forThe()->css("#header #notifications .notification-container")->
-                               describedAs("Notifications container");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function incomingShareNotificationForFile($fileName) {
-               return Locator::forThe()->xpath("//li[contains(concat(' ', normalize-space(@class), ' '), ' notification ') and //div[starts-with(normalize-space(), 'You received $fileName as a share by')]]")->
-                               descendantOf(self::notificationsContainer())->
-                               describedAs("Notification of incoming share for file $fileName");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function actionsInIncomingShareNotificationForFile($fileName) {
-               return Locator::forThe()->css(".notification-actions")->
-                               descendantOf(self::incomingShareNotificationForFile($fileName))->
-                               describedAs("Actions in notification of incoming share for file $fileName");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function actionInIncomingShareNotificationForFile($fileName, $action) {
-               return Locator::forThe()->xpath("//button[normalize-space() = '$action']")->
-                               descendantOf(self::actionsInIncomingShareNotificationForFile($fileName))->
-                               describedAs("$action button in notification of incoming share for file $fileName");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function acceptButtonInIncomingShareNotificationForFile($fileName) {
-               return self::actionInIncomingShareNotificationForFile($fileName, 'Accept');
-       }
-
-       /**
-        * @Given I accept the share for :fileName in the notifications
-        */
-       public function iAcceptTheShareForInTheNotifications($fileName) {
-               $this->actor->find(self::notificationsButton(), 10)->click();
-
-               // Notifications are refreshed every 30 seconds, so wait a bit longer.
-               // As the waiting is long enough already the find timeout multiplier is
-               // capped at 2 when finding notifications.
-               $findTimeoutMultiplier = $this->actor->getFindTimeoutMultiplier();
-               $this->actor->setFindTimeoutMultiplier(min(2, $findTimeoutMultiplier));
-               $this->actor->find(self::acceptButtonInIncomingShareNotificationForFile($fileName), 35)->click();
-               $this->actor->setFindTimeoutMultiplier($findTimeoutMultiplier);
-
-               // Hide the notifications again
-               $this->actor->find(self::notificationsButton(), 10)->click();
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/PublicShareContext.php b/tests/acceptance/features/bootstrap/PublicShareContext.php
deleted file mode 100644 (file)
index ce25afa..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class PublicShareContext implements Context, ActorAwareInterface {
-       use ActorAware;
-       use FileListAncestorSetter;
-
-       /**
-        * @return Locator
-        */
-       public static function passwordField() {
-               return Locator::forThe()->field("password")->
-                               describedAs("Password field in Authenticate page");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function authenticateButton() {
-               return Locator::forThe()->id("password-submit")->
-                               describedAs("Authenticate button in Authenticate page");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function wrongPasswordMessage() {
-               return Locator::forThe()->css(".warning .wrongPasswordMsg")->
-                               describedAs("Wrong password message in Authenticate page");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareMenuButton() {
-               return Locator::forThe()->id("header-actions-toggle")->
-                               describedAs("Share menu button in Shared file page");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function shareMenu() {
-               return Locator::forThe()->id("header-actions-menu")->
-                               describedAs("Share menu in Shared file page");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function downloadItemInShareMenu() {
-               return Locator::forThe()->id("download")->
-                               descendantOf(self::shareMenu())->
-                               describedAs("Download item in Share menu in Shared file page");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function directLinkItemInShareMenu() {
-               return Locator::forThe()->id("directLink-container")->
-                               descendantOf(self::shareMenu())->
-                               describedAs("Direct link item in Share menu in Shared file page");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function saveItemInShareMenu() {
-               return Locator::forThe()->id("save-external-share")->
-                               descendantOf(self::shareMenu())->
-                               describedAs("Save item in Share menu in Shared file page");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function textPreview() {
-               return Locator::forThe()->css(".text-preview")->
-                               describedAs("Text preview in Shared file page");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function downloadButton() {
-               return Locator::forThe()->id("downloadFile")->
-                               describedAs("Download button in Shared file page");
-       }
-
-       /**
-        * @When I visit the shared link I wrote down
-        */
-       public function iVisitTheSharedLinkIWroteDown() {
-               $this->actor->getSession()->visit($this->actor->getSharedNotebook()["shared link"]);
-       }
-
-       /**
-        * @When I visit the direct download shared link I wrote down
-        */
-       public function iVisitTheDirectDownloadSharedLinkIWroteDown() {
-               $this->actor->getSession()->visit($this->actor->getSharedNotebook()["shared link"] . "/download");
-       }
-
-       /**
-        * @When I authenticate with password :password
-        */
-       public function iAuthenticateWithPassword($password) {
-               $this->actor->find(self::passwordField(), 10)->setValue($password);
-               $this->actor->find(self::authenticateButton())->click();
-       }
-
-       /**
-        * @When I open the Share menu
-        */
-       public function iOpenTheShareMenu() {
-               $this->actor->find(self::shareMenuButton(), 10)->click();
-       }
-
-       /**
-        * @Then I see that the current page is the Authenticate page for the shared link I wrote down
-        */
-       public function iSeeThatTheCurrentPageIsTheAuthenticatePageForTheSharedLinkIWroteDown() {
-               Assert::assertEquals(
-                       $this->actor->getSharedNotebook()["shared link"] . "/authenticate/showShare",
-                       $this->actor->getSession()->getCurrentUrl());
-       }
-
-       /**
-        * @Then I see that the current page is the Authenticate page for the direct download shared link I wrote down
-        */
-       public function iSeeThatTheCurrentPageIsTheAuthenticatePageForTheDirectDownloadSharedLinkIWroteDown() {
-               Assert::assertEquals(
-                       $this->actor->getSharedNotebook()["shared link"] . "/authenticate/downloadShare",
-                       $this->actor->getSession()->getCurrentUrl());
-       }
-
-       /**
-        * @Then I see that the current page is the shared link I wrote down
-        */
-       public function iSeeThatTheCurrentPageIsTheSharedLinkIWroteDown() {
-               Assert::assertEquals(
-                       $this->actor->getSharedNotebook()["shared link"],
-                       $this->actor->getSession()->getCurrentUrl());
-
-               $this->setFileListAncestorForActor(null, $this->actor);
-       }
-
-       /**
-        * @Then I see that the current page is the direct download shared link I wrote down
-        */
-       public function iSeeThatTheCurrentPageIsTheDirectDownloadSharedLinkIWroteDown() {
-               Assert::assertEquals(
-                       $this->actor->getSharedNotebook()["shared link"] . "/download",
-                       $this->actor->getSession()->getCurrentUrl());
-       }
-
-       /**
-        * @Then I see that a wrong password for the shared file message is shown
-        */
-       public function iSeeThatAWrongPasswordForTheSharedFileMessageIsShown() {
-               Assert::assertTrue(
-                       $this->actor->find(self::wrongPasswordMessage(), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the Share menu is shown
-        */
-       public function iSeeThatTheShareMenuIsShown() {
-               // Unlike other menus, the Share menu is always present in the DOM, so
-               // the element could be found when it was no made visible yet due to the
-               // command not having been processed by the browser.
-               if (!WaitFor::elementToBeEventuallyShown(
-                       $this->actor, self::shareMenu(), $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The Share menu is not visible yet after $timeout seconds");
-               }
-
-               // The acceptance tests are run in a window wider than the mobile breakpoint, so the
-               // download item should not be shown in the menu (although it will be in
-               // the DOM).
-               Assert::assertFalse(
-                       $this->actor->find(self::downloadItemInShareMenu())->isVisible(),
-                       "Download item in share menu is visible");
-               Assert::assertTrue(
-                       $this->actor->find(self::directLinkItemInShareMenu())->isVisible(),
-                       "Direct link item in share menu is not visible");
-               Assert::assertTrue(
-                       $this->actor->find(self::saveItemInShareMenu())->isVisible(),
-                       "Save item in share menu is not visible");
-       }
-
-       /**
-        * @Then I see that the Share menu button is not shown
-        */
-       public function iSeeThatTheShareMenuButtonIsNotShown() {
-               try {
-                       Assert::assertFalse(
-                               $this->actor->find(self::shareMenuButton())->isVisible());
-               } catch (NoSuchElementException $exception) {
-               }
-       }
-
-       /**
-        * @Then I see that the shared file preview shows the text :text
-        */
-       public function iSeeThatTheSharedFilePreviewShowsTheText($text) {
-               Assert::assertStringContainsString($text, $this->actor->find(self::textPreview(), 10)->getText());
-       }
-
-       /**
-        * @Then I see that the download button is shown
-        */
-       public function iSeeThatTheDownloadButtonIsShown() {
-               if (!WaitFor::elementToBeEventuallyShown(
-                       $this->actor, self::downloadButton(), $timeout = 10 * $this->actor->getFindTimeoutMultiplier())) {
-                       Assert::fail("The download button is not visible yet after $timeout seconds");
-               }
-       }
-
-       /**
-        * @Then I see that the download button is not shown
-        */
-       public function iSeeThatTheDownloadButtonIsNotShown() {
-               try {
-                       Assert::assertFalse(
-                               $this->actor->find(self::downloadButton())->isVisible());
-               } catch (NoSuchElementException $exception) {
-               }
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/SearchContext.php b/tests/acceptance/features/bootstrap/SearchContext.php
deleted file mode 100644 (file)
index f776c07..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2018, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class SearchContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function searchBoxInput() {
-               return Locator::forThe()->css("#header .searchbox input")->
-                               describedAs("Search box input in the header");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function searchResults() {
-               return Locator::forThe()->css("#searchresults")->
-                               describedAs("Search results");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function searchResult($number) {
-               return Locator::forThe()->xpath("//*[contains(concat(' ', normalize-space(@class), ' '), ' result ')][$number]")->
-                               descendantOf(self::searchResults())->
-                               describedAs("Search result $number");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function searchResultName($number) {
-               return Locator::forThe()->css(".name")->
-                               descendantOf(self::searchResult($number))->
-                               describedAs("Name for search result $number");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function searchResultPath($number) {
-               // Currently search results for comments misuse the ".path" class to
-               // dim the user name, so "div.path" needs to be used to find the proper
-               // path element.
-               return Locator::forThe()->css("div.path")->
-                               descendantOf(self::searchResult($number))->
-                               describedAs("Path for search result $number");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function searchResultLink($number) {
-               return Locator::forThe()->css(".link")->
-                               descendantOf(self::searchResult($number))->
-                               describedAs("Link for search result $number");
-       }
-
-       /**
-        * @When I search for :query
-        */
-       public function iSearchFor($query) {
-               $this->actor->find(self::searchBoxInput(), 10)->setValue($query);
-       }
-
-       /**
-        * @When I open the search result :number
-        */
-       public function iOpenTheSearchResult($number) {
-               $this->actor->find(self::searchResultLink($number), 10)->click();
-       }
-
-       /**
-        * @Then I see that the search result :number is :name
-        */
-       public function iSeeThatTheSearchResultIs($number, $name) {
-               Assert::assertEquals(
-                       $name, $this->actor->find(self::searchResultName($number), 10)->getText());
-       }
-
-       /**
-        * @Then I see that the search result :number was found in :path
-        */
-       public function iSeeThatTheSearchResultWasFoundIn($number, $path) {
-               Assert::assertEquals(
-                       $path, $this->actor->find(self::searchResultPath($number), 10)->getText());
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/SettingsContext.php b/tests/acceptance/features/bootstrap/SettingsContext.php
deleted file mode 100644 (file)
index ae1a559..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class SettingsContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function acceptSharesByDefaultCheckbox() {
-               // forThe()->checkbox("Accept user...") can not be used here; that would
-               // return the checkbox itself, but the element that the user interacts
-               // with is the label.
-               return Locator::forThe()->xpath("//label[normalize-space() = 'Accept user and group shares by default']")->
-                               describedAs("Accept shares by default checkbox in Sharing section in Personal Sharing Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function acceptSharesByDefaultCheckboxInput() {
-               return Locator::forThe()->checkbox("Accept user and group shares by default")->
-                               describedAs("Accept shares by default checkbox input in Sharing section in Personal Sharing Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function allowResharingCheckbox() {
-               // forThe()->checkbox("Allow resharing") can not be used here; that
-               // would return the checkbox itself, but the element that the user
-               // interacts with is the label.
-               return Locator::forThe()->xpath("//label[normalize-space() = 'Allow resharing']")->
-                               describedAs("Allow resharing checkbox in Sharing section in Administration Sharing Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function allowResharingCheckboxInput() {
-               return Locator::forThe()->checkbox("Allow resharing")->
-                               describedAs("Allow resharing checkbox input in Sharing section in Administration Sharing Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function restrictUsernameAutocompletionToGroupsCheckbox() {
-               // forThe()->checkbox("Restrict username...") can not be used here; that
-               // would return the checkbox itself, but the element that the user
-               // interacts with is the label.
-               return Locator::forThe()->xpath("//label[normalize-space() = 'Allow username autocompletion to users within the same groups']")->
-                               describedAs("Allow username autocompletion to users within the same groups checkbox in Sharing section in Administration Sharing Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function restrictUsernameAutocompletionToGroupsCheckboxInput() {
-               return Locator::forThe()->checkbox("Allow username autocompletion to users within the same groups")->
-                               describedAs("Allow username autocompletion to users within the same groups checkbox input in Sharing section in Administration Sharing Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function systemTagsSelectTagButton() {
-               return Locator::forThe()->id("s2id_systemtag")->
-                               describedAs("Select tag button in system tags section in Administration Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function systemTagsItemInDropdownForTag($tag) {
-               return Locator::forThe()->xpath("//*[contains(concat(' ', normalize-space(@class), ' '), ' select2-result-label ')]//span[normalize-space() = '$tag']/ancestor::li")->
-                               descendantOf(self::select2Dropdown())->
-                               describedAs("Item in dropdown for tag $tag in system tags section in Administration Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function select2Dropdown() {
-               return Locator::forThe()->css("#select2-drop")->
-                               describedAs("Select2 dropdown in Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function select2DropdownMask() {
-               return Locator::forThe()->css("#select2-drop-mask")->
-                               describedAs("Select2 dropdown mask in Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function systemTagsTagNameInput() {
-               return Locator::forThe()->id("systemtag_name")->
-                               describedAs("Tag name input in system tags section in Administration Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function systemTagsCreateOrUpdateButton() {
-               return Locator::forThe()->id("systemtag_submit")->
-                               describedAs("Create/Update button in system tags section in Administration Settings");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function systemTagsResetButton() {
-               return Locator::forThe()->id("systemtag_reset")->
-                               describedAs("Reset button in system tags section in Administration Settings");
-       }
-
-       /**
-        * @When I disable accepting the shares by default
-        */
-       public function iDisableAcceptingTheSharesByDefault() {
-               $this->iSeeThatSharesAreAcceptedByDefault();
-
-               $this->actor->find(self::acceptSharesByDefaultCheckbox(), 2)->click();
-       }
-
-       /**
-        * @When I disable resharing
-        */
-       public function iDisableResharing() {
-               $this->iSeeThatResharingIsEnabled();
-
-               $this->actor->find(self::allowResharingCheckbox(), 2)->click();
-       }
-
-       /**
-        * @When I enable restricting username autocompletion to groups
-        */
-       public function iEnableRestrictingUsernameAutocompletionToGroups() {
-               $this->iSeeThatUsernameAutocompletionIsNotRestrictedToGroups();
-
-               $this->actor->find(self::restrictUsernameAutocompletionToGroupsCheckbox(), 2)->click();
-       }
-
-       /**
-        * @When I create the tag :tag in the settings
-        */
-       public function iCreateTheTagInTheSettings($tag) {
-               $this->actor->find(self::systemTagsResetButton(), 10)->click();
-               $this->actor->find(self::systemTagsTagNameInput())->setValue($tag);
-               $this->actor->find(self::systemTagsCreateOrUpdateButton())->click();
-       }
-
-       /**
-        * @Then I see that shares are accepted by default
-        */
-       public function iSeeThatSharesAreAcceptedByDefault() {
-               Assert::assertTrue(
-                       $this->actor->find(self::acceptSharesByDefaultCheckboxInput(), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that resharing is enabled
-        */
-       public function iSeeThatResharingIsEnabled() {
-               Assert::assertTrue(
-                       $this->actor->find(self::allowResharingCheckboxInput(), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that resharing is disabled
-        */
-       public function iSeeThatResharingIsDisabled() {
-               Assert::assertFalse(
-                       $this->actor->find(self::allowResharingCheckboxInput(), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that username autocompletion is restricted to groups
-        */
-       public function iSeeThatUsernameAutocompletionIsRestrictedToGroups() {
-               Assert::assertTrue(
-                       $this->actor->find(self::restrictUsernameAutocompletionToGroupsCheckboxInput(), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that username autocompletion is not restricted to groups
-        */
-       public function iSeeThatUsernameAutocompletionIsNotRestrictedToGroups() {
-               Assert::assertFalse(
-                       $this->actor->find(self::restrictUsernameAutocompletionToGroupsCheckboxInput(), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that shares are not accepted by default
-        */
-       public function iSeeThatSharesAreNotAcceptedByDefault() {
-               Assert::assertFalse(
-                       $this->actor->find(self::acceptSharesByDefaultCheckboxInput(), 10)->isChecked());
-       }
-
-       /**
-        * @Then I see that the button to select tags is shown
-        */
-       public function iSeeThatTheButtonToSelectTagsIsShown() {
-               Assert::assertTrue($this->actor->find(self::systemTagsSelectTagButton(), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the dropdown for tags in the settings eventually contains the tag :tag
-        */
-       public function iSeeThatTheDropdownForTagsInTheSettingsEventuallyContainsTheTag($tag) {
-               // When the dropdown is opened it is not automatically updated if new
-               // tags are added to the server, and when a tag is created, no explicit
-               // feedback is provided to the user about the completion of that
-               // operation (that is, when the tag is added to the server). Therefore,
-               // to verify that creating a tag does in fact add it to the server it is
-               // necessary to repeatedly open the dropdown until the tag is shown in
-               // the dropdown (or the limit of tries is reached).
-
-               Assert::assertTrue($this->actor->find(self::systemTagsSelectTagButton(), 10)->isVisible());
-
-               $actor = $this->actor;
-
-               $tagFoundInDropdownCallback = function () use ($actor, $tag) {
-                       // Open the dropdown to look for the tag.
-                       $actor->find(self::systemTagsSelectTagButton())->click();
-
-                       // When the dropdown is opened it is initially empty, and its
-                       // contents are updated once received from the server. Therefore, a
-                       // timeout must be used when looking for the tags.
-                       try {
-                               $tagFound = $this->actor->find(self::systemTagsItemInDropdownForTag($tag), 10)->isVisible();
-                       } catch (NoSuchElementException $exception) {
-                               $tagFound = false;
-                       }
-
-                       // Close again the dropdown after looking for the tag. When a
-                       // dropdown is opened Select2 creates a special element that masks
-                       // every other element but the dropdown to get all mouse clicks;
-                       // this is used by Select2 to close the dropdown when the user
-                       // clicks outside it.
-                       $actor->find(self::select2DropdownMask())->click();
-
-                       return $tagFound;
-               };
-
-               $numberOfTries = 5;
-               for ($i = 0; $i < $numberOfTries; $i++) {
-                       if ($tagFoundInDropdownCallback()) {
-                               return;
-                       }
-               }
-
-               Assert::fail("The dropdown in system tags section in Administration Settings does not contain the tag $tag after $numberOfTries tries");
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/SettingsMenuContext.php b/tests/acceptance/features/bootstrap/SettingsMenuContext.php
deleted file mode 100644 (file)
index d5c1872..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- * @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) (skjnldsv@protonmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class SettingsMenuContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function settingsSectionInHeader() {
-               return Locator::forThe()->xpath("//*[@id = 'header']//*[@id = 'user-menu']")->
-                               describedAs("Settings menu section in the header");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function settingsMenuButton() {
-               return Locator::forThe()->css(".header-menu__trigger")->
-                               descendantOf(self::settingsSectionInHeader())->
-                               describedAs("Settings menu button");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function settingsMenu() {
-               return Locator::forThe()->css("ul")->
-                               descendantOf(self::settingsSectionInHeader())->
-                               describedAs("Settings menu");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function usersMenuItem() {
-               return self::menuItemFor("Users");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function usersAppsItem() {
-               return self::menuItemFor("Apps");
-       }
-
-       /**
-        * @return Locator
-        */
-       public static function logOutMenuItem() {
-               return self::menuItemFor("Log out");
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function menuItemFor($itemText) {
-               return Locator::forThe()->xpath("//a[normalize-space() = '$itemText']")->
-                               descendantOf(self::settingsMenu())->
-                               describedAs($itemText . " item in Settings menu");
-       }
-
-       /**
-        * @param string $itemText
-        * @return Locator
-        */
-       private static function settingsPanelFor($itemText) {
-               return Locator::forThe()->xpath("//div[@id = 'app-navigation' or contains(@class, 'app-navigation')]//div[contains(@class, 'app-navigation-caption') and normalize-space() = '$itemText']")->
-               describedAs($itemText . " item in Settings panel");
-       }
-
-       /**
-        * @param string $itemText
-        * @return Locator
-        */
-       private static function settingsPanelEntryFor($itemText) {
-               return Locator::forThe()->xpath("//div[@id = 'app-navigation' or contains(@class, 'app-navigation')]//ul//li[normalize-space() = '$itemText']")->
-               describedAs($itemText . " entry in Settings panel");
-       }
-
-       /**
-        * @return array
-        */
-       public function menuItems() {
-               return $this->actor->find(self::settingsMenu(), 10)
-                                       ->getWrappedElement()->findAll('xpath', '//a');
-       }
-
-       /**
-        * @When I open the Settings menu
-        */
-       public function iOpenTheSettingsMenu() {
-               $this->actor->find(self::settingsMenuButton(), 10)->click();
-       }
-
-       /**
-        * @When I open the User settings
-        */
-       public function iOpenTheUserSettings() {
-               $this->iOpenTheSettingsMenu();
-
-               $this->actor->find(self::usersMenuItem(), 2)->click();
-       }
-
-       /**
-        * @When I open the Apps management
-        */
-       public function iOpenTheAppsManagement() {
-               $this->iOpenTheSettingsMenu();
-
-               $this->actor->find(self::usersAppsItem(), 2)->click();
-       }
-
-       /**
-        * @When I visit the settings page
-        */
-       public function iVisitTheSettingsPage() {
-               $this->iOpenTheSettingsMenu();
-               $this->actor->find(self::menuItemFor('Settings'), 2)->click();
-       }
-
-       /**
-        * @When I visit the admin settings page
-        */
-       public function iVisitTheAdminSettingsPage() {
-               $this->iOpenTheSettingsMenu();
-               $this->actor->find(self::menuItemFor('Administration settings'), 2)->click();
-       }
-
-       /**
-        * @When I log out
-        */
-       public function iLogOut() {
-               $this->iOpenTheSettingsMenu();
-
-               $this->actor->find(self::logOutMenuItem(), 2)->click();
-       }
-
-       /**
-        * @Then I see that the Settings menu is shown
-        */
-       public function iSeeThatTheSettingsMenuIsShown() {
-               Assert::assertTrue(
-                       $this->actor->find(self::settingsMenu(), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the Settings menu has only :items items
-        */
-       public function iSeeThatTheSettingsMenuHasOnlyXItems($items) {
-               Assert::assertCount(intval($items), self::menuItems());
-       }
-
-       /**
-        * @Then I see that the :itemText item in the Settings menu is shown
-        */
-       public function iSeeThatTheItemInTheSettingsMenuIsShown($itemText) {
-               Assert::assertTrue(
-                       $this->actor->find(self::menuItemFor($itemText), 10)->isVisible());
-       }
-
-       /**
-        * @Then I see that the :itemText item in the Settings menu is not shown
-        */
-       public function iSeeThatTheItemInTheSettingsMenuIsNotShown($itemText) {
-               $this->iSeeThatTheSettingsMenuIsShown();
-
-               try {
-                       Assert::assertFalse(
-                               $this->actor->find(self::menuItemFor($itemText))->isVisible());
-               } catch (NoSuchElementException $exception) {
-               }
-       }
-
-       /**
-        * @Then I see that the :itemText settings panel is shown
-        */
-       public function iSeeThatTheItemSettingsPanelIsShown($itemText) {
-               Assert::assertTrue(
-                       $this->actor->find(self::settingsPanelFor($itemText), 10)->isVisible()
-               );
-       }
-
-       /**
-        * @Then I see that the :itemText entry in the settings panel is shown
-        */
-       public function iSeeThatTheItemEntryInTheSettingsPanelIsShown($itemText) {
-               Assert::assertTrue(
-                       $this->actor->find(self::settingsPanelEntryFor($itemText), 10)->isVisible()
-               );
-       }
-
-       /**
-        * @Then I see that the :itemText settings panel is not shown
-        */
-       public function iSeeThatTheItemSettingsPanelIsNotShown($itemText) {
-               try {
-                       Assert::assertFalse(
-                               $this->actor->find(self::settingsPanelFor($itemText), 10)->isVisible()
-                       );
-               } catch (NoSuchElementException $exception) {
-               }
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/ToastContext.php b/tests/acceptance/features/bootstrap/ToastContext.php
deleted file mode 100644 (file)
index 7ca3df2..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use PHPUnit\Framework\Assert;
-
-class ToastContext implements Context, ActorAwareInterface {
-       use ActorAware;
-
-       /**
-        * @return Locator
-        */
-       public static function toastMessage($message) {
-               return Locator::forThe()->xpath("//*[contains(concat(' ', normalize-space(@class), ' '), ' toastify ') and normalize-space(text()) = '$message']")->
-                               descendantOf(self::toastContainer())->
-                               describedAs("$message toast");
-       }
-
-       /**
-        * @return Locator
-        */
-       private static function toastContainer() {
-               return Locator::forThe()->xpath("//*[@id=\"content\" or contains(@class, 'content')]")->
-                               describedAs("Toast container");
-       }
-
-       /**
-        * @Then I see that the :message toast is shown
-        */
-       public function iSeeThatTheToastIsShown($message) {
-               Assert::assertTrue($this->actor->find(
-                       self::toastMessage($message), 10)->isVisible());
-       }
-}
diff --git a/tests/acceptance/features/bootstrap/WaitFor.php b/tests/acceptance/features/bootstrap/WaitFor.php
deleted file mode 100644 (file)
index 37a2683..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2018, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-/**
- * Helper class with common "wait for" functions.
- */
-class WaitFor {
-       /**
-        * Waits for the element to be visible.
-        *
-        * @param Actor $actor the Actor used to find the element.
-        * @param Locator $elementLocator the locator for the element.
-        * @param float $timeout the number of seconds (decimals allowed) to wait at
-        *        most for the element to be visible.
-        * @param float $timeoutStep the number of seconds (decimals allowed) to
-        *        wait before checking the visibility again.
-        * @return boolean true if the element is visible before (or exactly when)
-        *         the timeout expires, false otherwise.
-        */
-       public static function elementToBeEventuallyShown(Actor $actor, Locator $elementLocator, $timeout = 10, $timeoutStep = 1) {
-               $elementShownCallback = function () use ($actor, $elementLocator) {
-                       try {
-                               return $actor->find($elementLocator)->isVisible();
-                       } catch (NoSuchElementException $exception) {
-                               return false;
-                       }
-               };
-
-               return Utils::waitFor($elementShownCallback, $timeout, $timeoutStep);
-       }
-
-       /**
-        * Waits for the element to be hidden (either not visible or not found in
-        * the DOM).
-        *
-        * @param Actor $actor the Actor used to find the element.
-        * @param Locator $elementLocator the locator for the element.
-        * @param float $timeout the number of seconds (decimals allowed) to wait at
-        *        most for the element to be hidden.
-        * @param float $timeoutStep the number of seconds (decimals allowed) to
-        *        wait before checking the visibility again.
-        * @return boolean true if the element is hidden before (or exactly when)
-        *         the timeout expires, false otherwise.
-        */
-       public static function elementToBeEventuallyNotShown(Actor $actor, Locator $elementLocator, $timeout = 10, $timeoutStep = 1) {
-               $elementNotShownCallback = function () use ($actor, $elementLocator) {
-                       try {
-                               return !$actor->find($elementLocator)->isVisible();
-                       } catch (NoSuchElementException $exception) {
-                               return true;
-                       }
-               };
-
-               return Utils::waitFor($elementNotShownCallback, $timeout, $timeoutStep);
-       }
-}
diff --git a/tests/acceptance/features/core/Actor.php b/tests/acceptance/features/core/Actor.php
deleted file mode 100644 (file)
index abe9a39..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-/**
- * An actor in a test scenario.
- *
- * Every Actor object is intended to be used only in a single test scenario.
- * An Actor can control its web browser thanks to the Mink Session received when
- * it was created, so in each scenario each Actor must have its own Mink
- * Session; the same Mink Session can be used by different Actors in different
- * scenarios, but never by different Actors in the same scenario.
- *
- * The test servers used in an scenario can change between different test runs,
- * so an Actor stores the base URL for the current test server being used; in
- * most cases the tests are specified using relative paths that can be converted
- * to the appropriate absolute URL using locatePath() in the step
- * implementation.
- *
- * An Actor can find elements in its Mink Session using its find() method; it is
- * a wrapper over the find() method provided by Mink that extends it with
- * several features: the element can be looked for based on a Locator object, an
- * exception is thrown if the element is not found, and, optionally, it is
- * possible to try again to find the element several times before giving up.
- *
- * The returned object is also a wrapper over the element itself that
- * automatically handles common causes of failed commands, like clicking on a
- * hidden element; in this case, the wrapper would wait for the element to be
- * visible up to the timeout set to find the element.
- *
- * The amount of time to wait before giving up is specified in each call to
- * find(). However, a general multiplier to be applied to every timeout can be
- * set using setFindTimeoutMultiplier(); this makes possible to retry longer
- * before giving up without modifying the tests themselves. Note that the
- * multiplier affects the timeout, but not the timeout step; the rate at which
- * find() will try again to find the element does not change.
- *
- * All actors share a notebook in which data can be annotated. This makes
- * possible to share data between different test steps, no matter which Actor
- * performs them.
- */
-class Actor {
-       /**
-        * @var string
-        */
-       private $name;
-
-       /**
-        * @var \Behat\Mink\Session
-        */
-       private $session;
-
-       /**
-        * @var string
-        */
-       private $baseUrl;
-
-       /**
-        * @var float
-        */
-       private $findTimeoutMultiplier;
-
-       /**
-        * @var array
-        */
-       private $sharedNotebook;
-
-       /**
-        * Creates a new Actor.
-        *
-        * @param string $name the name of the actor.
-        * @param \Behat\Mink\Session $session the Mink Session used to control its
-        *        web browser.
-        * @param string $baseUrl the base URL used when solving relative URLs.
-        * @param array $sharedNotebook the notebook shared between all actors.
-        */
-       public function __construct($name, \Behat\Mink\Session $session, $baseUrl, &$sharedNotebook) {
-               $this->name = $name;
-               $this->session = $session;
-               $this->baseUrl = $baseUrl;
-               $this->sharedNotebook = &$sharedNotebook;
-               $this->findTimeoutMultiplier = 1;
-       }
-
-       /**
-        * Returns the name of this Actor.
-        *
-        * @return string the name of this Actor.
-        */
-       public function getName() {
-               return $this->name;
-       }
-
-       /**
-        * Sets the base URL.
-        *
-        * @param string $baseUrl the base URL used when solving relative URLs.
-        */
-       public function setBaseUrl($baseUrl) {
-               $this->baseUrl = $baseUrl;
-       }
-
-       /**
-        * Returns the multiplier for find timeouts.
-        *
-        * @return float the multiplier to apply to find timeouts.
-        */
-       public function getFindTimeoutMultiplier() {
-               return $this->findTimeoutMultiplier;
-       }
-
-       /**
-        * Sets the multiplier for find timeouts.
-        *
-        * @param float $findTimeoutMultiplier the multiplier to apply to find
-        *        timeouts.
-        */
-       public function setFindTimeoutMultiplier($findTimeoutMultiplier) {
-               $this->findTimeoutMultiplier = $findTimeoutMultiplier;
-       }
-
-       /**
-        * Returns the Mink Session used to control its web browser.
-        *
-        * @return \Behat\Mink\Session the Mink Session used to control its web
-        *         browser.
-        */
-       public function getSession() {
-               return $this->session;
-       }
-
-       /**
-        * Returns the full path for the given relative path based on the base URL.
-        *
-        * @param string relativePath the relative path.
-        * @return string the full path.
-        */
-       public function locatePath($relativePath) {
-               return $this->baseUrl . $relativePath;
-       }
-
-       /**
-        * Finds an element in the Mink Session of this Actor.
-        *
-        * The given element locator is relative to its ancestor (either another
-        * locator or an actual element); if it has no ancestor then the base
-        * document element is used.
-        *
-        * Sometimes an element may not be found simply because it has not appeared
-        * yet; for those cases this method supports trying again to find the
-        * element several times before giving up. The timeout parameter controls
-        * how much time to wait, at most, to find the element; the timeoutStep
-        * parameter controls how much time to wait before trying again to find the
-        * element. If ancestor locators need to be found the timeout is applied
-        * individually to each one, that is, if the timeout is 10 seconds the
-        * method will wait up to 10 seconds to find the ancestor of the ancestor
-        * and, then, up to 10 seconds to find the ancestor and, then, up to 10
-        * seconds to find the element. By default the timeout is 0, so the element
-        * and its ancestor will be looked for just once; the default time to wait
-        * before retrying is half a second. If the timeout is not 0 it will be
-        * affected by the multiplier set using setFindTimeoutMultiplier(), if any.
-        *
-        * When found, the element is returned wrapped in an ElementWrapper; the
-        * ElementWrapper handles common causes of failures when executing commands
-        * in an element, like clicking on a hidden element.
-        *
-        * In any case, if the element, or its ancestors, can not be found a
-        * NoSuchElementException is thrown.
-        *
-        * @param Locator $elementLocator the locator for the element.
-        * @param float $timeout the number of seconds (decimals allowed) to wait at
-        *        most for the element to appear.
-        * @param float $timeoutStep the number of seconds (decimals allowed) to
-        *        wait before trying to find the element again.
-        * @return ElementWrapper an ElementWrapper object for the element.
-        * @throws NoSuchElementException if the element, or its ancestor, can not
-        *         be found.
-        */
-       public function find(Locator $elementLocator, $timeout = 0, $timeoutStep = 0.5) {
-               $timeout = $timeout * $this->findTimeoutMultiplier;
-
-               $elementFinder = new ElementFinder($this->session, $elementLocator, $timeout, $timeoutStep);
-
-               return new ElementWrapper($elementFinder);
-       }
-
-       /**
-        * Returns the shared notebook of the Actors.
-        *
-        * @return array the shared notebook of the Actors.
-        */
-       public function &getSharedNotebook() {
-               return $this->sharedNotebook;
-       }
-}
diff --git a/tests/acceptance/features/core/ActorAware.php b/tests/acceptance/features/core/ActorAware.php
deleted file mode 100644 (file)
index c734d7e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-trait ActorAware {
-       /**
-        * @var Actor
-        */
-       protected $actor;
-
-       /**
-        * @param Actor $actor
-        */
-       public function setCurrentActor(Actor $actor) {
-               $this->actor = $actor;
-       }
-}
diff --git a/tests/acceptance/features/core/ActorAwareInterface.php b/tests/acceptance/features/core/ActorAwareInterface.php
deleted file mode 100644 (file)
index 7b855ae..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-interface ActorAwareInterface {
-       /**
-        * @param Actor $actor
-        */
-       public function setCurrentActor(Actor $actor);
-}
diff --git a/tests/acceptance/features/core/ActorContext.php b/tests/acceptance/features/core/ActorContext.php
deleted file mode 100644 (file)
index 7f152a1..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Hook\Scope\BeforeStepScope;
-use Behat\MinkExtension\Context\RawMinkContext;
-
-/**
- * Behat context to set the actor used in sibling contexts.
- *
- * This helper context provides a step definition ("I act as XXX") to change the
- * current actor of the scenario, which makes possible to use different browser
- * sessions in the same scenario.
- *
- * Sibling contexts that want to have access to the current actor of the
- * scenario must implement the ActorAwareInterface; this can be done just by
- * using the ActorAware trait.
- *
- * Besides updating the current actor in sibling contexts the ActorContext also
- * propagates its inherited "base_url" Mink parameter to the Actors as needed.
- *
- * By default no multiplier for the find timeout is set in the Actors. However,
- * it can be customized using the "actorTimeoutMultiplier" parameter of the
- * ActorContext in "behat.yml". This parameter also affects the overall timeout
- * to start a session for an Actor before giving up.
- *
- * Every actor used in the scenarios must have a corresponding Mink session
- * declared in "behat.yml" with the same name as the actor. All used sessions
- * are stopped after each scenario is run.
- */
-class ActorContext extends RawMinkContext {
-       /**
-        * @var array
-        */
-       private $actors;
-
-       /**
-        * @var array
-        */
-       private $sharedNotebook;
-
-       /**
-        * @var Actor
-        */
-       private $currentActor;
-
-       /**
-        * @var float
-        */
-       private $actorTimeoutMultiplier;
-
-       /**
-        * Creates a new ActorContext.
-        *
-        * @param float $actorTimeoutMultiplier the timeout multiplier for Actor
-        *        related timeouts.
-        */
-       public function __construct($actorTimeoutMultiplier = 1) {
-               $this->actorTimeoutMultiplier = $actorTimeoutMultiplier;
-       }
-
-       /**
-        * Sets a Mink parameter.
-        *
-        * When the "base_url" parameter is set its value is propagated to all the
-        * Actors.
-        *
-        * @param string $name the name of the parameter.
-        * @param string $value the value of the parameter.
-        */
-       public function setMinkParameter($name, $value) {
-               parent::setMinkParameter($name, $value);
-
-               if ($name === "base_url") {
-                       foreach ($this->actors as $actor) {
-                               $actor->setBaseUrl($value);
-                       }
-               }
-       }
-
-       /**
-        * Returns the session with the given name.
-        *
-        * If the session is not started it is started before returning it; if the
-        * session fails to start (typically due to a timeout connecting with the
-        * web browser) it will be tried again up to $actorTimeoutMultiplier times
-        * in total (rounded up to the next integer) before giving up.
-        *
-        * @param string|null $sname the name of the session to get, or null for the
-        *        default session.
-        * @return \Behat\Mink\Session the session.
-        */
-       public function getSession($name = null) {
-               for ($i = 0; $i < ($this->actorTimeoutMultiplier - 1); $i++) {
-                       try {
-                               return parent::getSession($name);
-                       } catch (\Behat\Mink\Exception\DriverException $exception) {
-                               echo "Exception when getting " . ($name == null? "default session": "session '$name'") . ": " . $exception->getMessage() . "\n";
-                               echo "Trying again\n";
-                       }
-               }
-
-               return parent::getSession($name);
-       }
-
-       /**
-        * @BeforeScenario
-        *
-        * Initializes the Actors for the new Scenario with the default Actor.
-        *
-        * Other Actors are added (and their Mink Sessions started) only when they
-        * are used in an "I act as XXX" step.
-        */
-       public function initializeActors() {
-               $this->actors = [];
-               $this->sharedNotebook = [];
-
-               $this->getSession()->start();
-
-               $this->getSession()->maximizeWindow();
-
-               $this->actors["default"] = new Actor("default", $this->getSession(), $this->getMinkParameter("base_url"), $this->sharedNotebook);
-               $this->actors["default"]->setFindTimeoutMultiplier($this->actorTimeoutMultiplier);
-
-               $this->currentActor = $this->actors["default"];
-       }
-
-       /**
-        * @BeforeStep
-        */
-       public function setCurrentActorInSiblingActorAwareContexts(BeforeStepScope $scope) {
-               $environment = $scope->getEnvironment();
-
-               foreach ($environment->getContexts() as $context) {
-                       if ($context instanceof ActorAwareInterface) {
-                               $context->setCurrentActor($this->currentActor);
-                       }
-               }
-       }
-
-       /**
-        * @Given I act as :actorName
-        */
-       public function iActAs($actorName) {
-               if (!array_key_exists($actorName, $this->actors)) {
-                       $this->getSession($actorName)->start();
-
-                       $this->getSession($actorName)->maximizeWindow();
-
-                       $this->actors[$actorName] = new Actor($actorName, $this->getSession($actorName), $this->getMinkParameter("base_url"), $this->sharedNotebook);
-                       $this->actors[$actorName]->setFindTimeoutMultiplier($this->actorTimeoutMultiplier);
-               }
-
-               $this->currentActor = $this->actors[$actorName];
-
-               // Ensure that the browser window of the actor is the one in the
-               // foreground; this works around a bug in the Firefox driver of Selenium
-               // and/or maybe in Firefox itself when interacting with a window in the
-               // background, but also reflects better how the user would interact with
-               // the browser in real life.
-               $session = $this->actors[$actorName]->getSession();
-               $session->switchToWindow($session->getWindowName());
-       }
-
-       /**
-        * @AfterScenario
-        *
-        * Stops all the Mink Sessions used in the last Scenario.
-        */
-       public function cleanUpSessions() {
-               foreach ($this->actors as $actor) {
-                       $actor->getSession()->stop();
-               }
-       }
-}
diff --git a/tests/acceptance/features/core/ElementFinder.php b/tests/acceptance/features/core/ElementFinder.php
deleted file mode 100644 (file)
index 714b100..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-/**
- * Command object to find Mink elements.
- *
- * The element locator is relative to its ancestor (either another locator or an
- * actual element); if it has no ancestor then the base document element is
- * used.
- *
- * Sometimes an element may not be found simply because it has not appeared yet;
- * for those cases ElementFinder supports trying again to find the element
- * several times before giving up. The timeout parameter controls how much time
- * to wait, at most, to find the element; the timeoutStep parameter controls how
- * much time to wait before trying again to find the element. If ancestor
- * locators need to be found the timeout is applied individually to each one,
- * that is, if the timeout is 10 seconds the method will wait up to 10 seconds
- * to find the ancestor of the ancestor and, then, up to 10 seconds to find the
- * ancestor and, then, up to 10 seconds to find the element. By default the
- * timeout is 0, so the element and its ancestor will be looked for just once;
- * the default time to wait before retrying is half a second.
- *
- * In any case, if the element, or its ancestors, can not be found a
- * NoSuchElementException is thrown.
- */
-class ElementFinder {
-       /**
-        * Finds an element in the given Mink Session.
-        *
-        * @see ElementFinder
-        */
-       private static function findInternal(\Behat\Mink\Session $session, Locator $elementLocator, $timeout, $timeoutStep) {
-               $element = null;
-               $selector = $elementLocator->getSelector();
-               $locator = $elementLocator->getLocator();
-               $ancestorElement = self::findAncestorElement($session, $elementLocator, $timeout, $timeoutStep);
-
-               $findCallback = function () use (&$element, $selector, $locator, $ancestorElement) {
-                       $element = $ancestorElement->find($selector, $locator);
-
-                       return $element !== null;
-               };
-               if (!Utils::waitFor($findCallback, $timeout, $timeoutStep)) {
-                       $message = $elementLocator->getDescription() . " could not be found";
-                       if ($timeout > 0) {
-                               $message = $message . " after $timeout seconds";
-                       }
-                       throw new NoSuchElementException($message);
-               }
-
-               return $element;
-       }
-
-       /**
-        * Returns the ancestor element from which the given locator will be looked
-        * for.
-        *
-        * If the ancestor of the given locator is another locator the element for
-        * the ancestor locator is found and returned. If the ancestor of the given
-        * locator is already an element that element is the one returned. If the
-        * given locator has no ancestor then the base document element is returned.
-        *
-        * The timeout is used only when finding the element for the ancestor
-        * locator; if the timeout expires a NoSuchElementException is thrown.
-        *
-        * @param \Behat\Mink\Session $session the Mink Session to get the ancestor
-        *        element from.
-        * @param Locator $elementLocator the locator for the element to get its
-        *        ancestor.
-        * @param float $timeout the number of seconds (decimals allowed) to wait at
-        *        most for the ancestor element to appear.
-        * @param float $timeoutStep the number of seconds (decimals allowed) to
-        *        wait before trying to find the ancestor element again.
-        * @return \Behat\Mink\Element\Element the ancestor element found.
-        * @throws NoSuchElementException if the ancestor element can not be found.
-        */
-       private static function findAncestorElement(\Behat\Mink\Session $session, Locator $elementLocator, $timeout, $timeoutStep) {
-               $ancestorElement = $elementLocator->getAncestor();
-               if ($ancestorElement instanceof Locator) {
-                       try {
-                               $ancestorElement = self::findInternal($session, $ancestorElement, $timeout, $timeoutStep);
-                       } catch (NoSuchElementException $exception) {
-                               // Little hack to show the stack of ancestor elements that could
-                               // not be found, as Behat only shows the message of the last
-                               // exception in the chain.
-                               $message = $exception->getMessage() . "\n" .
-                                                  $elementLocator->getDescription() . " could not be found";
-                               if ($timeout > 0) {
-                                       $message = $message . " after $timeout seconds";
-                               }
-                               throw new NoSuchElementException($message, $exception);
-                       }
-               }
-
-               if ($ancestorElement === null) {
-                       $ancestorElement = $session->getPage();
-               }
-
-               return $ancestorElement;
-       }
-
-       /**
-        * @var \Behat\Mink\Session
-        */
-       private $session;
-
-       /**
-        * @param Locator
-        */
-       private $elementLocator;
-
-       /**
-        * @var float
-        */
-       private $timeout;
-
-       /**
-        * @var float
-        */
-       private $timeoutStep;
-
-       /**
-        * Creates a new ElementFinder.
-        *
-        * @param \Behat\Mink\Session $session the Mink Session to get the element
-        *        from.
-        * @param Locator $elementLocator the locator for the element.
-        * @param float $timeout the number of seconds (decimals allowed) to wait at
-        *        most for the element to appear.
-        * @param float $timeoutStep the number of seconds (decimals allowed) to
-        *        wait before trying to find the element again.
-        */
-       public function __construct(\Behat\Mink\Session $session, Locator $elementLocator, $timeout, $timeoutStep) {
-               $this->session = $session;
-               $this->elementLocator = $elementLocator;
-               $this->timeout = $timeout;
-               $this->timeoutStep = $timeoutStep;
-       }
-
-       /**
-        * Returns the description of the element to find.
-        *
-        * @return string the description of the element to find.
-        */
-       public function getDescription() {
-               return $this->elementLocator->getDescription();
-       }
-
-       /**
-        * Returns the timeout.
-        *
-        * @return float the number of seconds (decimals allowed) to wait at most
-        *         for the element to appear.
-        */
-       public function getTimeout() {
-               return $this->timeout;
-       }
-
-       /**
-        * Returns the timeout step.
-        *
-        * @return float the number of seconds (decimals allowed) to  wait before
-        *         trying to find the element again.
-        */
-       public function getTimeoutStep() {
-               return $this->timeoutStep;
-       }
-
-       /**
-        * Finds an element using the parameters set in the constructor of this
-        * ElementFinder.
-        *
-        * If the element, or its ancestors, can not be found a
-        * NoSuchElementException is thrown.
-        *
-        * @return \Behat\Mink\Element\Element the element found.
-        * @throws NoSuchElementException if the element, or its ancestor, can not
-        *         be found.
-        */
-       public function find() {
-               return self::findInternal($this->session, $this->elementLocator, $this->timeout, $this->timeoutStep);
-       }
-}
diff --git a/tests/acceptance/features/core/ElementWrapper.php b/tests/acceptance/features/core/ElementWrapper.php
deleted file mode 100644 (file)
index 6ac9a6b..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-/**
- * Wrapper to automatically handle failed commands on Mink elements.
- *
- * Commands executed on Mink elements may fail for several reasons. The
- * ElementWrapper frees the caller of the commands from handling the most common
- * reasons of failure.
- *
- * StaleElementReference exceptions are thrown when the command is executed on
- * an element that is no longer attached to the DOM. This can happen even in
- * a chained call like "$actor->find($locator)->click()"; in the milliseconds
- * between finding the element and clicking it the element could have been
- * removed from the page (for example, if a previous interaction with the page
- * started an asynchronous update of the DOM). Every command executed through
- * the ElementWrapper is guarded against StaleElementReference exceptions; if
- * the element is stale it is found again using the same parameters to find it
- * in the first place.
- *
- * NoSuchElement exceptions are sometimes thrown instead of
- * StaleElementReference exceptions. This can happen when the Selenium2 driver
- * for Mink performs an action on an element through the WebDriver session
- * instead of directly through the WebDriver element. In that case, if the
- * element with the given ID does not exist, a NoSuchElement exception would be
- * thrown instead of a StaleElementReference exception, so those cases are
- * handled like StaleElementReference exceptions.
- *
- * ElementNotVisible exceptions are thrown when the command requires the element
- * to be visible but the element is not. Finding an element only guarantees that
- * (at that time) the element is attached to the DOM, but it does not provide
- * any guarantee regarding its visibility. Due to that, a call like
- * "$actor->find($locator)->click()" can fail if the element was hidden and
- * meant to be made visible by a previous interaction with the page, but that
- * interaction triggered an asynchronous update that was not finished when the
- * click command is executed. All commands executed through the ElementWrapper
- * that require the element to be visible are guarded against ElementNotVisible
- * exceptions; if the element is not visible it is waited for it to be visible
- * up to the timeout set to find it.
- *
- * MoveTargetOutOfBounds exceptions are sometimes thrown instead of
- * ElementNotVisible exceptions. This can happen when the Selenium2 driver for
- * Mink moves the cursor on an element using the "moveto" method of the
- * WebDriver session, for example, before clicking on an element. In that case,
- * if the element is not visible, "moveto" would throw a MoveTargetOutOfBounds
- * exception instead of an ElementNotVisible exception, so those cases are
- * handled like ElementNotVisible exceptions.
- *
- * ElementNotInteractable exceptions are thrown in Selenium 3 when the command
- * needs to interact with an element but that is not possible. This could be a
- * transitive situation (for example, due to an animation), so the command is
- * executed again after a small timeout.
- *
- * Despite the automatic handling it is possible for the commands to throw those
- * exceptions when they are executed again; this class does not handle cases
- * like an element becoming stale several times in a row (uncommon) or an
- * element not becoming visible before the timeout expires (which would mean
- * that the timeout is too short or that the test has to, indeed, fail). In a
- * similar way, MoveTargetOutOfBounds exceptions would be thrown again if
- * originally they were thrown because the element was visible but "out of
- * reach". ElementNotInteractable exceptions would be thrown again if it is not
- * possible to interact yet with the element after the wait (which could mean
- * that the test has to, indeed, fail, although it could mean too that the
- * automatic handling needs to be improved).
- *
- * If needed, automatically handling failed commands can be disabled calling
- * "doNotHandleFailedCommands()"; as it returns the ElementWrapper it can be
- * chained with the command to execute (but note that automatically handling
- * failed commands will still be disabled if further commands are executed on
- * the ElementWrapper).
- */
-class ElementWrapper {
-       /**
-        * @var ElementFinder
-        */
-       private $elementFinder;
-
-       /**
-        * @var \Behat\Mink\Element\Element
-        */
-       private $element;
-
-       /**
-        * @param boolean
-        */
-       private $handleFailedCommands;
-
-       /**
-        * Creates a new ElementWrapper.
-        *
-        * The wrapped element is found in the constructor itself using the
-        * ElementFinder.
-        *
-        * @param ElementFinder $elementFinder the command object to find the
-        *        wrapped element.
-        * @throws NoSuchElementException if the element, or its ancestor, can not
-        *         be found.
-        */
-       public function __construct(ElementFinder $elementFinder) {
-               $this->elementFinder = $elementFinder;
-               $this->element = $elementFinder->find();
-               $this->handleFailedCommands = true;
-       }
-
-       /**
-        * Returns the raw Mink element.
-        *
-        * @return \Behat\Mink\Element\Element the wrapped element.
-        */
-       public function getWrappedElement() {
-               return $this->element;
-       }
-
-       /**
-        * Prevents the automatic handling of failed commands.
-        *
-        * @return ElementWrapper this ElementWrapper.
-        */
-       public function doNotHandleFailedCommands() {
-               $this->handleFailedCommands = false;
-
-               return $this;
-       }
-
-       /**
-        * Returns whether the wrapped element is visible or not.
-        *
-        * @return bool true if the wrapped element is visible, false otherwise.
-        */
-       public function isVisible() {
-               $commandCallback = function () {
-                       return $this->element->isVisible();
-               };
-               return $this->executeCommand($commandCallback, "visibility could not be got");
-       }
-
-       /**
-        * Returns whether the wrapped element is checked or not.
-        *
-        * @return bool true if the wrapped element is checked, false otherwise.
-        */
-       public function isChecked() {
-               $commandCallback = function () {
-                       return $this->element->isChecked();
-               };
-               return $this->executeCommand($commandCallback, "check state could not be got");
-       }
-
-       /**
-        * Returns the text of the wrapped element.
-        *
-        * If the wrapped element is not visible the returned text is an empty
-        * string.
-        *
-        * @return string the text of the wrapped element, or an empty string if it
-        *         is not visible.
-        */
-       public function getText() {
-               $commandCallback = function () {
-                       return $this->element->getText();
-               };
-               return $this->executeCommand($commandCallback, "text could not be got");
-       }
-
-       /**
-        * Returns the value of the wrapped element.
-        *
-        * The value can be got even if the wrapped element is not visible.
-        *
-        * @return string the value of the wrapped element.
-        */
-       public function getValue() {
-               $commandCallback = function () {
-                       return $this->element->getValue();
-               };
-               return $this->executeCommand($commandCallback, "value could not be got");
-       }
-
-       /**
-        * Sets the given value on the wrapped element.
-        *
-        * If automatically waits for the wrapped element to be visible (up to the
-        * timeout set when finding it).
-        *
-        * @param string $value the value to set.
-        */
-       public function setValue($value) {
-               $commandCallback = function () use ($value) {
-                       $this->element->setValue($value);
-               };
-               $this->executeCommandOnVisibleElement($commandCallback, "value could not be set");
-       }
-
-       /**
-        * Clicks on the wrapped element.
-        *
-        * If automatically waits for the wrapped element to be visible (up to the
-        * timeout set when finding it).
-        */
-       public function click() {
-               $commandCallback = function () {
-                       $this->element->click();
-               };
-               $this->executeCommandOnVisibleElement($commandCallback, "could not be clicked");
-       }
-
-       /**
-        * Check the wrapped element.
-        *
-        * If automatically waits for the wrapped element to be visible (up to the
-        * timeout set when finding it).
-        */
-       public function check() {
-               $commandCallback = function () {
-                       $this->element->check();
-               };
-               $this->executeCommand($commandCallback, "could not be checked");
-       }
-
-       /**
-        * uncheck the wrapped element.
-        *
-        * If automatically waits for the wrapped element to be visible (up to the
-        * timeout set when finding it).
-        */
-       public function uncheck() {
-               $commandCallback = function () {
-                       $this->element->uncheck();
-               };
-               $this->executeCommand($commandCallback, "could not be unchecked");
-       }
-
-       /**
-        * Executes the given command.
-        *
-        * If a StaleElementReference or a NoSuchElement exception is thrown the
-        * wrapped element is found again and, then, the command is executed again.
-        *
-        * @param \Closure $commandCallback the command to execute.
-        * @param string $errorMessage an error message that describes the failed
-        *        command (appended to the description of the element).
-        */
-       private function executeCommand(\Closure $commandCallback, $errorMessage) {
-               if (!$this->handleFailedCommands) {
-                       return $commandCallback();
-               }
-
-               try {
-                       return $commandCallback();
-               } catch (\WebDriver\Exception\StaleElementReference $exception) {
-                       $this->printFailedCommandMessage($exception, $errorMessage);
-               } catch (\WebDriver\Exception\NoSuchElement $exception) {
-                       $this->printFailedCommandMessage($exception, $errorMessage);
-               }
-
-               $this->element = $this->elementFinder->find();
-
-               return $commandCallback();
-       }
-
-       /**
-        * Executes the given command on a visible element.
-        *
-        * If a StaleElementReference or a NoSuchElement exception is thrown the
-        * wrapped element is found again and, then, the command is executed again.
-        * If an ElementNotVisible or a MoveTargetOutOfBounds exception is thrown it
-        * is waited for the wrapped element to be visible and, then, the command is
-        * executed again.
-        * If an ElementNotInteractable exception is thrown it is also waited for
-        * the wrapped element to be visible. It is very likely that the element was
-        * visible already, but it is not possible to easily check if the element
-        * can be interacted with, retrying will be only useful if it was a
-        * transitive situation that resolves itself with a wait (for example, due
-        * to an animation) and waiting for the element to be visible will always
-        * start with a wait.
-        *
-        * @param \Closure $commandCallback the command to execute.
-        * @param string $errorMessage an error message that describes the failed
-        *        command (appended to the description of the element).
-        */
-       private function executeCommandOnVisibleElement(\Closure $commandCallback, $errorMessage) {
-               if (!$this->handleFailedCommands) {
-                       return $commandCallback();
-               }
-
-               try {
-                       return $this->executeCommand($commandCallback, $errorMessage);
-               } catch (\WebDriver\Exception\ElementNotVisible $exception) {
-                       $this->printFailedCommandMessage($exception, $errorMessage);
-               } catch (\WebDriver\Exception\MoveTargetOutOfBounds $exception) {
-                       $this->printFailedCommandMessage($exception, $errorMessage);
-               } catch (\Exception $exception) {
-                       // The "ElementNotInteractable" exception is not available yet in
-                       // the current "instaclick/php-webdriver" version, so it is thrown
-                       // as a generic exception with a specific message.
-                       if (stripos($exception->getMessage(), "element not interactable") === false) {
-                               throw $exception;
-                       }
-                       $this->printFailedCommandMessage($exception, $errorMessage);
-               }
-
-               $this->waitForElementToBeVisible();
-
-               return $commandCallback();
-       }
-
-       /**
-        * Prints information about the failed command.
-        *
-        * @param \Exception exception the exception thrown by the command.
-        * @param string $errorMessage an error message that describes the failed
-        *        command (appended to the description of the locator of the element).
-        */
-       private function printFailedCommandMessage(\Exception $exception, $errorMessage) {
-               echo $this->elementFinder->getDescription() . " " . $errorMessage . "\n";
-               echo "Exception message: " . $exception->getMessage() . "\n";
-               echo "Trying again\n";
-       }
-
-       /**
-        * Waits for the wrapped element to be visible.
-        *
-        * This method waits up to the timeout used when finding the wrapped
-        * element; therefore, it may return when the element is still not visible.
-        *
-        * @return boolean true if the element is visible after the wait, false
-        *         otherwise.
-        */
-       private function waitForElementToBeVisible() {
-               $isVisibleCallback = function () {
-                       return $this->isVisible();
-               };
-               $timeout = $this->elementFinder->getTimeout();
-               $timeoutStep = $this->elementFinder->getTimeoutStep();
-
-               return Utils::waitFor($isVisibleCallback, $timeout, $timeoutStep);
-       }
-}
diff --git a/tests/acceptance/features/core/Locator.php b/tests/acceptance/features/core/Locator.php
deleted file mode 100644 (file)
index 1b93339..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-/**
- * Data object for the information needed to locate an element in a web page
- * using Mink.
- *
- * Locators can be created directly using the constructor, or through a more
- * fluent interface with Locator::forThe().
- */
-class Locator {
-       /**
-        * @var string
-        */
-       private $description;
-
-       /**
-        * @var string
-        */
-       private $selector;
-
-       /**
-        * @var string|array
-        */
-       private $locator;
-
-       /**
-        * @var null|Locator|\Behat\Mink\Element\ElementInterface
-        */
-       private $ancestor;
-
-       /**
-        * Starting point for the fluent interface to create Locators.
-        *
-        * @return LocatorBuilder
-        */
-       public static function forThe() {
-               return new LocatorBuilder();
-       }
-
-       /**
-        * @param string $description
-        * @param string $selector
-        * @param string|array $locator
-        * @param null|Locator|\Behat\Mink\Element\ElementInterface $ancestor
-        */
-       public function __construct($description, $selector, $locator, $ancestor = null) {
-               $this->description = $description;
-               $this->selector = $selector;
-               $this->locator = $locator;
-               $this->ancestor = $ancestor;
-       }
-
-       /**
-        * @return string
-        */
-       public function getDescription() {
-               return $this->description;
-       }
-
-       /**
-        * @return string
-        */
-       public function getSelector() {
-               return $this->selector;
-       }
-
-       /**
-        * @return string|array
-        */
-       public function getLocator() {
-               return $this->locator;
-       }
-
-       /**
-        * @return null|Locator|\Behat\Mink\Element\ElementInterface
-        */
-       public function getAncestor() {
-               return $this->ancestor;
-       }
-}
-
-class LocatorBuilder {
-       /**
-        * @param string $selector
-        * @param string|array $locator
-        * @return LocatorBuilderSecondStep
-        */
-       public function customSelector($selector, $locator) {
-               return new LocatorBuilderSecondStep($selector, $locator);
-       }
-
-       /**
-        * @param string $cssExpression
-        * @return LocatorBuilderSecondStep
-        */
-       public function css($cssExpression) {
-               return $this->customSelector("css", $cssExpression);
-       }
-
-       /**
-        * @param string $xpathExpression
-        * @return LocatorBuilderSecondStep
-        */
-       public function xpath($xpathExpression) {
-               return $this->customSelector("xpath", $xpathExpression);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function id($value) {
-               return $this->customSelector("named_exact", ["id", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function idOrName($value) {
-               return $this->customSelector("named_exact", ["id_or_name", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function link($value) {
-               return $this->customSelector("named_exact", ["link", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function button($value) {
-               return $this->customSelector("named_exact", ["button", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function linkOrButton($value) {
-               return $this->customSelector("named_exact", ["link_or_button", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function field($value) {
-               return $this->customSelector("named_exact", ["field", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function selectField($value) {
-               return $this->customSelector("named_exact", ["select", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function checkbox($value) {
-               return $this->customSelector("named_exact", ["checkbox", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function radioButton($value) {
-               return $this->customSelector("named_exact", ["radio", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function fileInput($value) {
-               return $this->customSelector("named_exact", ["file", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function optionGroup($value) {
-               return $this->customSelector("named_exact", ["optgroup", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function option($value) {
-               return $this->customSelector("named_exact", ["option", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function fieldSet($value) {
-               return $this->customSelector("named_exact", ["fieldset", $value]);
-       }
-
-       /**
-        * @param string $value
-        * @return LocatorBuilderSecondStep
-        */
-       public function table($value) {
-               return $this->customSelector("named_exact", ["table", $value]);
-       }
-}
-
-class LocatorBuilderSecondStep {
-       /**
-        * @var string
-        */
-       private $selector;
-
-       /**
-        * @var string|array
-        */
-       private $locator;
-
-       /**
-        * @param string $selector
-        * @param string|array $locator
-        */
-       public function __construct($selector, $locator) {
-               $this->selector = $selector;
-               $this->locator = $locator;
-       }
-
-       /**
-        * @param Locator|\Behat\Mink\Element\ElementInterface $ancestor
-        * @return LocatorBuilderThirdStep
-        */
-       public function descendantOf($ancestor) {
-               return new LocatorBuilderThirdStep($this->selector, $this->locator, $ancestor);
-       }
-
-       /**
-        * @param string $description
-        * @return Locator
-        */
-       public function describedAs($description) {
-               return new Locator($description, $this->selector, $this->locator);
-       }
-}
-
-class LocatorBuilderThirdStep {
-       /**
-        * @var string
-        */
-       private $selector;
-
-       /**
-        * @var string|array
-        */
-       private $locator;
-
-       /**
-        * @var Locator|\Behat\Mink\Element\ElementInterface
-        */
-       private $ancestor;
-
-       /**
-        * @param string $selector
-        * @param string|array $locator
-        * @param Locator|\Behat\Mink\Element\ElementInterface $ancestor
-        */
-       public function __construct($selector, $locator, $ancestor) {
-               $this->selector = $selector;
-               $this->locator = $locator;
-               $this->ancestor = $ancestor;
-       }
-
-       /**
-        * @param string $description
-        * @return Locator
-        */
-       public function describedAs($description) {
-               return new Locator($description, $this->selector, $this->locator, $this->ancestor);
-       }
-}
diff --git a/tests/acceptance/features/core/NextcloudTestServerContext.php b/tests/acceptance/features/core/NextcloudTestServerContext.php
deleted file mode 100644 (file)
index d0dc0c3..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-use Behat\Behat\Context\Context;
-use Behat\Behat\Hook\Scope\BeforeScenarioScope;
-
-/**
- * Behat context to run each scenario against a clean Nextcloud server.
- *
- * Before each scenario is run, this context sets up a fresh Nextcloud server
- * with predefined data and configuration. Thanks to this every scenario is
- * independent from the others and they all know the initial state of the
- * server.
- *
- * This context is expected to be used along with RawMinkContext contexts (or
- * subclasses). As the server address can be different for each scenario, this
- * context automatically sets the "base_url" parameter of all its sibling
- * RawMinkContexts; just add NextcloudTestServerContext to the context list of a
- * suite in "behat.yml".
- *
- * The Nextcloud server is provided by an instance of NextcloudTestServerHelper;
- * its class must be specified when this context is created. By default,
- * "NextcloudTestServerLocalBuiltInHelper" is used, although that can be
- * customized using the "nextcloudTestServerHelper" parameter in "behat.yml". In
- * the same way, the parameters to be passed to the helper when it is created
- * can be customized using the "nextcloudTestServerHelperParameters" parameter,
- * which is an array (without keys) with the value of the parameters in the same
- * order as in the constructor of the helper class (by default, [ ]).
- *
- * Example of custom parameters in "behat.yml":
- * default:
- *   suites:
- *     default:
- *       contexts:
- *         - NextcloudTestServerContext:
- *             nextcloudTestServerHelper: NextcloudTestServerCustomHelper
- *             nextcloudTestServerHelperParameters:
- *               - first-parameter-value
- *               - second-parameter-value
- */
-class NextcloudTestServerContext implements Context {
-       /**
-        * @var NextcloudTestServerHelper
-        */
-       private $nextcloudTestServerHelper;
-
-       /**
-        * Creates a new NextcloudTestServerContext.
-        *
-        * @param string $nextcloudTestServerHelper the name of the
-        *        NextcloudTestServerHelper implementing class to use.
-        * @param array $nextcloudTestServerHelperParameters the parameters for the
-        *        constructor of the $nextcloudTestServerHelper class.
-        */
-       public function __construct($nextcloudTestServerHelper = "NextcloudTestServerLocalBuiltInHelper",
-                                                               $nextcloudTestServerHelperParameters = [ ]) {
-               $nextcloudTestServerHelperClass = new ReflectionClass($nextcloudTestServerHelper);
-
-               if ($nextcloudTestServerHelperParameters === null) {
-                       $nextcloudTestServerHelperParameters = [];
-               }
-
-               $this->nextcloudTestServerHelper = $nextcloudTestServerHelperClass->newInstanceArgs($nextcloudTestServerHelperParameters);
-       }
-
-       /**
-        * @BeforeScenario
-        *
-        * Sets up the Nextcloud test server before each scenario.
-        *
-        * Once the Nextcloud test server is set up, the "base_url" parameter of the
-        * sibling RawMinkContexts is set to the base URL of the Nextcloud test
-        * server.
-        *
-        * @param \Behat\Behat\Hook\Scope\BeforeScenarioScope $scope the
-        *        BeforeScenario hook scope.
-        * @throws \Exception if the Nextcloud test server can not be set up or its
-        *         base URL got.
-        */
-       public function setUpNextcloudTestServer(BeforeScenarioScope $scope) {
-               $this->nextcloudTestServerHelper->setUp();
-
-               $this->setBaseUrlInSiblingRawMinkContexts($scope, $this->nextcloudTestServerHelper->getBaseUrl());
-       }
-
-       /**
-        * @AfterScenario
-        *
-        * Cleans up the Nextcloud test server after each scenario.
-        *
-        * @throws \Exception if the Nextcloud test server can not be cleaned up.
-        */
-       public function cleanUpNextcloudTestServer() {
-               $this->nextcloudTestServerHelper->cleanUp();
-       }
-
-       private function setBaseUrlInSiblingRawMinkContexts(BeforeScenarioScope $scope, $baseUrl) {
-               $environment = $scope->getEnvironment();
-
-               foreach ($environment->getContexts() as $context) {
-                       if ($context instanceof Behat\MinkExtension\Context\RawMinkContext) {
-                               $context->setMinkParameter("base_url", $baseUrl);
-                       }
-               }
-       }
-}
diff --git a/tests/acceptance/features/core/NextcloudTestServerHelper.php b/tests/acceptance/features/core/NextcloudTestServerHelper.php
deleted file mode 100644 (file)
index 69b8ce7..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-/**
- * Interface for classes that manage a Nextcloud server during acceptance tests.
- *
- * A NextcloudTestServerHelper takes care of setting up a Nextcloud server to be
- * used in acceptance tests through its "setUp" method. It does not matter
- * wheter the server is a fresh new server just started or an already running
- * server; in any case, the state of the server must comply with the initial
- * state expected by the tests (like having performed the Nextcloud installation
- * or having an admin user with certain password).
- *
- * As the IP address and thus its the base URL of the server is not known
- * beforehand, the NextcloudTestServerHelper must provide it through its
- * "getBaseUrl" method. Note that this must be the base URL from the point of
- * view of the Selenium server, which may be a different value than the base URL
- * from the point of view of the acceptance tests themselves.
- *
- * Once the Nextcloud test server is no longer needed the "cleanUp" method will
- * be called; depending on how the Nextcloud test server was set up it may not
- * need to do anything.
- *
- * All the methods throw an exception if they fail to execute; as, due to the
- * current use of this interface, it is just a warning for the test runner and
- * nothing to be explicitly catched a plain base Exception is used.
- */
-interface NextcloudTestServerHelper {
-       /**
-        * Sets up the Nextcloud test server.
-        *
-        * @throws \Exception if the Nextcloud test server can not be set up.
-        */
-       public function setUp();
-
-       /**
-        * Cleans up the Nextcloud test server.
-        *
-        * @throws \Exception if the Nextcloud test server can not be cleaned up.
-        */
-       public function cleanUp();
-
-       /**
-        * Returns the base URL of the Nextcloud test server (from the point of view
-        * of the Selenium server).
-        *
-        * @return string the base URL of the Nextcloud test server.
-        * @throws \Exception if the base URL can not be determined.
-        */
-       public function getBaseUrl();
-}
diff --git a/tests/acceptance/features/core/NextcloudTestServerLocalApacheHelper.php b/tests/acceptance/features/core/NextcloudTestServerLocalApacheHelper.php
deleted file mode 100644 (file)
index 367e950..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2018, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-/**
- * Helper to manage a Nextcloud test server started directly by the acceptance
- * tests themselves using the Apache web server.
- *
- * The Nextcloud test server is executed using the Apache web server; the
- * default Apache directory is expected to have been set to the root directory
- * of the Nextcloud server (for example, by linking "var/www/html" to it); in
- * any case, note that the acceptance tests must be run from the acceptance
- * tests directory. The "setUp" method resets the Nextcloud server to its
- * initial state and starts it, while the "cleanUp" method stops it. To be able
- * to reset the Nextcloud server to its initial state a Git repository must be
- * provided in the root directory of the Nextcloud server; the last commit in
- * that Git repository must provide the initial state for the Nextcloud server
- * expected by the acceptance tests. When the Nextcloud server is reset the
- * owner of "apps", "config" and "data" must be set to the user that Apache
- * server is run as; it is assumed that Apache is run as "www-data".
- *
- * The Nextcloud server is available at "$nextcloudServerDomain", which can be
- * optionally specified when the NextcloudTestServerLocalApacheHelper is
- * created; if no value is given "127.0.0.1" is used by default. In any case,
- * the value of "$nextcloudServerDomain" must be seen as a trusted domain by the
- * Nextcloud server (which would be the case for "127.0.0.1" if it was installed
- * by running "occ maintenance:install"). The base URL to access the Nextcloud
- * server can be got from "getBaseUrl".
- */
-class NextcloudTestServerLocalApacheHelper implements NextcloudTestServerHelper {
-       /**
-        * @var string
-        */
-       private $nextcloudServerDomain;
-
-       /**
-        * Creates a new NextcloudTestServerLocalApacheHelper.
-        */
-       public function __construct($nextcloudServerDomain = "127.0.0.1") {
-               $this->nextcloudServerDomain = $nextcloudServerDomain;
-       }
-
-       /**
-        * Sets up the Nextcloud test server.
-        *
-        * It resets the Nextcloud test server restoring its last saved Git state
-        * and then waits for the Nextcloud test server to start again; if the
-        * server can not be reset or if it does not start again after some time an
-        * exception is thrown (as it is just a warning for the test runner and
-        * nothing to be explicitly catched a plain base Exception is used).
-        *
-        * @throws \Exception if the Nextcloud test server can not be reset or
-        *         started again.
-        */
-       public function setUp(): void {
-               // Ensure that previous Apache server is not running (as cleanUp may not
-               // have been called).
-               $this->stopApacheServer();
-
-               $this->execOrException("cd ../../ && git reset --hard HEAD");
-               $this->execOrException("cd ../../ && git clean -d --force");
-               $this->execOrException("cd ../../ && chown -R www-data:www-data apps config data");
-
-               $this->execOrException("service apache2 start");
-
-               $timeout = 60;
-               if (!Utils::waitForServer($this->getBaseUrl(), $timeout)) {
-                       throw new Exception("Nextcloud test server could not be started");
-               }
-       }
-
-       /**
-        * Cleans up the Nextcloud test server.
-        *
-        * It stops the running Nextcloud test server, if any.
-        */
-       public function cleanUp() {
-               $this->stopApacheServer();
-       }
-
-       /**
-        * Returns the base URL of the Nextcloud test server.
-        *
-        * @return string the base URL of the Nextcloud test server.
-        */
-       public function getBaseUrl() {
-               return "http://" . $this->nextcloudServerDomain . "/index.php";
-       }
-
-       /**
-        * Executes the given command, throwing an Exception if it fails.
-        *
-        * @param string $command the command to execute.
-        * @throws \Exception if the command fails to execute.
-        */
-       private function execOrException($command) {
-               exec($command . " 2>&1", $output, $returnValue);
-               if ($returnValue != 0) {
-                       throw new Exception("'$command' could not be executed: " . implode("\n", $output));
-               }
-       }
-
-       /**
-        * Stops the Apache server started in setUp, if any.
-        */
-       private function stopApacheServer() {
-               $this->execOrException("service apache2 stop");
-       }
-}
diff --git a/tests/acceptance/features/core/NextcloudTestServerLocalBuiltInHelper.php b/tests/acceptance/features/core/NextcloudTestServerLocalBuiltInHelper.php
deleted file mode 100644 (file)
index a1ab1f8..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-/**
- * Helper to manage a Nextcloud test server started directly by the acceptance
- * tests themselves using the PHP built-in web server.
- *
- * The Nextcloud test server is executed using the PHP built-in web server
- * directly from the grandparent directory of the acceptance tests directory
- * (that is, the root directory of the Nextcloud server); note that the
- * acceptance tests must be run from the acceptance tests directory. The "setUp"
- * method resets the Nextcloud server to its initial state and starts it, while
- * the "cleanUp" method stops it. To be able to reset the Nextcloud server to
- * its initial state a Git repository must be provided in the root directory of
- * the Nextcloud server; the last commit in that Git repository must provide the
- * initial state for the Nextcloud server expected by the acceptance tests.
- *
- * The Nextcloud server is available at "$nextcloudServerDomain", which can be
- * optionally specified when the NextcloudTestServerLocalBuiltInHelper is
- * created; if no value is given "127.0.0.1" is used by default. In any case,
- * the value of "$nextcloudServerDomain" must be seen as a trusted domain by the
- * Nextcloud server (which would be the case for "127.0.0.1" if it was installed
- * by running "occ maintenance:install"). The base URL to access the Nextcloud
- * server can be got from "getBaseUrl".
- */
-class NextcloudTestServerLocalBuiltInHelper implements NextcloudTestServerHelper {
-       /**
-        * @var string
-        */
-       private $nextcloudServerDomain;
-
-       /**
-        * @var string
-        */
-       private $phpServerPid;
-
-       /**
-        * Creates a new NextcloudTestServerLocalBuiltInHelper.
-        */
-       public function __construct($nextcloudServerDomain = "127.0.0.1") {
-               $this->nextcloudServerDomain = $nextcloudServerDomain;
-
-               $this->phpServerPid = "";
-       }
-
-       /**
-        * Sets up the Nextcloud test server.
-        *
-        * It resets the Nextcloud test server restoring its last saved Git state
-        * and then waits for the Nextcloud test server to start again; if the
-        * server can not be reset or if it does not start again after some time an
-        * exception is thrown (as it is just a warning for the test runner and
-        * nothing to be explicitly catched a plain base Exception is used).
-        *
-        * @throws \Exception if the Nextcloud test server can not be reset or
-        *         started again.
-        */
-       public function setUp(): void {
-               // Ensure that previous PHP server is not running (as cleanUp may not
-               // have been called).
-               $this->killPhpServer();
-
-               $this->execOrException("cd ../../ && git reset --hard HEAD");
-               $this->execOrException("cd ../../ && git clean -d --force");
-
-               // execOrException is not used because the server is started in the
-               // background, so the command will always succeed even if the server
-               // itself fails.
-               $this->phpServerPid = exec("php -S " . $this->nextcloudServerDomain . ":80 -t ../../ >/dev/null 2>&1 & echo $!");
-
-               $timeout = 60;
-               if (!Utils::waitForServer($this->getBaseUrl(), $timeout)) {
-                       throw new Exception("Nextcloud test server could not be started");
-               }
-       }
-
-       /**
-        * Cleans up the Nextcloud test server.
-        *
-        * It kills the running Nextcloud test server, if any.
-        */
-       public function cleanUp() {
-               $this->killPhpServer();
-       }
-
-       /**
-        * Returns the base URL of the Nextcloud test server.
-        *
-        * @return string the base URL of the Nextcloud test server.
-        */
-       public function getBaseUrl() {
-               return "http://" . $this->nextcloudServerDomain . "/index.php";
-       }
-
-       /**
-        * Executes the given command, throwing an Exception if it fails.
-        *
-        * @param string $command the command to execute.
-        * @throws \Exception if the command fails to execute.
-        */
-       private function execOrException($command) {
-               exec($command . " 2>&1", $output, $returnValue);
-               if ($returnValue != 0) {
-                       throw new Exception("'$command' could not be executed: " . implode("\n", $output));
-               }
-       }
-
-       /**
-        * Kills the PHP built-in web server started in setUp, if any.
-        */
-       private function killPhpServer() {
-               if ($this->phpServerPid == "") {
-                       return;
-               }
-
-               // execOrException is not used because the PID may no longer exist when
-               // trying to kill it.
-               exec("kill " . $this->phpServerPid);
-
-               $this->phpServerPid = "";
-       }
-}
diff --git a/tests/acceptance/features/core/NoSuchElementException.php b/tests/acceptance/features/core/NoSuchElementException.php
deleted file mode 100644 (file)
index 35583c7..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-/**
- * Exception to signal that the element looked for could not be found.
- */
-class NoSuchElementException extends \Exception {
-       /**
-        * @param string $message
-        * @param null|\Exception $previous
-        */
-       public function __construct($message, \Exception $previous = null) {
-               parent::__construct($message, 0, $previous);
-       }
-}
diff --git a/tests/acceptance/features/core/Utils.php b/tests/acceptance/features/core/Utils.php
deleted file mode 100644 (file)
index eb7c65e..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-
-/**
- *
- * @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
- *
- */
-
-class Utils {
-       /**
-        * Waits at most $timeout seconds for the given condition to be true,
-        * checking it again every $timeoutStep seconds.
-        *
-        * Note that the timeout is no longer taken into account when a condition is
-        * met; that is, true will be returned if the condition is met before the
-        * timeout expires, but also if it is met exactly when the timeout expires.
-        * For example, even if the timeout is set to 0, the condition will be
-        * checked at least once, and true will be returned in that case if the
-        * condition was met.
-        *
-        * @param \Closure $conditionCallback the condition to wait for, as a
-        *        function that returns a boolean.
-        * @param float $timeout the number of seconds (decimals allowed) to wait at
-        *        most for the condition to be true.
-        * @param float $timeoutStep the number of seconds (decimals allowed) to
-        *        wait before checking the condition again.
-        * @return boolean true if the condition is met before (or exactly when) the
-        *         timeout expires, false otherwise.
-        */
-       public static function waitFor($conditionCallback, $timeout, $timeoutStep) {
-               $elapsedTime = 0;
-               $conditionMet = false;
-
-               while (!($conditionMet = $conditionCallback()) && $elapsedTime < $timeout) {
-                       usleep($timeoutStep * 1000000);
-
-                       $elapsedTime += $timeoutStep;
-               }
-
-               return $conditionMet;
-       }
-
-       /**
-        * Waits at most $timeout seconds for the server at the given URL to be up,
-        * checking it again every $timeoutStep seconds.
-        *
-        * Note that it does not verify whether the URL returns a valid HTTP status
-        * or not; it simply checks that the server at the given URL is accessible.
-        *
-        * @param string $url the URL for the server to check.
-        * @param float $timeout the number of seconds (decimals allowed) to wait at
-        *        most for the server.
-        * @param float $timeoutStep the number of seconds (decimals allowed) to
-        *        wait before checking the server again; by default, 0.5 seconds.
-        * @return boolean true if the server was found, false otherwise.
-        */
-       public static function waitForServer($url, $timeout, $timeoutStep = 0.5) {
-               $isServerUpCallback = function () use ($url) {
-                       $curlHandle = curl_init($url);
-
-                       // Returning the transfer as the result of curl_exec prevents the
-                       // transfer from being written to the output.
-                       curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, true);
-
-                       $transfer = curl_exec($curlHandle);
-
-                       curl_close($curlHandle);
-
-                       return $transfer !== false;
-               };
-               return self::waitFor($isServerUpCallback, $timeout, $timeoutStep);
-       }
-}
diff --git a/tests/acceptance/installAndConfigureServer.sh b/tests/acceptance/installAndConfigureServer.sh
deleted file mode 100755 (executable)
index 7f24446..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/bash
-
-# @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
-#
-# @license GNU AGPL version 3 or any later version
-#
-# This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
-
-# Helper script to install and configure the Nextcloud server as expected by the
-# acceptance tests.
-#
-# This script is not meant to be called manually; it is called when needed by
-# the acceptance tests launchers.
-
-set -o errexit
-
-NEXTCLOUD_SERVER_DOMAIN=""
-if [ "$1" = "--nextcloud-server-domain" ]; then
-       NEXTCLOUD_SERVER_DOMAIN=$2
-
-       shift 2
-fi
-
-php occ maintenance:install --admin-pass=admin
-
-OC_PASS=123456acb php occ user:add --password-from-env user0
-OC_PASS=123456acb php occ user:add --password-from-env user1
-OC_PASS=123456acb php occ user:add --password-from-env disabledUser
-php occ user:disable disabledUser
-
-# Redirect to files after login for acceptance tests
-php occ app:disable dashboard
-
-# Disable browser warning as selenium is old
-php occ config:system:set no_unsupported_browser_warning --value=true --type=boolean
-
-if [ "$NEXTCLOUD_SERVER_DOMAIN" != "" ]; then
-       # Default first trusted domain is "localhost"; replace it with given domain.
-       php occ config:system:set trusted_domains 0 --value="$NEXTCLOUD_SERVER_DOMAIN"
-fi
diff --git a/tests/acceptance/run-local.sh b/tests/acceptance/run-local.sh
deleted file mode 100755 (executable)
index 7e66ca7..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-#!/usr/bin/env bash
-
-# @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
-#
-# @license GNU AGPL version 3 or any later version
-#
-# This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
-
-# Helper script to run the acceptance tests, which test a running Nextcloud
-# instance from the point of view of a real user, configured to start the
-# Nextcloud server themselves and from their grandparent directory.
-#
-# The acceptance tests are written in Behat so, besides running the tests, this
-# script installs Behat, its dependencies, and some related packages in the
-# "vendor" subdirectory of the acceptance tests. The acceptance tests expect
-# that the last commit in the Git repository provides the default state of the
-# Nextcloud server, so the script installs the Nextcloud server and saves a
-# snapshot of the whole grandparent directory (no .gitignore file is used) in
-# the Git repository. Finally, the acceptance tests also use the Selenium server
-# to control a web browser, so this script waits for the Selenium server
-# (which should have been started before executing this script) to be ready
-# before running the tests.
-#
-# By default the acceptance tests run are those for the Nextcloud server;
-# acceptance tests for apps can be run by providing the
-# "--acceptance-tests-dir XXX" option. When this option is used the Behat
-# configuration and the Nextcloud installation script used by the acceptance
-# tests for the Nextcloud server are ignored; they must be provided in the given
-# acceptance tests directory. Note, however, that the context classes for the
-# Nextcloud server and the core acceptance test framework classes are
-# automatically loaded; there is no need to explicitly set them in the Behat
-# configuration. Also, even when that option is used, the packages installed by
-# this script end in the "vendor" subdirectory of the acceptance tests for the
-# Nextcloud server, not in the one given in the option.
-
-# Exit immediately on errors.
-set -o errexit
-
-# Ensure working directory is script directory, as some actions (like installing
-# Behat through Composer or running Behat) expect that.
-cd "$(dirname $0)"
-
-# "--acceptance-tests-dir XXX" option can be provided to set the directory
-# (relative to the root directory of the Nextcloud server) used to look for the
-# Behat configuration and the Nextcloud installation script.
-# By default it is "tests/acceptance", that is, the acceptance tests for the
-# Nextcloud server itself.
-ACCEPTANCE_TESTS_DIR="tests/acceptance"
-if [ "$1" = "--acceptance-tests-dir" ]; then
-       ACCEPTANCE_TESTS_DIR=$2
-
-       shift 2
-fi
-
-ACCEPTANCE_TESTS_CONFIG_DIR="../../$ACCEPTANCE_TESTS_DIR/config"
-DEV_BRANCH="master"
-
-# "--timeout-multiplier N" option can be provided to set the timeout multiplier
-# to be used in ActorContext.
-TIMEOUT_MULTIPLIER=""
-if [ "$1" = "--timeout-multiplier" ]; then
-       if [[ ! "$2" =~ ^[0-9]+$ ]]; then
-               echo "--timeout-multiplier must be followed by a positive integer"
-
-               exit 1
-       fi
-
-       TIMEOUT_MULTIPLIER=$2
-
-       shift 2
-fi
-
-# "--nextcloud-server-domain XXX" option can be provided to set the domain used
-# by the Selenium server to access the Nextcloud server.
-DEFAULT_NEXTCLOUD_SERVER_DOMAIN="127.0.0.1"
-NEXTCLOUD_SERVER_DOMAIN="$DEFAULT_NEXTCLOUD_SERVER_DOMAIN"
-if [ "$1" = "--nextcloud-server-domain" ]; then
-       NEXTCLOUD_SERVER_DOMAIN=$2
-
-       shift 2
-fi
-
-# "--selenium-server XXX" option can be provided to set the domain and port used
-# by the acceptance tests to access the Selenium server.
-DEFAULT_SELENIUM_SERVER="127.0.0.1:4444"
-SELENIUM_SERVER="$DEFAULT_SELENIUM_SERVER"
-if [ "$1" = "--selenium-server" ]; then
-       SELENIUM_SERVER=$2
-
-       shift 2
-fi
-
-# Safety parameter to prevent executing this script by mistake and messing with
-# the Git repository.
-if [ "$1" != "allow-git-repository-modifications" ]; then
-       echo "To run the acceptance tests use \"run.sh\" instead"
-
-       exit 1
-fi
-
-SCENARIO_TO_RUN=$2
-if [ "$ACCEPTANCE_TESTS_DIR" != "tests/acceptance" ]; then
-       if [ "$SCENARIO_TO_RUN" == "" ]; then
-               echo "When an acceptance tests directory is given the scenario to run" \
-                        "should be provided too (paths are relative to the acceptance" \
-                        "tests directory; use the features directory to run all tests)"
-               echo "No scenario was given, so \"features/\" was automatically used"
-
-               SCENARIO_TO_RUN="features/"
-       fi
-
-       SCENARIO_TO_RUN=../../$ACCEPTANCE_TESTS_DIR/$SCENARIO_TO_RUN
-fi
-
-if [ "$TIMEOUT_MULTIPLIER" != "" ]; then
-       # Although Behat documentation states that using the BEHAT_PARAMS
-       # environment variable "You can set any value for any option that is
-       # available in a behat.yml file" this is currently not true for the
-       # constructor parameters of contexts (see
-       # https://github.com/Behat/Behat/issues/983). Thus, the default "behat.yml"
-       # configuration file has to be adjusted to provide the appropriate
-       # parameters for ActorContext.
-       ORIGINAL="\
-        - ActorContext"
-       REPLACEMENT="\
-        - ActorContext:\n\
-            actorTimeoutMultiplier: $TIMEOUT_MULTIPLIER"
-       sed --in-place "s/$ORIGINAL/$REPLACEMENT/" $ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml
-fi
-
-if [ "$NEXTCLOUD_SERVER_DOMAIN" != "$DEFAULT_NEXTCLOUD_SERVER_DOMAIN" ]; then
-       # Although Behat documentation states that using the BEHAT_PARAMS
-       # environment variable "You can set any value for any option that is
-       # available in a behat.yml file" this is currently not true for the
-       # constructor parameters of contexts (see
-       # https://github.com/Behat/Behat/issues/983). Thus, the default "behat.yml"
-       # configuration file has to be adjusted to provide the appropriate
-       # parameters for NextcloudTestServerContext.
-       #
-       # Note that the substitution below is only valid if no parameters for
-       # the helper are set in behat.yml, although it is valid if a specific
-       # helper is.
-       ORIGINAL="\
-        - NextcloudTestServerContext:\?"
-       REPLACEMENT="\
-        - NextcloudTestServerContext:\n\
-            nextcloudTestServerHelperParameters:\n\
-              - $NEXTCLOUD_SERVER_DOMAIN"
-       sed --in-place "s/$ORIGINAL/$REPLACEMENT/" $ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml
-fi
-
-# Due to a bug in the Mink Extension for Behat it is not possible to use the
-# "paths.base" variable in the path to the custom Firefox profile. Thus, the
-# default "behat.yml" configuration file has to be adjusted to replace the
-# variable by its value before the configuration file is parsed by Behat.
-ORIGINAL="profile: %paths.base%"
-REPLACEMENT="profile: $ACCEPTANCE_TESTS_CONFIG_DIR"
-# As the substitution does not involve regular expressions or multilines it can
-# be done just with Bash. Moreover, this does not require escaping the regular
-# expression characters that may appear in the path, like "/".
-FILE_CONTENTS=$(<$ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml)
-echo "${FILE_CONTENTS//$ORIGINAL/$REPLACEMENT}" > $ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml
-
-# Set the Selenium server to be used by Mink. Although Mink sessions can be
-# extended through BEHAT_PARAMS this would require adding here too each new
-# session added to "behat.yml", including those added in the acceptance
-# tests of apps. Instead, the default "behat.yml" configuration file is
-# adjusted to replace the simulated "selenium.server" variable by its value
-# before the configuration file is parsed by Behat.
-ORIGINAL="wd_host: %selenium.server%"
-REPLACEMENT="wd_host: http://$SELENIUM_SERVER/wd/hub"
-# As the substitution does not involve regular expressions or multilines it
-# can be done just with Bash. Moreover, this does not require escaping the
-# regular expression characters that may appear in the URL, like "/".
-FILE_CONTENTS=$(<$ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml)
-echo "${FILE_CONTENTS//$ORIGINAL/$REPLACEMENT}" > $ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml
-
-composer install
-
-cd ../../
-
-# Link the default Apache directory to the root directory of the Nextcloud
-# server to make possible to run the Nextcloud server on Apache if needed.
-ln --symbolic $(pwd) /var/www/html
-
-# Add Notifications app to the "apps" directory (unless it is already there).
-if [ ! -e "apps/notifications" ]; then
-       (cd apps && git clone --depth 1 --branch ${DEV_BRANCH} https://github.com/nextcloud/notifications)
-fi
-
-INSTALL_AND_CONFIGURE_SERVER_PARAMETERS=""
-if [ "$NEXTCLOUD_SERVER_DOMAIN" != "$DEFAULT_NEXTCLOUD_SERVER_DOMAIN" ]; then
-       INSTALL_AND_CONFIGURE_SERVER_PARAMETERS+="--nextcloud-server-domain $NEXTCLOUD_SERVER_DOMAIN"
-fi
-
-echo "Installing and configuring Nextcloud server"
-# The server is installed and configured using the www-data user as it is the
-# user that Apache sub-processes will be run as; the PHP built-in web server is
-# run as the root user, and in that case the permissions of apps, config and
-# data dirs makes no difference, so this is valid for both cases.
-mkdir data
-chown -R www-data:www-data apps config data
-NEXTCLOUD_DIR=`pwd`
-su --shell /bin/bash --login www-data --command "cd $NEXTCLOUD_DIR && $ACCEPTANCE_TESTS_DIR/installAndConfigureServer.sh $INSTALL_AND_CONFIGURE_SERVER_PARAMETERS"
-
-echo "Saving the default state so acceptance tests can reset to it"
-find . -name ".gitignore" -exec rm --force {} \;
-# Create dummy files in empty directories to force Git to save the directories.
-find . -not -path "*.git*" -type d -empty -exec touch {}/.keep \;
-git add --all && echo 'Default state' | git -c user.name='John Doe' -c user.email='john@doe.org' commit --quiet --file=-
-
-cd tests/acceptance
-
-# Ensure that the Selenium server is ready before running the tests.
-echo "Waiting for Selenium"
-timeout 60s bash -c "while ! curl $SELENIUM_SERVER >/dev/null 2>&1; do sleep 1; done"
-
-vendor/bin/behat --colors --config=$ACCEPTANCE_TESTS_CONFIG_DIR/behat.yml $SCENARIO_TO_RUN
diff --git a/tests/acceptance/run.sh b/tests/acceptance/run.sh
deleted file mode 100755 (executable)
index 8800f65..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-#!/usr/bin/env bash
-
-# @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
-#
-# @license GNU AGPL version 3 or any later version
-#
-# This program 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 (at your option) 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 <http://www.gnu.org/licenses/>.
-
-# Helper script to run the acceptance tests, which test a running Nextcloud
-# instance from the point of view of a real user.
-#
-# The acceptance tests are run in its own Docker container; the grandparent
-# directory of the acceptance tests directory (that is, the root directory of
-# the Nextcloud server) is copied to the container and the acceptance tests are
-# run inside it. Once the tests end the container is stopped. The acceptance
-# tests also use the Selenium server to control a web browser, so the Selenium
-# server is also launched before the tests start in its own Docker container (it
-# will be stopped automatically too once the tests end).
-#
-# To perform its job, the script requires the "docker" command to be available.
-#
-# The Docker Command Line Interface (the "docker" command) requires special
-# permissions to talk to the Docker daemon, and those permissions are typically
-# available only to the root user. Please see the Docker documentation to find
-# out how to give access to a regular user to the Docker daemon:
-# https://docs.docker.com/engine/installation/linux/linux-postinstall/
-#
-# Note, however, that being able to communicate with the Docker daemon is the
-# same as being able to get root privileges for the system. Therefore, you must
-# give access to the Docker daemon (and thus run this script as) ONLY to trusted
-# and secure users:
-# https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
-#
-# Finally, take into account that this script will automatically remove the
-# Docker containers named "selenium-nextcloud-local-test-acceptance" and
-# "nextcloud-local-test-acceptance", even if the script did not create them
-# (probably you will not have containers nor images with those names, but just
-# in case).
-
-# Sets the variables that abstract the differences in command names and options
-# between operating systems.
-#
-# Switches between timeout on GNU/Linux and gtimeout on macOS (same for mktemp
-# and gmktemp).
-function setOperatingSystemAbstractionVariables() {
-       case "$OSTYPE" in
-               darwin*)
-                       if [ "$(which gtimeout)" == "" ]; then
-                               echo "Please install coreutils (brew install coreutils)"
-                               exit 1
-                       fi
-
-                       MKTEMP=gmktemp
-                       TIMEOUT=gtimeout
-                       DOCKER_OPTIONS="-e no_proxy=localhost "
-                       ;;
-               linux*)
-                       MKTEMP=mktemp
-                       TIMEOUT=timeout
-                       DOCKER_OPTIONS=" "
-                       ;;
-               *)
-                       echo "Operating system ($OSTYPE) not supported"
-                       exit 1
-                       ;;
-       esac
-}
-
-# Launches the Selenium server in a Docker container.
-#
-# The acceptance tests use Firefox by default but, unfortunately, Firefox >= 48
-# does not provide yet the same level of support as earlier versions for certain
-# features related to automated testing. Therefore, the Docker image used is not
-# the latest one, but an older version known to work.
-#
-# The acceptance tests expect the Selenium server to be accessible at
-# "127.0.0.1:4444"; as the Selenium server container and the container in which
-# the acceptance tests are run share the same network nothing else needs to be
-# done for the acceptance tests to access the Selenium server and for the
-# Selenium server to access the Nextcloud server. However, in order to ensure
-# from this script that the Selenium server was started the 4444 port of its
-# container is mapped to the 4444 port of the host.
-#
-# Besides the Selenium server, the Docker image also provides a VNC server, so
-# the 5900 port of the container is also mapped to the 5900 port of the host.
-#
-# The Docker container started here will be automatically stopped when the
-# script exits (see cleanUp). If the Selenium server can not be started then the
-# script will be exited immediately with an error state; the most common cause
-# for the Selenium server to fail to start is that another server is already
-# using the mapped ports in the host.
-#
-# As the web browser is run inside the Docker container it is not visible by
-# default. However, it can be viewed using VNC (for example,
-# "vncviewer 127.0.0.1:5900"); when asked for the password use "secret".
-function prepareSelenium() {
-       SELENIUM_CONTAINER=selenium-nextcloud-local-test-acceptance
-
-       echo "Starting Selenium server"
-       docker run --detach --name=$SELENIUM_CONTAINER --publish 4444:4444 --publish 5900:5900 $DOCKER_OPTIONS selenium/standalone-chrome-debug:3.141.59
-
-       echo "Waiting for Selenium server to be ready"
-       if ! $TIMEOUT 10s bash -c "while ! curl 127.0.0.1:4444 >/dev/null 2>&1; do sleep 1; done"; then
-               echo "Could not start Selenium server; running" \
-                    "\"docker run --rm --publish 4444:4444 --publish 5900:5900 $DOCKER_OPTIONS selenium/standalone-chrome-debug:3.141.59\"" \
-                    "could give you a hint of the problem"
-
-               exit 1
-       fi
-}
-
-# Creates a Docker container to run both the acceptance tests and the Nextcloud
-# server used by them.
-#
-# This function starts a Docker container with a copy the Nextcloud code from
-# the grandparent directory, although ignoring any configuration or data that it
-# may provide (for example, if that directory was used directly to deploy a
-# Nextcloud instance in a web server). As the Nextcloud code is copied to the
-# container instead of referenced the original code can be modified while the
-# acceptance tests are running without interfering in them.
-function prepareDocker() {
-       NEXTCLOUD_LOCAL_CONTAINER=nextcloud-local-test-acceptance
-
-       echo "Starting the Nextcloud container"
-       # As the Nextcloud server container uses the network of the Selenium server
-       # container the Nextcloud server can be accessed at "127.0.0.1" from the
-       # Selenium server.
-       # The container exits immediately if no command is given, so a Bash session
-       # is created to prevent that.
-       docker run \
-               --detach \
-               --name=$NEXTCLOUD_LOCAL_CONTAINER \
-               --network=container:$SELENIUM_CONTAINER \
-               --volume composer_cache:/root/.composer \
-               --interactive \
-               --tty ghcr.io/nextcloud/continuous-integration-acceptance-php8.0:latest bash
-
-       # Use the $TMPDIR or, if not set, fall back to /tmp.
-       NEXTCLOUD_LOCAL_TAR="$($MKTEMP --tmpdir="${TMPDIR:-/tmp}" --suffix=.tar nextcloud-local-XXXXXXXXXX)"
-
-       # Setting the user and group of files in the tar would be superfluous, as
-       # "docker cp" does not take them into account (the extracted files are set
-       # to root).
-       echo "Copying local Git working directory of Nextcloud to the container"
-       tar --create --file="$NEXTCLOUD_LOCAL_TAR" \
-               --exclude=".git" \
-               --exclude="./build" \
-               --exclude="./config/config.php" \
-               --exclude="./data" \
-               --exclude="./data-autotest" \
-               --exclude="./tests" \
-               --exclude="./apps-extra" \
-               --exclude="./apps-writable" \
-               --exclude="node_modules" \
-               --directory=../../ \
-               .
-       tar --append --file="$NEXTCLOUD_LOCAL_TAR" --directory=../../ tests/acceptance/
-
-       docker exec $NEXTCLOUD_LOCAL_CONTAINER mkdir /nextcloud
-       docker cp - $NEXTCLOUD_LOCAL_CONTAINER:/nextcloud/ < "$NEXTCLOUD_LOCAL_TAR"
-
-       # run-local.sh expects a Git repository to be available in the root of the
-       # Nextcloud server, but it was excluded when the Git working directory was
-       # copied to the container to avoid copying the large and unneeded history of
-       # the repository.
-       docker exec $NEXTCLOUD_LOCAL_CONTAINER bash -c "cd nextcloud && git init"
-}
-
-# Removes/stops temporal elements created/started by this script.
-function cleanUp() {
-       # Disable (yes, "+" disables) exiting immediately on errors to ensure that
-       # all the cleanup commands are executed (well, no errors should occur during
-       # the cleanup anyway, but just in case).
-       set +o errexit
-
-       echo "Cleaning up"
-
-       if [ -f "$NEXTCLOUD_LOCAL_TAR" ]; then
-               echo "Removing $NEXTCLOUD_LOCAL_TAR"
-           rm $NEXTCLOUD_LOCAL_TAR
-       fi
-
-       # The name filter must be specified as "^/XXX$" to get an exact match; using
-       # just "XXX" would match every name that contained "XXX".
-       if [ -n "$(docker ps --all --quiet --filter name="^/$NEXTCLOUD_LOCAL_CONTAINER$")" ]; then
-               echo "Removing Docker container $NEXTCLOUD_LOCAL_CONTAINER"
-               docker rm --volumes --force $NEXTCLOUD_LOCAL_CONTAINER
-       fi
-
-       if [ -n "$(docker ps --all --quiet --filter name="^/$SELENIUM_CONTAINER$")" ]; then
-               echo "Removing Docker container $SELENIUM_CONTAINER"
-               docker rm --volumes --force $SELENIUM_CONTAINER
-       fi
-}
-
-# Exit immediately on errors.
-set -o errexit
-
-# Execute cleanUp when the script exits, either normally or due to an error.
-trap cleanUp EXIT
-
-# Ensure working directory is script directory, as some actions (like copying
-# the Git working directory to the container) expect that.
-cd "$(dirname $0)"
-
-# "--acceptance-tests-dir XXX" option can be provided to set the directory
-# (relative to the root directory of the Nextcloud server) used to look for the
-# Behat configuration and the Nextcloud installation script.
-# By default it is "tests/acceptance", that is, the acceptance tests for the
-# Nextcloud server itself.
-ACCEPTANCE_TESTS_DIR_OPTION=""
-if [ "$1" = "--acceptance-tests-dir" ]; then
-       ACCEPTANCE_TESTS_DIR_OPTION="--acceptance-tests-dir $2"
-
-       shift 2
-fi
-
-# "--timeout-multiplier N" option can be provided before the specific scenario
-# to run, if any, to set the timeout multiplier to be used in the acceptance
-# tests.
-TIMEOUT_MULTIPLIER_OPTION=""
-if [ "$1" = "--timeout-multiplier" ]; then
-       if [[ ! "$2" =~ ^[0-9]+$ ]]; then
-               echo "--timeout-multiplier must be followed by a positive integer"
-
-               exit 1
-       fi
-
-       TIMEOUT_MULTIPLIER_OPTION="--timeout-multiplier $2"
-
-       shift 2
-fi
-
-# If no parameter is provided to this script all the acceptance tests are run.
-SCENARIO_TO_RUN=$1
-
-setOperatingSystemAbstractionVariables
-
-prepareSelenium
-prepareDocker
-
-echo "Running tests"
-docker exec $NEXTCLOUD_LOCAL_CONTAINER bash -c "cd nextcloud && tests/acceptance/run-local.sh $ACCEPTANCE_TESTS_DIR_OPTION $TIMEOUT_MULTIPLIER_OPTION allow-git-repository-modifications $SCENARIO_TO_RUN"