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"