From d5c132b7f94ce7b4c71c88e62c3059c53865be2e Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Mon, 12 Oct 2020 16:04:20 +0200 Subject: [PATCH 1/8] Add UI tests for settings UI --- .drone.star | 86 +++++++++++++++++++ .gitignore | 1 + settings/package.json | 2 +- .../ui/tests/acceptance/helpers/language.js | 20 +++-- 4 files changed, 100 insertions(+), 9 deletions(-) diff --git a/.drone.star b/.drone.star index 35c55c920..f3ceea31d 100644 --- a/.drone.star +++ b/.drone.star @@ -258,6 +258,7 @@ def testPipelines(ctx): pipelines += uiTests(ctx) pipelines.append(accountsUITests(ctx)) + pipelines.append(settingsUITests(ctx)) return pipelines def testOcisModule(ctx, module): @@ -678,6 +679,91 @@ def accountsUITests(ctx, storage = 'ocis', accounts_hash_difficulty = 4): }, } +def settingsUITests(ctx, storage = 'owncloud', accounts_hash_difficulty = 4): + return { + 'kind': 'pipeline', + 'type': 'docker', + 'name': 'settingsUITests', + 'platform': { + 'os': 'linux', + 'arch': 'amd64', + }, + 'steps': + restoreBuildArtifactCache(ctx, 'ocis-binary-amd64', 'ocis/bin/ocis') + + ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + [ + { + 'name': 'WebUIAcceptanceTests', + 'image': 'webhippie/nodejs:latest', + 'pull': 'always', + 'environment': { + 'SERVER_HOST': 'https://ocis-server:9200', + 'BACKEND_HOST': 'https://ocis-server:9200', + 'RUN_ON_OCIS': 'true', + 'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud/data', + 'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton', + 'WEB_UI_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', + 'TEST_TAGS': 'not @skipOnOCIS and not @skip', + 'LOCAL_UPLOAD_DIR': '/uploads', + 'NODE_TLS_REJECT_UNAUTHORIZED': 0, + 'WEB_PATH': '/srv/app/web', + 'FEATURE_PATH': '/drone/src/settings/ui/tests/acceptance/features', + }, + 'commands': [ + 'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/testing', + 'git clone -b %s --single-branch --no-tags https://github.com/owncloud/web.git /srv/app/web' % (webBranch), + 'cp -r /srv/app/web/tests/acceptance/filesForUpload/* /uploads', + 'cd /srv/app/web', + 'git checkout $WEB_COMMITID', + 'yarn install-all', + 'cd /drone/src/settings', + 'yarn install --all', + 'make test-acceptance-webui' + ], + 'volumes': + [stepVolumeOC10Tests] + + [{ + 'name': 'uploads', + 'path': '/uploads' + }] + }, + ], + 'services': [ + { + 'name': 'redis', + 'image': 'webhippie/redis', + 'pull': 'always', + 'environment': { + 'REDIS_DATABASES': 1 + }, + }, + { + 'name': 'selenium', + 'image': 'selenium/standalone-chrome-debug:3.141.59-20200326', + 'pull': 'always', + 'volumes': [ + { + 'name': 'uploads', + 'path': '/uploads' + } + ], + }, + ], + 'volumes': + [stepVolumeOC10Tests] + + [{ + 'name': 'uploads', + 'temp': {} + }], + 'depends_on': getPipelineNames([buildOcisBinaryForTesting(ctx)]), + 'trigger': { + 'ref': [ + 'refs/heads/master', + 'refs/tags/v*', + 'refs/pull/**', + ], + }, + } + def dockerReleases(ctx): pipelines = [] for arch in config['dockerReleases']['architectures']: diff --git a/.gitignore b/.gitignore index 7557c8ea9..9a2e33a36 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ */coverage.out */checkstyle.xml +*/package-lock.json ocis/config/identifier-registration.yaml */bin diff --git a/settings/package.json b/settings/package.json index 0acd5ac75..12e57e156 100644 --- a/settings/package.json +++ b/settings/package.json @@ -17,7 +17,7 @@ "watch": "rollup -c -w", "test": "echo 'Not implemented'", "generate-api": "node node_modules/swagger-vue-generator/bin/generate-api.js --package-version v0 --source pkg/proto/v0/settings.swagger.json --moduleName settings --destination ui/client/settings/index.js", - "acceptance-tests": "cucumber-js --require-module @babel/register --require-module @babel/polyfill --require ${TEST_INFRA_DIRECTORY}/acceptance/setup.js --require ui/tests/acceptance/stepDefinitions --require ${TEST_INFRA_DIRECTORY}/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOC10}\"" + "acceptance-tests": "cucumber-js --retry 1 --require-module @babel/register --require-module @babel/polyfill --require ${TEST_INFRA_DIRECTORY}/acceptance/setup.js --require ui/tests/acceptance/stepDefinitions --require ${TEST_INFRA_DIRECTORY}/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOC10}\"" }, "devDependencies": { "@babel/core": "^7.13.10", diff --git a/settings/ui/tests/acceptance/helpers/language.js b/settings/ui/tests/acceptance/helpers/language.js index 752ac9833..2c8f90c9e 100644 --- a/settings/ui/tests/acceptance/helpers/language.js +++ b/settings/ui/tests/acceptance/helpers/language.js @@ -3,43 +3,47 @@ const filesMenu = { 'All files', 'Shared with me', 'Shared with others', - 'Trash bin' + 'Deleted files' ], Deutsch: [ 'Alle Dateien', 'Mit mir geteilt', 'Mit anderen geteilt', - 'Papierkorb' + 'Gelöschte Dateien' ], Español: [ 'Todos los archivos', 'Compartido conmigo', 'Compartido con otros', - 'Papelera de reciclaje' + 'Ficheiros eliminados' ], Français: [ 'Tous les fichiers', 'Partagé avec moi', 'Partagé avec autres', - 'Corbeille' + 'Fichiers supprimés' ] } const accountMenu = { English: [ - 'Manage your account', + 'Profile', + 'Settings', 'Log out' ], Deutsch: [ - 'Verwalten Sie Ihr Benutzerkonto', + 'Profil', + 'Einstellungen', 'Abmelden' ], Español: [ - 'Administra tu cuenta', + 'Perfil', + 'Ajustes', 'Salir' ], Français: [ - 'Modifier votre compte', + 'Profil', + 'Paramètres', 'Se déconnecter' ] } From a6df52008e1f1dc2ff8e2a0c29637094fdbbaeb9 Mon Sep 17 00:00:00 2001 From: Dipak Acharya Date: Wed, 14 Oct 2020 14:00:38 +0545 Subject: [PATCH 2/8] update configuration variables for settings ui test in CI --- settings/ui/tests/acceptance/helpers/language.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/settings/ui/tests/acceptance/helpers/language.js b/settings/ui/tests/acceptance/helpers/language.js index 2c8f90c9e..86deb39b5 100644 --- a/settings/ui/tests/acceptance/helpers/language.js +++ b/settings/ui/tests/acceptance/helpers/language.js @@ -15,7 +15,7 @@ const filesMenu = { 'Todos los archivos', 'Compartido conmigo', 'Compartido con otros', - 'Ficheiros eliminados' + 'Archivos borrados' ], Français: [ 'Tous les fichiers', @@ -32,8 +32,8 @@ const accountMenu = { 'Log out' ], Deutsch: [ - 'Profil', - 'Einstellungen', + 'Profile', + 'Settings', 'Abmelden' ], Español: [ From e769bbefd79241c265226c739e953b0a4df5ab92 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 15 Dec 2020 14:51:01 +0100 Subject: [PATCH 3/8] Streamline settings tests --- .drone.star | 1 + accounts/ui/tests/run-acceptance-test.sh | 5 +- .../acceptance/features/settings.feature | 35 +++----- .../ui/tests/acceptance/helpers/language.js | 2 +- .../config/drone/identifier-registration.yml | 16 ---- .../ui/tests/config/drone/ocis-config.json | 27 ------ .../ui/tests/config/drone/proxy-config.json | 82 ------------------- settings/ui/tests/run-acceptance-test.sh | 9 +- 8 files changed, 19 insertions(+), 158 deletions(-) delete mode 100644 settings/ui/tests/config/drone/identifier-registration.yml delete mode 100644 settings/ui/tests/config/drone/ocis-config.json delete mode 100644 settings/ui/tests/config/drone/proxy-config.json diff --git a/.drone.star b/.drone.star index f3ceea31d..64ffe33d8 100644 --- a/.drone.star +++ b/.drone.star @@ -1410,6 +1410,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes=[]): 'WEB_UI_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', 'IDP_IDENTIFIER_REGISTRATION_CONF': '/drone/src/tests/config/drone/identifier-registration.yml', 'OCIS_LOG_LEVEL': 'warn', + 'SETTINGS_DATA_PATH': '/srv/app/tmp/ocis/settings', } # Pass in "default" accounts_hash_difficulty to not set this environment variable. diff --git a/accounts/ui/tests/run-acceptance-test.sh b/accounts/ui/tests/run-acceptance-test.sh index 1b3b990ab..17dbf544c 100755 --- a/accounts/ui/tests/run-acceptance-test.sh +++ b/accounts/ui/tests/run-acceptance-test.sh @@ -29,7 +29,7 @@ trap clean_up SIGHUP SIGINT SIGTERM if [ -z "$TEST_INFRA_DIRECTORY" ] then cleanup=true - testFolder=$(< /dev/urandom LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) + testFolder=$(mktemp -d) printf "creating folder $testFolder for Test infrastructure setup\n\n" export TEST_INFRA_DIRECTORY=$testFolder fi @@ -46,11 +46,10 @@ clean_up() { trap clean_up SIGHUP SIGINT SIGTERM EXIT -cp -r "$WEB_PATH"/tests ./"$testFolder" +cp -r "$WEB_PATH"/tests "$testFolder" export SERVER_HOST=${SERVER_HOST:-https://localhost:9200} export BACKEND_HOST=${BACKEND_HOST:-https://localhost:9200} -export RUN_ON_OCIS='true' export TEST_TAGS=${TEST_TAGS:-"not @skip"} yarn run acceptance-tests "$1" diff --git a/settings/ui/tests/acceptance/features/settings.feature b/settings/ui/tests/acceptance/features/settings.feature index 104bcfe31..ab68a0099 100644 --- a/settings/ui/tests/acceptance/features/settings.feature +++ b/settings/ui/tests/acceptance/features/settings.feature @@ -16,14 +16,24 @@ Feature: Set user specific settings When the user browses to the files page Then the files menu should be listed in language "English" - Scenario: changing the language + Scenario: changing the language (reactive and with page reload) Given user "user1" has logged in using the webUI And the user browses to the settings page When the user changes the language to "Deutsch" Then the setting "Language" should have value "Deutsch" When the user browses to the files page - And the user reloads the current page of the webUI Then the files menu should be listed in language "Deutsch" + And the account menu should be listed in language "Deutsch" + And the files header should be displayed in language "Deutsch" + When the user reloads the current page of the webUI + Then the files menu should be listed in language "Deutsch" + And the account menu should be listed in language "Deutsch" + And the files header should be displayed in language "Deutsch" + When the user browses to the settings page + And the user changes the language to "English" + And the user browses to the files page + When the user browses to the files page + Then the files menu should be listed in language "English" Scenario: changing the language only affects one user Given user "user2" has logged in using the webUI @@ -31,27 +41,6 @@ Feature: Set user specific settings When the user changes the language to "Español" Then the setting "Language" should have value "Español" When the user browses to the files page - And the user reloads the current page of the webUI Then the files menu should be listed in language "Español" When the user re-logs in as "user1" using the webUI - And the user reloads the current page of the webUI Then the files menu should be listed in language "English" - - Scenario: Check the accounts menu when the language is changed - Given user "user2" has logged in using the webUI - And the user browses to the settings page - When the user changes the language to "Deutsch" - And the user reloads the current page of the webUI - Then the setting "Language" should have value "Deutsch" - And the account menu should be listed in language "Deutsch" - When the user changes the language to "Français" - Then the account menu should be listed in language "Français" - - Scenario: Check the files table header menu when the language is changed - Given user "user2" has logged in using the webUI - And the user browses to the settings page - When the user changes the language to "Deutsch" - Then the setting "Language" should have value "Deutsch" - When the user browses to the files page - And the user reloads the current page of the webUI - Then the files header should be displayed in language "Deutsch" diff --git a/settings/ui/tests/acceptance/helpers/language.js b/settings/ui/tests/acceptance/helpers/language.js index 86deb39b5..4d00eaeeb 100644 --- a/settings/ui/tests/acceptance/helpers/language.js +++ b/settings/ui/tests/acceptance/helpers/language.js @@ -32,7 +32,7 @@ const accountMenu = { 'Log out' ], Deutsch: [ - 'Profile', + 'Profil', 'Settings', 'Abmelden' ], diff --git a/settings/ui/tests/config/drone/identifier-registration.yml b/settings/ui/tests/config/drone/identifier-registration.yml deleted file mode 100644 index 7d4b98bc0..000000000 --- a/settings/ui/tests/config/drone/identifier-registration.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- - -# OpenID Connect client registry. -clients: - - id: web - name: OCIS - application_type: web - insecure: yes - trusted: yes - redirect_uris: - - https://ocis-server:9200/oidc-callback.html - - https://ocis-server:9200/ - origins: - - https://ocis-server:9200 - -authorities: diff --git a/settings/ui/tests/config/drone/ocis-config.json b/settings/ui/tests/config/drone/ocis-config.json deleted file mode 100644 index 13328462a..000000000 --- a/settings/ui/tests/config/drone/ocis-config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "server": "https://ocis-server:9200", - "theme": "owncloud", - "version": "0.1.0", - "openIdConnect": { - "metadata_url": "https://ocis-server:9200/.well-known/openid-configuration", - "authority": "https://ocis-server:9200", - "client_id": "web", - "response_type": "code", - "scope": "openid profile email" - }, - "apps": [ - "files", - "draw-io", - "markdown-editor", - "media-viewer" - ], - "external_apps": [ - { - "id": "settings", - "path": "https://ocis-server:9200/settings.js", - "config": { - "url": "https://ocis-server:9200" - } - } - ] -} diff --git a/settings/ui/tests/config/drone/proxy-config.json b/settings/ui/tests/config/drone/proxy-config.json deleted file mode 100644 index a7d5ac7ca..000000000 --- a/settings/ui/tests/config/drone/proxy-config.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "HTTP": { - "Namespace": "com.owncloud" - }, - "policy_selector": { - "static": { - "policy": "reva" - } - }, - "policies": [ - { - "name": "reva", - "routes": [ - { - "endpoint": "/", - "backend": "http://localhost:9100" - }, - { - "endpoint": "/.well-known/", - "backend": "http://localhost:9130" - }, - { - "endpoint": "/konnect/", - "backend": "http://localhost:9130" - }, - { - "endpoint": "/signin/", - "backend": "http://localhost:9130" - }, - { - "endpoint": "/ocs/", - "backend": "http://localhost:9140" - }, - { - "type": "regex", - "endpoint": "/ocs/v[12].php/cloud/user", - "backend": "http://localhost:9110" - }, - { - "endpoint": "/remote.php/", - "backend": "http://localhost:9140" - }, - { - "endpoint": "/dav/", - "backend": "http://localhost:9140" - }, - { - "endpoint": "/webdav/", - "backend": "http://localhost:9140" - }, - { - "endpoint": "/status.php", - "backend": "http://localhost:9140" - }, - { - "endpoint": "/index.php/", - "backend": "http://localhost:9140" - }, - { - "endpoint": "/data", - "backend": "http://localhost:9140" - }, - { - "endpoint": "/api/v0/accounts", - "backend": "http://localhost:9181" - }, - { - "endpoint": "/accounts.js", - "backend": "http://localhost:9181" - }, - { - "endpoint": "/api/v0/settings", - "backend": "http://localhost:9190" - }, - { - "endpoint": "/settings.js", - "backend": "http://localhost:9190" - } - ] - } - ] -} diff --git a/settings/ui/tests/run-acceptance-test.sh b/settings/ui/tests/run-acceptance-test.sh index 53f732533..17dbf544c 100755 --- a/settings/ui/tests/run-acceptance-test.sh +++ b/settings/ui/tests/run-acceptance-test.sh @@ -14,7 +14,7 @@ fi if [ -z "$WEB_UI_CONFIG" ] then - echo "WEB_UI_CONFIG env variable is not set, cannot find ownCloud Web config file" + echo "WEB_UI_CONFIG env variable is not set, cannot find web config file" exit 1 fi @@ -29,7 +29,7 @@ trap clean_up SIGHUP SIGINT SIGTERM if [ -z "$TEST_INFRA_DIRECTORY" ] then cleanup=true - testFolder=$(cat < /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) + testFolder=$(mktemp -d) printf "creating folder $testFolder for Test infrastructure setup\n\n" export TEST_INFRA_DIRECTORY=$testFolder fi @@ -46,13 +46,10 @@ clean_up() { trap clean_up SIGHUP SIGINT SIGTERM EXIT -cp -r "$WEB_PATH/tests" "./$testFolder" +cp -r "$WEB_PATH"/tests "$testFolder" -export NODE_TLS_REJECT_UNAUTHORIZED='0' export SERVER_HOST=${SERVER_HOST:-https://localhost:9200} export BACKEND_HOST=${BACKEND_HOST:-https://localhost:9200} -export OCIS_SETTINGS_STORE=${OCIS_SETTINGS_STORE:-"/var/tmp/ocis/settings"} -export RUN_ON_OCIS=true export TEST_TAGS=${TEST_TAGS:-"not @skip"} yarn run acceptance-tests "$1" From 0ec8df4e4a0c2e8fc6567a1bd1fae6b2b8fce090 Mon Sep 17 00:00:00 2001 From: Dipak Acharya Date: Mon, 21 Dec 2020 11:03:25 +0545 Subject: [PATCH 4/8] [Tests-Only] fix test infra path for settings tests --- accounts/ui/tests/run-acceptance-test.sh | 4 ++-- settings/ui/tests/run-acceptance-test.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/accounts/ui/tests/run-acceptance-test.sh b/accounts/ui/tests/run-acceptance-test.sh index 17dbf544c..1725cf772 100755 --- a/accounts/ui/tests/run-acceptance-test.sh +++ b/accounts/ui/tests/run-acceptance-test.sh @@ -29,9 +29,9 @@ trap clean_up SIGHUP SIGINT SIGTERM if [ -z "$TEST_INFRA_DIRECTORY" ] then cleanup=true - testFolder=$(mktemp -d) + testFolder=$(mktemp -d -p .) printf "creating folder $testFolder for Test infrastructure setup\n\n" - export TEST_INFRA_DIRECTORY=$testFolder + export TEST_INFRA_DIRECTORY=$testFolder/tests fi clean_up() { diff --git a/settings/ui/tests/run-acceptance-test.sh b/settings/ui/tests/run-acceptance-test.sh index 17dbf544c..1725cf772 100755 --- a/settings/ui/tests/run-acceptance-test.sh +++ b/settings/ui/tests/run-acceptance-test.sh @@ -29,9 +29,9 @@ trap clean_up SIGHUP SIGINT SIGTERM if [ -z "$TEST_INFRA_DIRECTORY" ] then cleanup=true - testFolder=$(mktemp -d) + testFolder=$(mktemp -d -p .) printf "creating folder $testFolder for Test infrastructure setup\n\n" - export TEST_INFRA_DIRECTORY=$testFolder + export TEST_INFRA_DIRECTORY=$testFolder/tests fi clean_up() { From 99e097230975d2bee2adfa037e309ca5688a9eba Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Tue, 12 Jan 2021 14:07:39 +0100 Subject: [PATCH 5/8] fix web branch in settings drone pipeline --- .drone.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.star b/.drone.star index 64ffe33d8..c7d02feb1 100644 --- a/.drone.star +++ b/.drone.star @@ -710,7 +710,7 @@ def settingsUITests(ctx, storage = 'owncloud', accounts_hash_difficulty = 4): }, 'commands': [ 'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/testing', - 'git clone -b %s --single-branch --no-tags https://github.com/owncloud/web.git /srv/app/web' % (webBranch), + 'git clone -b $WEB_BRANCH --single-branch --no-tags https://github.com/owncloud/web.git /srv/app/web', 'cp -r /srv/app/web/tests/acceptance/filesForUpload/* /uploads', 'cd /srv/app/web', 'git checkout $WEB_COMMITID', From 58a88b16e2362ebb5a219cf184ca04fc61cf2891 Mon Sep 17 00:00:00 2001 From: Dipak Acharya Date: Wed, 13 Jan 2021 09:21:30 +0545 Subject: [PATCH 6/8] source env vars for ci --- .drone.star | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.star b/.drone.star index c7d02feb1..258eadfc2 100644 --- a/.drone.star +++ b/.drone.star @@ -709,6 +709,7 @@ def settingsUITests(ctx, storage = 'owncloud', accounts_hash_difficulty = 4): 'FEATURE_PATH': '/drone/src/settings/ui/tests/acceptance/features', }, 'commands': [ + 'source /drone/src/.drone.env', 'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/testing', 'git clone -b $WEB_BRANCH --single-branch --no-tags https://github.com/owncloud/web.git /srv/app/web', 'cp -r /srv/app/web/tests/acceptance/filesForUpload/* /uploads', From 21db768e6b3a7ba0ddf00673d5fe7dee7df223a8 Mon Sep 17 00:00:00 2001 From: Dipak Acharya Date: Tue, 4 May 2021 14:26:17 +0545 Subject: [PATCH 7/8] Fix settings ui tests --- settings/nightwatch.conf.js | 2 +- settings/package.json | 2 + .../acceptance/features/settings.feature | 5 +- .../ui/tests/acceptance/helpers/language.js | 6 +- .../pageobjects/filesPageSettingsContext.js | 2 +- .../acceptance/pageobjects/settingsPage.js | 34 ++- .../stepDefinitions/settingsContext.js | 38 ++- settings/ui/tests/run-acceptance-test.sh | 6 - settings/yarn.lock | 272 +++++++++++++++++- 9 files changed, 325 insertions(+), 42 deletions(-) diff --git a/settings/nightwatch.conf.js b/settings/nightwatch.conf.js index da9ff657a..6fd57ff4b 100644 --- a/settings/nightwatch.conf.js +++ b/settings/nightwatch.conf.js @@ -1,7 +1,7 @@ const path = require('path') const WEB_PATH = process.env.WEB_PATH const TEST_INFRA_DIRECTORY = process.env.TEST_INFRA_DIRECTORY -const OCIS_SETTINGS_STORE = process.env.OCIS_SETTINGS_STORE || './ocis-settings-store' +const OCIS_SETTINGS_STORE = process.env.OCIS_SETTINGS_STORE || '/var/tmp/ocis/settings' const config = require(path.join(WEB_PATH, 'nightwatch.conf.js')) diff --git a/settings/package.json b/settings/package.json index 12e57e156..01d23a18b 100644 --- a/settings/package.json +++ b/settings/package.json @@ -77,7 +77,9 @@ "owncloud-design-system": "^6.0.1" }, "dependencies": { + "ldapjs": "^2.2.4", "lodash": "^4.17.15", + "nightwatch-vrt": "^0.2.10", "vuex": "^3.2.0" } } diff --git a/settings/ui/tests/acceptance/features/settings.feature b/settings/ui/tests/acceptance/features/settings.feature index ab68a0099..246f814de 100644 --- a/settings/ui/tests/acceptance/features/settings.feature +++ b/settings/ui/tests/acceptance/features/settings.feature @@ -4,15 +4,16 @@ Feature: Set user specific settings So that I can customize my OCIS experience to my liking Background: - Given these users have been created with default attributes: + Given these users have been created with default attributes and without skeleton files: | username | | user1 | | user2 | + And user "user1" has created folder "simple-folder" Scenario: Check the default settings Given user "user1" has logged in using the webUI And the user browses to the settings page - Then the setting "Language" should have value "Please select" + Then the setting "Language" should not have any value When the user browses to the files page Then the files menu should be listed in language "English" diff --git a/settings/ui/tests/acceptance/helpers/language.js b/settings/ui/tests/acceptance/helpers/language.js index 4d00eaeeb..2d5e51ee2 100644 --- a/settings/ui/tests/acceptance/helpers/language.js +++ b/settings/ui/tests/acceptance/helpers/language.js @@ -3,24 +3,28 @@ const filesMenu = { 'All files', 'Shared with me', 'Shared with others', + 'Shared via link', 'Deleted files' ], Deutsch: [ 'Alle Dateien', 'Mit mir geteilt', 'Mit anderen geteilt', + 'Per Link geteilt', 'Gelöschte Dateien' ], Español: [ 'Todos los archivos', 'Compartido conmigo', 'Compartido con otros', + "Shared via link", 'Archivos borrados' ], Français: [ 'Tous les fichiers', 'Partagé avec moi', 'Partagé avec autres', + "Shared via link", 'Fichiers supprimés' ] } @@ -58,7 +62,7 @@ const filesListHeaderMenu = { Deutsch: [ 'Name', 'Größe', - 'Erneuert', + 'Geändert', 'Aktionen' ], Español: [ diff --git a/settings/ui/tests/acceptance/pageobjects/filesPageSettingsContext.js b/settings/ui/tests/acceptance/pageobjects/filesPageSettingsContext.js index 10dc09e37..f1505ff93 100644 --- a/settings/ui/tests/acceptance/pageobjects/filesPageSettingsContext.js +++ b/settings/ui/tests/acceptance/pageobjects/filesPageSettingsContext.js @@ -78,7 +78,7 @@ module.exports = { selector: '#account-info-container' }, fileTableHeaderItems: { - selector: '//*[@id="files-table-header"]//span[not(*) and not(ancestor::label)]', + selector: '//*[@id="files-personal-table"]//th[not(.//div)]', locateStrategy: 'xpath' } } diff --git a/settings/ui/tests/acceptance/pageobjects/settingsPage.js b/settings/ui/tests/acceptance/pageobjects/settingsPage.js index 32f1c78cf..56adb8783 100644 --- a/settings/ui/tests/acceptance/pageobjects/settingsPage.js +++ b/settings/ui/tests/acceptance/pageobjects/settingsPage.js @@ -31,6 +31,19 @@ module.exports = { let output switch (key) { case 'Language': + let elemfound = true + + // Language value is set to empty at beginning + // In that case jsut return false + await this.api.element('@languageValue', result => { + if (result.status < 0) { + elemfound = false + } + }) + if (!elemfound) { + output = false + break + } await this.waitForElementVisible('@languageValue') .getText('@languageValue', (result) => { output = result.value @@ -42,16 +55,11 @@ module.exports = { return output }, changeSettings: async function (key, value) { - const selectXpath = util.format(this.elements.languageSelect.selector, value) switch (key) { case 'Language': - await this.waitForElementVisible('@languageValue') - .click('@languageValue') - .useXpath() - .waitForElementVisible(this.elements.languageDropdown.selector) - .click(selectXpath) - .waitForElementNotVisible(this.elements.languageDropdown.selector) - .useCss() + await this + .waitForElementVisible('@languageInput') + .setValue('@languageInput', value + '\n') break default: throw new Error('failed to find the setting') @@ -64,16 +72,12 @@ module.exports = { selector: '.oc-page-title' }, languageValue: { - selector: "//label[.='Language']/..//button[starts-with(@id, 'single-choice-toggle')]", + selector: "//label[.='Language']/..//span[@class='vs__selected']", locateStrategy: 'xpath' }, - languageDropdown: { - selector: "//label[.='Language']/..//div[starts-with(@id, 'single-choice-drop')]", + languageInput: { + selector: "//label[.='Language']/..//input", locateStrategy: 'xpath' }, - languageSelect: { - selector: "//label[.='Language']/..//div[starts-with(@id, 'single-choice-drop')]//label[normalize-space()='%s']", - locateStrategy: 'xpath' - } } } diff --git a/settings/ui/tests/acceptance/stepDefinitions/settingsContext.js b/settings/ui/tests/acceptance/stepDefinitions/settingsContext.js index 146e8f3ad..2f995694a 100644 --- a/settings/ui/tests/acceptance/stepDefinitions/settingsContext.js +++ b/settings/ui/tests/acceptance/stepDefinitions/settingsContext.js @@ -2,9 +2,11 @@ const assert = require('assert') const path = require('path') const fs = require('fs-extra') const { client } = require('nightwatch-api') -const { Given, When, Then, After } = require('cucumber') +const { Given, When, Then, After, Before } = require('cucumber') const languageHelper = require('../helpers/language') +const initialLanguageAssignments = [] + Given('the user browses to the settings page', function () { return client.page.settingsPage().navigateAndWaitTillLoaded() }) @@ -14,6 +16,11 @@ Then('the setting {string} should have value {string}', async function (setting, assert.strictEqual(actual, result, 'The setting value doesnt matches to ' + result) }) +Then('the setting {string} should not have any value', async function (setting) { + const actual = await client.page.settingsPage().getSettingsValue(setting) + assert.strictEqual(actual, false, 'The setting value was expected not to be present but was') +}) + When('the user changes the language to {string}', async function (value) { await client.page.settingsPage().changeSettings('Language', value) }) @@ -21,35 +28,48 @@ When('the user changes the language to {string}', async function (value) { Then('the files menu should be listed in language {string}', async function (language) { const menu = await client.page.filesPageSettingsContext().getMenuList() const expected = languageHelper.getFilesMenuForLanguage(language) - assert.deepEqual(menu, expected, 'the menu list were not same') + assert.deepStrictEqual(menu, expected, 'the menu list were not same') }) Then('the account menu should be listed in language {string}', async function (language) { const menu = await client.page.filesPageSettingsContext().getUserMenu() const expected = languageHelper.getUserMenuForLanguage(language) - assert.deepEqual(menu, expected, 'the menu list were not same') + assert.deepStrictEqual(menu, expected, 'the menu list were not same') }) Then('the files header should be displayed in language {string}', async function (language) { const items = await client.page.filesPageSettingsContext().getFileHeaderItems() const expected = languageHelper.getFilesHeaderMenuForLanguage(language) - assert.deepEqual(items, expected, 'the menu list were not same') + assert.deepStrictEqual(items, expected, 'the menu list were not same') }) After(async function () { - const directory = path.join(client.globals.settings_store, 'values') + let directory = path.join(client.globals.settings_store, 'assignments') try { - console.log('Elements') fs.readdirSync(directory).map(element => { - console.log(element) + if (!initialLanguageAssignments.includes(element)) { + fs.unlinkSync(path.join(client.globals.settings_store, 'assignments', element)) + } }) } catch (err) { console.log('Error while reading the settings values from file system... ') } + + directory = path.join(client.globals.settings_store, 'values') try { fs.emptyDirSync(directory) } catch (err) { - console.log('Error while clearing settings values from file system') - console.log('No settings may have been changed by the tests') + console.log('Error while cleaning the settings values from file system... ') } }) + +Before(async function() { + const directory = path.join(client.globals.settings_store, 'assignments') + try { + fs.readdirSync(directory).map(element => { + initialLanguageAssignments.push(element) + }) + } catch (err) { + console.log('Error while reading the settings values from file system... ') + } +}) \ No newline at end of file diff --git a/settings/ui/tests/run-acceptance-test.sh b/settings/ui/tests/run-acceptance-test.sh index 1725cf772..9f9f8f0db 100755 --- a/settings/ui/tests/run-acceptance-test.sh +++ b/settings/ui/tests/run-acceptance-test.sh @@ -6,12 +6,6 @@ then exit 1 fi -if [ -z "$OCIS_SKELETON_DIR" ] -then - echo "OCIS_SKELETON_DIR env variable is not set, cannot find skeleton directory" - exit 1 -fi - if [ -z "$WEB_UI_CONFIG" ] then echo "WEB_UI_CONFIG env variable is not set, cannot find web config file" diff --git a/settings/yarn.lock b/settings/yarn.lock index 11bb61c36..6d0658e54 100644 --- a/settings/yarn.lock +++ b/settings/yarn.lock @@ -1245,6 +1245,11 @@ abstract-leveldown@~6.2.1: level-supports "~1.0.0" xtend "~4.0.0" +abstract-logging@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/abstract-logging/-/abstract-logging-2.0.1.tgz#6b0c371df212db7129b57d2e7fcf282b8bf1c839" + integrity sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA== + acorn-class-fields@^0.3.7: version "0.3.7" resolved "https://registry.yarnpkg.com/acorn-class-fields/-/acorn-class-fields-0.3.7.tgz#a35122f3cc6ad2bb33b1857e79215677fcfdd720" @@ -1554,7 +1559,7 @@ asn1@0.2.2: resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.2.tgz#408fcea7db6a668f119c38a9c244fec90061a7ac" integrity sha1-QI/Op9tqZo8RnDipwkT+yQBhp6w= -asn1@~0.2.3: +asn1@^0.2.4, asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== @@ -1722,6 +1727,13 @@ backoff@2.4.1: dependencies: precond "0.2" +backoff@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" + integrity sha1-9hbtqdPktmuMp/ynn2lXIsX44m8= + dependencies: + precond "0.2" + balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -1754,6 +1766,11 @@ big.js@^5.2.2: resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== +bignumber.js@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-2.4.0.tgz#838a992da9f9d737e0f4b2db0be62bb09dd0c5e8" + integrity sha1-g4qZLan51zfg9LLbC+YrsJ3Qxeg= + binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -1773,6 +1790,11 @@ bluebird@^3.1.1, bluebird@^3.4.1, bluebird@^3.5.0, bluebird@^3.7.2: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== +bmp-js@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/bmp-js/-/bmp-js-0.0.3.tgz#64113e9c7cf1202b376ed607bf30626ebe57b18a" + integrity sha1-ZBE+nHzxICs3btYHvzBibr5XsYo= + bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" @@ -1904,6 +1926,11 @@ buffer-crc32@^0.2.1, buffer-crc32@^0.2.13: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= +buffer-equal@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-0.0.1.tgz#91bc74b11ea405bc916bc6aa908faafa5b4aac4b" + integrity sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs= + buffer-es6@^4.9.2, buffer-es6@^4.9.3: version "4.9.3" resolved "https://registry.yarnpkg.com/buffer-es6/-/buffer-es6-4.9.3.tgz#f26347b82df76fd37e18bcb5288c4970cfd5c404" @@ -2810,6 +2837,11 @@ dom-serializer@^1.0.1, dom-serializer@~1.2.0: domhandler "^4.0.0" entities "^2.0.0" +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + domelementtype@^2.0.1, domelementtype@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.1.0.tgz#a851c080a6d1c3d94344aed151d99f669edf585e" @@ -3059,6 +3091,11 @@ es6-iterator@~2.0.3: es5-ext "^0.10.35" es6-symbol "^3.1.1" +es6-promise@^3.0.2: + version "3.3.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" + integrity sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM= + es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" @@ -3389,6 +3426,11 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" +exif-parser@^0.1.9: + version "0.1.12" + resolved "https://registry.yarnpkg.com/exif-parser/-/exif-parser-0.1.12.tgz#58a9d2d72c02c1f6f02a0ef4a9166272b7760922" + integrity sha1-WKnS1ywCwfbwKg70qRZicrd2CSI= + exit-on-epipe@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" @@ -3476,6 +3518,11 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" +file-type@^3.1.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" + integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek= + file-uri-to-path@1: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" @@ -3775,6 +3822,14 @@ glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" +global@~4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -4144,6 +4199,11 @@ inquirer@^7.0.0: strip-ansi "^6.0.0" through "^2.3.6" +ip-regex@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-1.0.3.tgz#dc589076f659f419c222039a33316f1c7387effd" + integrity sha1-3FiQdvZZ9BnCIgOaMzFvHHOH7/0= + ip@1.1.5, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" @@ -4238,6 +4298,11 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== + is-generator@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/is-generator/-/is-generator-1.0.3.tgz#c14c21057ed36e328db80347966c693f886389f3" @@ -4376,6 +4441,28 @@ jest-worker@^26.2.1: merge-stream "^2.0.0" supports-color "^7.0.0" +jimp@^0.2.28: + version "0.2.28" + resolved "https://registry.yarnpkg.com/jimp/-/jimp-0.2.28.tgz#dd529a937190f42957a7937d1acc3a7762996ea2" + integrity sha1-3VKak3GQ9ClXp5N9Gsw6d2KZbqI= + dependencies: + bignumber.js "^2.1.0" + bmp-js "0.0.3" + es6-promise "^3.0.2" + exif-parser "^0.1.9" + file-type "^3.1.0" + jpeg-js "^0.2.0" + load-bmfont "^1.2.3" + mime "^1.3.4" + mkdirp "0.5.1" + pixelmatch "^4.0.0" + pngjs "^3.0.0" + read-chunk "^1.0.1" + request "^2.65.0" + stream-to-buffer "^0.1.0" + tinycolor2 "^1.1.2" + url-regex "^3.0.0" + join-path@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/join-path/-/join-path-1.1.1.tgz#10535a126d24cbd65f7ffcdf15ef2e631076b505" @@ -4385,6 +4472,11 @@ join-path@^1.1.1: url-join "0.0.1" valid-url "^1" +jpeg-js@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.2.0.tgz#53e448ec9d263e683266467e9442d2c5a2ef5482" + integrity sha1-U+RI7J0mPmgyZkZ+lELSxaLvVII= + js-base64@^2.1.9: version "2.6.4" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4" @@ -4556,6 +4648,13 @@ ldap-filter@0.2.1: dependencies: assert-plus "0.1.5" +ldap-filter@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/ldap-filter/-/ldap-filter-0.3.3.tgz#2b14c68a2a9d4104dbdbc910a1ca85fd189e9797" + integrity sha1-KxTGiiqdQQTb28kQocqF/Riel5c= + dependencies: + assert-plus "^1.0.0" + ldap@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ldap/-/ldap-0.7.1.tgz#320165cd1065079607d83bfbf4308cb45ce791b9" @@ -4573,6 +4672,20 @@ ldap@^0.7.1: optionalDependencies: dtrace-provider "0.4.0" +ldapjs@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/ldapjs/-/ldapjs-2.2.4.tgz#d4e3f4ae2277b6e760a83ebd61f7f5c4097c446b" + integrity sha512-OoeAXPNPPt4D6qva2/p6rkCIHknyYFd42Vp8JhSazBs9BbkEBmoajzj2F0ElD3vR+yAuzIVCjqh1W4uR8dfn0A== + dependencies: + abstract-logging "^2.0.0" + asn1 "^0.2.4" + assert-plus "^1.0.0" + backoff "^2.5.0" + ldap-filter "^0.3.3" + once "^1.4.0" + vasync "^2.2.0" + verror "^1.8.1" + less@^3.9.0: version "3.13.1" resolved "https://registry.yarnpkg.com/less/-/less-3.13.1.tgz#0ebc91d2a0e9c0c6735b83d496b0ab0583077909" @@ -4715,6 +4828,20 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +load-bmfont@^1.2.3: + version "1.4.1" + resolved "https://registry.yarnpkg.com/load-bmfont/-/load-bmfont-1.4.1.tgz#c0f5f4711a1e2ccff725a7b6078087ccfcddd3e9" + integrity sha512-8UyQoYmdRDy81Brz6aLAUhfZLwr5zV0L3taTQ4hju7m6biuwiWiJXjPhBJxbUQJA8PrkvJ/7Enqmwk2sM14soA== + dependencies: + buffer-equal "0.0.1" + mime "^1.3.4" + parse-bmfont-ascii "^1.0.3" + parse-bmfont-binary "^1.0.5" + parse-bmfont-xml "^1.1.4" + phin "^2.9.1" + xhr "^2.0.1" + xtend "^4.0.0" + load-json-file@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" @@ -5028,7 +5155,7 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.46.0" -mime@^1.4.1: +mime@^1.3.4, mime@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== @@ -5038,6 +5165,13 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= + dependencies: + dom-walk "^0.1.0" + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -5055,6 +5189,11 @@ minimalistic-crypto-utils@^1.0.1: dependencies: brace-expansion "^1.1.7" +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -5122,6 +5261,13 @@ minizlib@^2.0.0, minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" +mkdirp@0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + mkdirp@0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.4.tgz#fd01504a6797ec5c9be81ff43d204961ed64a512" @@ -5271,6 +5417,14 @@ nightwatch-api@^3.0.1: "@types/debug" "^4.1.5" debug "^4.3.1" +nightwatch-vrt@^0.2.10: + version "0.2.10" + resolved "https://registry.yarnpkg.com/nightwatch-vrt/-/nightwatch-vrt-0.2.10.tgz#58de29d79983a93edf262d1b5a33eb5f1656a674" + integrity sha512-BBi2c7l1A+UhAtTGEbzX7FBGdbjbMSpuWt7UMyd3dRBPLGNehmjp/tS5+OWatXn+1XxvCo0vfYlk6ofUOo/sRw== + dependencies: + jimp "^0.2.28" + lodash "^4.17.4" + nightwatch@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-1.6.0.tgz#c8b49ef5819a1a0068e454fc4991470eacee245d" @@ -5704,6 +5858,29 @@ parse-asn1@^5.0.0, parse-asn1@^5.1.5: pbkdf2 "^3.0.3" safe-buffer "^5.1.1" +parse-bmfont-ascii@^1.0.3: + version "1.0.6" + resolved "https://registry.yarnpkg.com/parse-bmfont-ascii/-/parse-bmfont-ascii-1.0.6.tgz#11ac3c3ff58f7c2020ab22769079108d4dfa0285" + integrity sha1-Eaw8P/WPfCAgqyJ2kHkQjU36AoU= + +parse-bmfont-binary@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/parse-bmfont-binary/-/parse-bmfont-binary-1.0.6.tgz#d038b476d3e9dd9db1e11a0b0e53a22792b69006" + integrity sha1-0Di0dtPp3Z2x4RoLDlOiJ5K2kAY= + +parse-bmfont-xml@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/parse-bmfont-xml/-/parse-bmfont-xml-1.1.4.tgz#015319797e3e12f9e739c4d513872cd2fa35f389" + integrity sha512-bjnliEOmGv3y1aMEfREMBJ9tfL3WR0i0CKPj61DnSLaoxWR3nLrsQrEbCId/8rF4NyRF0cCqisSVXyQYWM+mCQ== + dependencies: + xml-parse-from-string "^1.0.0" + xml2js "^0.4.5" + +parse-headers@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" + integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== + parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -5784,6 +5961,11 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +phin@^2.9.1: + version "2.9.3" + resolved "https://registry.yarnpkg.com/phin/-/phin-2.9.3.tgz#f9b6ac10a035636fb65dfc576aaaa17b8743125c" + integrity sha512-CzFr90qM24ju5f88quFC/6qohjC144rehe5n6DH900lgXmUe86+xCKc10ev56gRKC4/BkHUoG4uSiQgBiIXwDA== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" @@ -5813,6 +5995,13 @@ pirates@^4.0.0: dependencies: node-modules-regexp "^1.0.0" +pixelmatch@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-4.0.2.tgz#8f47dcec5011b477b67db03c243bc1f3085e8854" + integrity sha1-j0fc7FARtHe2fbA8JDvB8wheiFQ= + dependencies: + pngjs "^3.0.0" + pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" @@ -5827,6 +6016,11 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" +pngjs@^3.0.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" + integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== + pofile@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pofile/-/pofile-1.1.0.tgz#9ce84bbef5043ceb4f19bdc3520d85778fad4f94" @@ -5989,7 +6183,7 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.11.1: +process@^0.11.1, process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= @@ -6330,6 +6524,11 @@ raw-body@^2.2.0: iconv-lite "0.4.24" unpipe "1.0.0" +read-chunk@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-chunk/-/read-chunk-1.0.1.tgz#5f68cab307e663f19993527d9b589cace4661194" + integrity sha1-X2jKswfmY/GZk1J9m1icrORmEZQ= + read-package-json-fast@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-2.0.2.tgz#2dcb24d9e8dd50fb322042c8c35a954e6cc7ac9e" @@ -6496,7 +6695,7 @@ request-promise@^4.2.5: stealthy-require "^1.1.1" tough-cookie "^2.3.3" -request@^2.88.2: +request@^2.65.0, request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -6735,7 +6934,7 @@ sass@^1.18.0: dependencies: chokidar ">=2.0.0 <4.0.0" -sax@^1.2.4, sax@~1.2.4: +sax@>=0.6.0, sax@^1.2.4, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -7044,6 +7243,18 @@ stealthy-require@^1.1.1: resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= +stream-to-buffer@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stream-to-buffer/-/stream-to-buffer-0.1.0.tgz#26799d903ab2025c9bd550ac47171b00f8dd80a9" + integrity sha1-JnmdkDqyAlyb1VCsRxcbAPjdgKk= + dependencies: + stream-to "~0.2.0" + +stream-to@~0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/stream-to/-/stream-to-0.2.2.tgz#84306098d85fdb990b9fa300b1b3ccf55e8ef01d" + integrity sha1-hDBgmNhf25kLn6MAsbPM9V6O8B0= + string-argv@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" @@ -7330,6 +7541,11 @@ thunkify@^2.1.2: resolved "https://registry.yarnpkg.com/thunkify/-/thunkify-2.1.2.tgz#faa0e9d230c51acc95ca13a361ac05ca7e04553d" integrity sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0= +tinycolor2@^1.1.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" + integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== + title-case@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" @@ -7587,6 +7803,13 @@ url-join@0.0.1: resolved "https://registry.yarnpkg.com/url-join/-/url-join-0.0.1.tgz#1db48ad422d3402469a87f7d97bdebfe4fb1e3c8" integrity sha1-HbSK1CLTQCRpqH99l73r/k+x48g= +url-regex@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/url-regex/-/url-regex-3.2.0.tgz#dbad1e0c9e29e105dd0b1f09f6862f7fdb482724" + integrity sha1-260eDJ4p4QXdCx8J9oYvf9tIJyQ= + dependencies: + ip-regex "^1.0.1" + url-search-params-polyfill@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/url-search-params-polyfill/-/url-search-params-polyfill-8.1.0.tgz#5c15b69687165bfd4f6c7d8a161d70d85385885b" @@ -7646,6 +7869,13 @@ vasync@1.6.2: dependencies: verror "1.1.0" +vasync@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/vasync/-/vasync-2.2.0.tgz#cfde751860a15822db3b132bc59b116a4adaf01b" + integrity sha1-z951GGChWCLbOxMrxZsRakra8Bs= + dependencies: + verror "1.10.0" + verror@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.1.0.tgz#2a4b4eb14a207051e75a6f94ee51315bf173a1b0" @@ -7653,7 +7883,7 @@ verror@1.1.0: dependencies: extsprintf "1.0.0" -verror@1.10.0, verror@^1.9.0: +verror@1.10.0, verror@^1.8.1, verror@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= @@ -7838,6 +8068,16 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" +xhr@^2.0.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" + integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== + dependencies: + global "~4.4.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + xml-js@^1.6.11: version "1.6.11" resolved "https://registry.yarnpkg.com/xml-js/-/xml-js-1.6.11.tgz#927d2f6947f7f1c19a316dd8eea3614e8b18f8e9" @@ -7845,6 +8085,24 @@ xml-js@^1.6.11: dependencies: sax "^1.2.4" +xml-parse-from-string@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/xml-parse-from-string/-/xml-parse-from-string-1.0.1.tgz#a9029e929d3dbcded169f3c6e28238d95a5d5a28" + integrity sha1-qQKekp09vN7RafPG4oI42VpdWig= + +xml2js@^0.4.5: + version "0.4.23" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" + integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== + dependencies: + sax ">=0.6.0" + xmlbuilder "~11.0.0" + +xmlbuilder@~11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" + integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== + xregexp@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-2.0.0.tgz#52a63e56ca0b84a7f3a5f3d61872f126ad7a5943" @@ -7862,7 +8120,7 @@ xtend@^2.2.0: resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.2.0.tgz#eef6b1f198c1c8deafad8b1765a04dad4a01c5a9" integrity sha1-7vax8ZjByN6vrYsXZaBNrUoBxak= -xtend@^4.0.2, xtend@~4.0.0: +xtend@^4.0.0, xtend@^4.0.2, xtend@~4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== From e006f1032472e6fdcf64acb5261b01f8407a0d65 Mon Sep 17 00:00:00 2001 From: Dipak Acharya Date: Wed, 5 May 2021 08:22:08 +0545 Subject: [PATCH 8/8] Fix command to run ui test for settings in drone --- .drone.star | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.star b/.drone.star index 258eadfc2..d9a02b97c 100644 --- a/.drone.star +++ b/.drone.star @@ -679,7 +679,7 @@ def accountsUITests(ctx, storage = 'ocis', accounts_hash_difficulty = 4): }, } -def settingsUITests(ctx, storage = 'owncloud', accounts_hash_difficulty = 4): +def settingsUITests(ctx, storage = 'ocis', accounts_hash_difficulty = 4): return { 'kind': 'pipeline', 'type': 'docker', @@ -700,22 +700,22 @@ def settingsUITests(ctx, storage = 'owncloud', accounts_hash_difficulty = 4): 'BACKEND_HOST': 'https://ocis-server:9200', 'RUN_ON_OCIS': 'true', 'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud/data', - 'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton', 'WEB_UI_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', 'TEST_TAGS': 'not @skipOnOCIS and not @skip', 'LOCAL_UPLOAD_DIR': '/uploads', 'NODE_TLS_REJECT_UNAUTHORIZED': 0, 'WEB_PATH': '/srv/app/web', 'FEATURE_PATH': '/drone/src/settings/ui/tests/acceptance/features', + 'OCIS_SETTINGS_STORE': '/srv/app/tmp/ocis/settings', }, 'commands': [ - 'source /drone/src/.drone.env', + '. /drone/src/.drone.env', 'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/testing', 'git clone -b $WEB_BRANCH --single-branch --no-tags https://github.com/owncloud/web.git /srv/app/web', 'cp -r /srv/app/web/tests/acceptance/filesForUpload/* /uploads', 'cd /srv/app/web', 'git checkout $WEB_COMMITID', - 'yarn install-all', + 'yarn install --all', 'cd /drone/src/settings', 'yarn install --all', 'make test-acceptance-webui'