diff --git a/.drone.yml b/.drone.yml index 4ead024e5ef06b5a458cf1262813b3f34fac2d39..4b60cb32986140d9399d1acc04b58c91acf4fcce 100644 --- a/.drone.yml +++ b/.drone.yml @@ -27,15 +27,16 @@ kind: pipeline name: webpack-build steps: -- name: submodules - image: docker:git - commands: - - git submodule update --init -- name: webpack-build +- name: build image: nextcloudci/node:node-4 commands: + - cd /drone/src - npm ci - npm run build +- name: changes + image: nextcloudci/node:node-4 + commands: + - cd /drone/src - git status - bash -c "[[ ! \"`git status --porcelain `\" ]] || ( echo 'Uncommited changes in webpack build' && exit 1 )" diff --git a/apps/settings/js/vue-6.js b/apps/settings/js/vue-6.js index f0517624d3ae9f039b0eb2ab4dc9d13b21e3bc4e..782bdd1f2aac652f55577bb539b66e2411e08bf2 100644 Binary files a/apps/settings/js/vue-6.js and b/apps/settings/js/vue-6.js differ diff --git a/apps/settings/js/vue-6.js.map b/apps/settings/js/vue-6.js.map index 68e0f13690698f72d156d62b082e8edd5be34a9a..1335f359ecff54d4628e2ac4511387d8353e8a37 100644 Binary files a/apps/settings/js/vue-6.js.map and b/apps/settings/js/vue-6.js.map differ diff --git a/apps/settings/js/vue-settings-apps-users-management.js b/apps/settings/js/vue-settings-apps-users-management.js index bd58aba3031b780f32a1f125ae1589dbf1a0c7e7..c13de733a6a4237701a1b7ca192ec58a55b2c8f7 100644 Binary files a/apps/settings/js/vue-settings-apps-users-management.js and b/apps/settings/js/vue-settings-apps-users-management.js differ diff --git a/apps/settings/js/vue-settings-apps-users-management.js.map b/apps/settings/js/vue-settings-apps-users-management.js.map index 9b0484171dc9d41fcb9019df22a5fd81ee9bc5b6..9a4bf913439bc58a24fdc6e78367164dcfea1484 100644 Binary files a/apps/settings/js/vue-settings-apps-users-management.js.map and b/apps/settings/js/vue-settings-apps-users-management.js.map differ diff --git a/apps/workflowengine/css/multiselect.css b/apps/workflowengine/css/multiselect.css new file mode 100644 index 0000000000000000000000000000000000000000..0c3b8b009eb24bb36aa7457e39c2619b2b1ff279 --- /dev/null +++ b/apps/workflowengine/css/multiselect.css @@ -0,0 +1,12 @@ +#workflowengine .multiselect .multiselect__single { + display: flex; +} + +#workflowengine .option__icon { + min-width: 25px; +} + +#workflowengine input, +#workflowengine .multiselect { + width: 100%; +} diff --git a/apps/workflowengine/js/workflowengine.js b/apps/workflowengine/js/workflowengine.js index ff40c801185c30194b116d2cb74c172ffbd55a8c..c5437eba057059d84028208a55ba1e80bcf26b16 100644 Binary files a/apps/workflowengine/js/workflowengine.js and b/apps/workflowengine/js/workflowengine.js differ diff --git a/apps/workflowengine/js/workflowengine.js.map b/apps/workflowengine/js/workflowengine.js.map index db7d112b8db7d8158f2e150d7f42c0ac54e29a3a..f72959c7487e7a08ff4deeca16c6ab88f50ae111 100644 Binary files a/apps/workflowengine/js/workflowengine.js.map and b/apps/workflowengine/js/workflowengine.js.map differ diff --git a/apps/workflowengine/src/components/Checks/FileMimeType.vue b/apps/workflowengine/src/components/Checks/FileMimeType.vue index 7e07d89aea2b996e5c0510af896f198def885e19..2f2487c9adf43ba2affc61a85db4691d66d0b87b 100644 --- a/apps/workflowengine/src/components/Checks/FileMimeType.vue +++ b/apps/workflowengine/src/components/Checks/FileMimeType.vue @@ -1,3 +1,25 @@ +<!-- + - @copyright Copyright (c) 2019 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/>. + - + --> + <template> <div> <Multiselect @@ -108,5 +130,3 @@ export default { } } </script> - -<style scoped src="./../../css/multiselect.css"></style> diff --git a/apps/workflowengine/src/components/Checks/MultiselectTag/MultiselectTag.vue b/apps/workflowengine/src/components/Checks/MultiselectTag/MultiselectTag.vue index 020ed958733cef53c86c61914e26a47d3b985bc1..c58f53c8e97ea3aec01cc1d45640ed6e8a3b043e 100644 --- a/apps/workflowengine/src/components/Checks/MultiselectTag/MultiselectTag.vue +++ b/apps/workflowengine/src/components/Checks/MultiselectTag/MultiselectTag.vue @@ -56,6 +56,7 @@ export default { required: true }, value: { + type: Array, default() { return [] } diff --git a/apps/workflowengine/src/components/Checks/MultiselectTag/api.js b/apps/workflowengine/src/components/Checks/MultiselectTag/api.js index bdbab2b974f8c41db412ce84f11c5ad107e5e851..2094138edea52bdca2986018001083e7dbf5b088 100644 --- a/apps/workflowengine/src/components/Checks/MultiselectTag/api.js +++ b/apps/workflowengine/src/components/Checks/MultiselectTag/api.js @@ -1,3 +1,25 @@ +/** + * @copyright Copyright (c) 2019 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/>. + * + */ + import axios from 'nextcloud-axios' import { generateRemoteUrl } from 'nextcloud-router' diff --git a/apps/workflowengine/src/components/Checks/MultiselectTag/index.js b/apps/workflowengine/src/components/Checks/MultiselectTag/index.js index 69b7e277e7675fa49a03ce7ab1f80f07e3606ff4..99628cf145a077caa871161736a77f3292b49f39 100644 --- a/apps/workflowengine/src/components/Checks/MultiselectTag/index.js +++ b/apps/workflowengine/src/components/Checks/MultiselectTag/index.js @@ -1,3 +1,25 @@ +/** + * @copyright Copyright (c) 2019 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/>. + * + */ + import MultiselectTag from './MultiselectTag' export default MultiselectTag diff --git a/apps/workflowengine/src/components/Checks/RequestURL.vue b/apps/workflowengine/src/components/Checks/RequestURL.vue index 593d6234998e673d16bcd97f99432d1d157824b4..5f337a669bdfc5e5da62dc6dd28c657e94a660f6 100644 --- a/apps/workflowengine/src/components/Checks/RequestURL.vue +++ b/apps/workflowengine/src/components/Checks/RequestURL.vue @@ -137,5 +137,3 @@ export default { } } </script> - -<style scoped src="./../../css/multiselect.css"></style> diff --git a/apps/workflowengine/src/components/Checks/RequestUserAgent.vue b/apps/workflowengine/src/components/Checks/RequestUserAgent.vue index 9c43ac86326f6f9ac7464fa63b015d997d03d58a..f06aac2e8f76b901cbbe4b0819de5ec244b59fc0 100644 --- a/apps/workflowengine/src/components/Checks/RequestUserAgent.vue +++ b/apps/workflowengine/src/components/Checks/RequestUserAgent.vue @@ -133,5 +133,3 @@ export default { } } </script> - -<style scoped src="./../../css/multiselect.css"></style> diff --git a/apps/workflowengine/src/components/Checks/RequestUserGroup.vue b/apps/workflowengine/src/components/Checks/RequestUserGroup.vue index ccd556c99c77621c0f5f16c4f0a16543237aa55d..1250f1bce09e371ab4d7af0a0e1645f6c1733aef 100644 --- a/apps/workflowengine/src/components/Checks/RequestUserGroup.vue +++ b/apps/workflowengine/src/components/Checks/RequestUserGroup.vue @@ -75,5 +75,3 @@ export default { } } </script> - -<style scoped src="./../../css/multiselect.css"></style> diff --git a/apps/workflowengine/src/components/Checks/file.js b/apps/workflowengine/src/components/Checks/file.js index ce6887316c2622e3916c498351703560b001e5b5..76f998da0078a0e984050ed4ac10efe415e6bee9 100644 --- a/apps/workflowengine/src/components/Checks/file.js +++ b/apps/workflowengine/src/components/Checks/file.js @@ -1,4 +1,4 @@ -/* +/** * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net> * * @author Julius Härtl <jus@bitgrid.net> diff --git a/apps/workflowengine/src/components/Checks/index.js b/apps/workflowengine/src/components/Checks/index.js index d20472111b55a6239bf0e92f0f4e27704e2847e3..4f68f5e074ccec79284055b89b397ab2831b405e 100644 --- a/apps/workflowengine/src/components/Checks/index.js +++ b/apps/workflowengine/src/components/Checks/index.js @@ -1,4 +1,4 @@ -/* +/** * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net> * * @author Julius Härtl <jus@bitgrid.net> diff --git a/apps/workflowengine/src/components/Checks/request.js b/apps/workflowengine/src/components/Checks/request.js index 1059bf45b5a1444682a3bfe85449513ad80fd299..0ff7682cec6e6f4379ca71511b1b9a6dc89f6b7c 100644 --- a/apps/workflowengine/src/components/Checks/request.js +++ b/apps/workflowengine/src/components/Checks/request.js @@ -1,4 +1,4 @@ -/* +/** * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net> * * @author Julius Härtl <jus@bitgrid.net> diff --git a/apps/workflowengine/src/css/multiselect.css b/apps/workflowengine/src/css/multiselect.css deleted file mode 100644 index 8eb7583744b192ca7a1ee9cab5f9486f182745c3..0000000000000000000000000000000000000000 --- a/apps/workflowengine/src/css/multiselect.css +++ /dev/null @@ -1,11 +0,0 @@ -.multiselect::v-deep .multiselect__single { - display: flex; -} - -.option__icon { - min-width: 25px; -} - -input, .multiselect { - width: 100%; -} diff --git a/apps/workflowengine/src/helpers/api.js b/apps/workflowengine/src/helpers/api.js index c2c8d9b6b49543cfadfa82c5c8aec94ee321e165..a6dc3a3d03a97da3d73bb812ed142cd25f4acd6f 100644 --- a/apps/workflowengine/src/helpers/api.js +++ b/apps/workflowengine/src/helpers/api.js @@ -1,4 +1,4 @@ -/* +/** * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net> * * @author Julius Härtl <jus@bitgrid.net> diff --git a/apps/workflowengine/src/helpers/validators.js b/apps/workflowengine/src/helpers/validators.js index 5fb94f66ecfe7fbb320c7a636b048cd5cc28190b..68ced4ae6faf8649dc5ba04ab1927285a16e1dd6 100644 --- a/apps/workflowengine/src/helpers/validators.js +++ b/apps/workflowengine/src/helpers/validators.js @@ -1,4 +1,4 @@ -/* +/** * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net> * * @author Julius Härtl <jus@bitgrid.net> diff --git a/apps/workflowengine/src/mixins/valueMixin.js b/apps/workflowengine/src/mixins/valueMixin.js index e6ea5bbdcf4b8194fb5c1eaf309f74b9df6024cf..8b565936b82b5d7a752dfcb3c8c9123cb580efee 100644 --- a/apps/workflowengine/src/mixins/valueMixin.js +++ b/apps/workflowengine/src/mixins/valueMixin.js @@ -1,4 +1,4 @@ -/* +/** * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net> * * @author Julius Härtl <jus@bitgrid.net> diff --git a/apps/workflowengine/src/workflowengine.js b/apps/workflowengine/src/workflowengine.js index e479bbfa4e81fb8ceb0ab69c5f9360411a59c259..b1c0c28cfaa86f137e27200aff6b2f9c07916ae5 100644 --- a/apps/workflowengine/src/workflowengine.js +++ b/apps/workflowengine/src/workflowengine.js @@ -1,3 +1,25 @@ +/** + * @copyright Copyright (c) 2019 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/>. + * + */ + import Vue from 'vue' import Vuex from 'vuex' import store from './store' @@ -65,6 +87,7 @@ Vue.use(Vuex) Vue.prototype.t = t const View = Vue.extend(Settings) -new View({ +const workflowengine = new View({ store -}).$mount('#workflowengine') +}) +workflowengine.$mount('#workflowengine') diff --git a/apps/workflowengine/templates/settings.php b/apps/workflowengine/templates/settings.php index 855731af66192cce1e68fd90fb9a00326b8b5bc8..2b8a825269524063714f37647424c55b103d828d 100644 --- a/apps/workflowengine/templates/settings.php +++ b/apps/workflowengine/templates/settings.php @@ -18,8 +18,10 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ +use OCA\WorkflowEngine\AppInfo\Application; +style(Application::APP_ID, 'multiselect'); /** @var array $_ */ /** @var \OCP\IL10N $l */ ?> -<div id="<?php p(\OCA\WorkflowEngine\AppInfo\Application::APP_ID); ?>"></div> +<div id="<?php p(Application::APP_ID); ?>"></div> diff --git a/build/files-checker.php b/build/files-checker.php index b985b32f689b5bcd4e5100d4aeefb5a1dd9474b9..81b76d42cd0bef9d50dae1250a496e0308b86bd1 100644 --- a/build/files-checker.php +++ b/build/files-checker.php @@ -25,6 +25,7 @@ $expectedFiles = [ '.babelrc', '.codecov.yml', '.drone.yml', + '.eslintrc.js', '.git', '.gitattributes', '.github', @@ -52,8 +53,8 @@ $expectedFiles = [ 'config', 'console.php', 'contribute', - 'COPYING', 'COPYING-README', + 'COPYING', 'core', 'cron.php', 'index.html', @@ -61,11 +62,11 @@ $expectedFiles = [ 'lib', 'Makefile', 'occ', - 'ocs', - 'ocs-provider', 'ocm-provider', - 'package.json', + 'ocs-provider', + 'ocs', 'package-lock.json', + 'package.json', 'public.php', 'README.md', 'remote.php', diff --git a/core/js/dist/login.js b/core/js/dist/login.js index 70bb6017ea68e7fd2597c50717721cd3fa8e3e4b..257567b5761a56a642258b1139e95849f56d6dde 100644 Binary files a/core/js/dist/login.js and b/core/js/dist/login.js differ diff --git a/core/js/dist/login.js.map b/core/js/dist/login.js.map index 9eb112cbe1a8d4e2208904bf536b2c90be769735..8edb3306efffca543f59a9f7c616c659ad788109 100644 Binary files a/core/js/dist/login.js.map and b/core/js/dist/login.js.map differ diff --git a/core/js/dist/main.js b/core/js/dist/main.js index 99633f9e716dd14802f0fbcd93fe2830c16c02ab..679cccbe37ce1ec65b7698011ff5ff19645ee372 100644 Binary files a/core/js/dist/main.js and b/core/js/dist/main.js differ diff --git a/core/js/dist/main.js.map b/core/js/dist/main.js.map index 0971391d4a1ea0e0c92d0466b74fec5cbc8e0775..62402e3c1d4486b279c7384f0082478066d3d9f5 100644 Binary files a/core/js/dist/main.js.map and b/core/js/dist/main.js.map differ diff --git a/core/js/dist/maintenance.js b/core/js/dist/maintenance.js index aa873b696a692acd328eb821c5a7e93ad9626899..cd7ef22a6ba74dee22a336f5a02e93626b8829a2 100644 Binary files a/core/js/dist/maintenance.js and b/core/js/dist/maintenance.js differ diff --git a/core/js/dist/maintenance.js.map b/core/js/dist/maintenance.js.map index 9c418602ee465824aab564ed372772f5f092d72a..19d155778e6f6461a20c4bf5f6a58ef8fb697513 100644 Binary files a/core/js/dist/maintenance.js.map and b/core/js/dist/maintenance.js.map differ diff --git a/core/src/OC/util-history.js b/core/src/OC/util-history.js index 77607b64022cd967cf376e98296f88b34239654a..dfb5117c27eb888c775ab79eda9e110cfaa5d806 100644 --- a/core/src/OC/util-history.js +++ b/core/src/OC/util-history.js @@ -61,10 +61,11 @@ export default { if (isFirefox && parseInt(navigator.userAgent.split('/').pop()) < 51) { var patterns = document.querySelectorAll('[fill^="url(#"], [stroke^="url(#"], [filter^="url(#invert"]') for (var i = 0, ii = patterns.length, pattern; i < ii; i++) { - const { fill, stroke } = pattern.style pattern = patterns[i] - pattern.style.fill = fill - pattern.style.stroke = stroke + // eslint-disable-next-line no-self-assign + pattern.style.fill = pattern.style.fill + // eslint-disable-next-line no-self-assign + pattern.style.stroke = pattern.style.stroke pattern.removeAttribute('filter') pattern.setAttribute('filter', 'url(#invert)') } diff --git a/package-lock.json b/package-lock.json index e0ba5b4f9cd0ea953627f99b1ce4011110ae95b7..819cea283e2ecc0babf712997a12b71f22fef90b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1450,6 +1450,31 @@ } } }, + "babel-eslint": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.3.tgz", + "integrity": "sha512-z3U7eMY6r/3f3/JB9mTsLjyxrv0Yb1zb8PCWCLpguxfCzBIZUwy23R1t/XKewP+8mEN2Ck8Dtr4q20z6ce6SoA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.0.0", + "@babel/traverse": "^7.0.0", + "@babel/types": "^7.0.0", + "eslint-visitor-keys": "^1.0.0", + "resolve": "^1.12.0" + }, + "dependencies": { + "resolve": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, "babel-loader": { "version": "8.0.6", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.6.tgz", @@ -3101,9 +3126,9 @@ } }, "eslint-config-nextcloud": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/eslint-config-nextcloud/-/eslint-config-nextcloud-0.0.5.tgz", - "integrity": "sha512-innKCAJBpTTdEGriCQduV6XwDySdZ2uHD7PduaKbbSfL12a/eXU6/jcIDfxM3cFAgCN7sJYOSE4/TM9nygO8kQ==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/eslint-config-nextcloud/-/eslint-config-nextcloud-0.0.6.tgz", + "integrity": "sha512-ktCzXVA8GrqZVljutkBKOq2hgKvzKyLhNCAB5bCjdmMo7DIky2ZYeMtDmiEUZCPoXbSJY0kyvnZPbcN4VYzyCg==", "dev": true }, "eslint-config-standard": { diff --git a/package.json b/package.json index 829139712153750201c22921b4efe3a55640a6eb..8b186a5ab6d6912d425dbdd4a5633c9ca5a64efa 100644 --- a/package.json +++ b/package.json @@ -70,12 +70,13 @@ "@babel/core": "^7.6.2", "@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/preset-env": "^7.6.2", + "babel-eslint": "^10.0.3", "babel-loader": "^8.0.6", "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", "browserslist-config-nextcloud": "0.0.1", "css-loader": "^3.2.0", "eslint": "^5.16.0", - "eslint-config-nextcloud": "0.0.5", + "eslint-config-nextcloud": "0.0.6", "eslint-config-standard": "^12.0.0", "eslint-loader": "^3.0.0", "eslint-plugin-import": "^2.18.2", diff --git a/tests/acceptance/features/app-files-tags.feature b/tests/acceptance/features/app-files-tags.feature index 4ee7ad7770d9add35dd00129adcdc2d4cfd8ec0d..5c0942472a8ac01395ebbe4a84556869d79b05f0 100644 --- a/tests/acceptance/features/app-files-tags.feature +++ b/tests/acceptance/features/app-files-tags.feature @@ -31,7 +31,7 @@ Feature: app-files-tags Scenario: create tags using the Administration settings Given I am logged in as the admin And I visit the settings page - And I open the "Tag management" section + And I open the "Workflows" section of the "Administration" group # The "create" button does nothing before JavaScript was initialized, and # the only way to detect that is waiting for the button to select tags to be # shown. @@ -42,7 +42,7 @@ Feature: app-files-tags # Scenario: add tags using the dropdown in the details view # Given I am logged in as the admin # And I visit the settings page -# And I open the "Tag management" section +# And I open the "Workflows" section of the "Administration" group # # The "create" button does nothing before JavaScript was initialized, and # # the only way to detect that is waiting for the button to select tags to be # # shown. @@ -70,7 +70,7 @@ Feature: app-files-tags # Scenario: remove tags using the dropdown in the details view # Given I am logged in as the admin # And I visit the settings page -# And I open the "Tag management" section +# And I open the "Workflows" section of the "Administration" group # # The "create" button does nothing before JavaScript was initialized, and # # the only way to detect that is waiting for the button to select tags to be # # shown. diff --git a/tests/acceptance/features/bootstrap/AppNavigationContext.php b/tests/acceptance/features/bootstrap/AppNavigationContext.php index 356ac0afa465e801589de8a8c73211e8ba9c5328..02a8b1c0152d612479eb9882a59e10d5a807974a 100644 --- a/tests/acceptance/features/bootstrap/AppNavigationContext.php +++ b/tests/acceptance/features/bootstrap/AppNavigationContext.php @@ -45,6 +45,15 @@ class AppNavigationContext implements Context, ActorAwareInterface { 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 */ @@ -79,6 +88,13 @@ class AppNavigationContext implements Context, ActorAwareInterface { $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 */