Streamline settings tests

This commit is contained in:
Benedikt Kulmann
2020-12-15 14:51:01 +01:00
committed by Dipak Acharya
parent a6df52008e
commit e769bbefd7
8 changed files with 19 additions and 158 deletions

View File

@@ -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.

View File

@@ -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"

View File

@@ -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"

View File

@@ -32,7 +32,7 @@ const accountMenu = {
'Log out'
],
Deutsch: [
'Profile',
'Profil',
'Settings',
'Abmelden'
],

View File

@@ -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:

View File

@@ -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"
}
}
]
}

View File

@@ -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"
}
]
}
]
}

View File

@@ -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"