Skip to content

Commit

Permalink
Merge pull request #2780 from owncloud/update-web-4.5.0
Browse files Browse the repository at this point in the history
[full-ci] Bump web to v4.5.0
  • Loading branch information
wkloucek authored Nov 17, 2021
2 parents 7de4616 + d2395f5 commit 3cd5d52
Show file tree
Hide file tree
Showing 12 changed files with 606 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ CORE_COMMITID=4e808c1a89462fb91d2439dc3d9c490ebced3139
CORE_BRANCH=master

# The test runner source for UI tests
WEB_COMMITID=6f6855ebdea9ef5eb956ce517f3742e7018bccfa
WEB_COMMITID=82e69d203bfb44a2a652a4c052fe7ce795bb1100
WEB_BRANCH=master
18 changes: 9 additions & 9 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,9 @@ def uiTestPipeline(ctx, filterTags, early_fail, runPart = 1, numberOfParts = 1,
"cp -r tests/acceptance/filesForUpload/* /uploads",
"yarn install --immutable",
"yarn build",
"./tests/acceptance/run.sh",
"cd tests/acceptance/",
"yarn install --immutable",
"./run.sh",
],
"volumes": [stepVolumeOC10Tests] +
[{
Expand Down Expand Up @@ -671,7 +673,6 @@ def accountsUITests(ctx, storage = "ocis", 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",
Expand All @@ -681,13 +682,12 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
},
"commands": [
". /drone/src/.drone.env",
"git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/testing",
# we need to have Web around for some general step definitions (eg. how to log in)
"git clone -b $WEB_BRANCH --single-branch --no-tags https://github.com/owncloud/web.git /srv/app/web",
"cd /srv/app/web",
"git checkout $WEB_COMMITID",
"cp -r tests/acceptance/filesForUpload/* /uploads",
"yarn install --immutable",
"yarn build",
# TODO: settings/package.json has all the acceptance test dependencies
# they shouldn't be needed since we could also use them from web:/tests/acceptance/package.json
"cd /drone/src/accounts",
"yarn install --immutable",
"make test-acceptance-webui",
Expand Down Expand Up @@ -745,12 +745,12 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
},
"commands": [
". /drone/src/.drone.env",
"git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/testing",
# we need to have Web around for some general step definitions (eg. how to log in)
"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 --immutable",
# TODO: settings/package.json has all the acceptance test dependencies
# they shouldn't be needed since we could also use them from web:/tests/acceptance/package.json
"cd /drone/src/settings",
"yarn install --immutable",
"make test-acceptance-webui",
Expand Down
12 changes: 5 additions & 7 deletions accounts/nightwatch.conf.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
const path = require('path')
const WEB_PATH = process.env.WEB_PATH
const TEST_INFRA_DIRECTORY = process.env.TEST_INFRA_DIRECTORY

const config = require(path.join(WEB_PATH, 'nightwatch.conf.js'))
const config = require(path.join(TEST_INFRA_DIRECTORY, 'nightwatch.conf.js'))

config.page_objects_path = [WEB_PATH + '/tests/acceptance/pageObjects', 'ui/tests/acceptance/pageobjects']
config.custom_commands_path = WEB_PATH + '/tests/acceptance/customCommands'
config.page_objects_path = [TEST_INFRA_DIRECTORY + '/pageObjects', 'ui/tests/acceptance/pageobjects']
config.custom_commands_path = TEST_INFRA_DIRECTORY + '/customCommands'

module.exports = {
...config
}
module.exports = config
3 changes: 2 additions & 1 deletion accounts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"license": "Apache-2.0",
"author": "ownCloud GmbH <[email protected]>",
"scripts": {
"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 @cucumber/pretty-formatter -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}/setup.js --require ui/tests/acceptance/stepDefinitions --require ${TEST_INFRA_DIRECTORY}/stepDefinitions --format @cucumber/pretty-formatter -t \"${TEST_TAGS:-not @skip and not @skipOnOC10}\"",
"build": "rollup -c",
"generate-api": "node node_modules/swagger-vue-generator/bin/generate-api.js --package-version v0 --source pkg/proto/v0/accounts.swagger.json --moduleName accounts --destination ui/client/accounts/index.js",
"lint": "eslint ui/**/*.vue ui/**/*.js --color --global requirejs --global require",
Expand Down Expand Up @@ -47,6 +47,7 @@
"@rollup/plugin-json": "^4.0.1",
"@rollup/plugin-replace": "^2.3.0",
"archiver": "^5.3.0",
"chromedriver": "^93.0.1",
"cross-env": "^7.0.3",
"easygettext": "^2.17.0",
"eslint": "7.24.0",
Expand Down
10 changes: 2 additions & 8 deletions accounts/ui/tests/run-acceptance-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -31,7 +25,7 @@ then
cleanup=true
testFolder=$(mktemp -d -p .)
printf "creating folder $testFolder for Test infrastructure setup\n\n"
export TEST_INFRA_DIRECTORY=$testFolder/tests
export TEST_INFRA_DIRECTORY=$(realpath $testFolder)
fi

clean_up() {
Expand All @@ -46,7 +40,7 @@ clean_up() {

trap clean_up SIGHUP SIGINT SIGTERM EXIT

cp -r "$WEB_PATH"/tests "$testFolder"
cp -r $(ls -d "$WEB_PATH"/tests/acceptance/* | grep -v 'node_modules') "$testFolder"

export SERVER_HOST=${SERVER_HOST:-https://localhost:9200}
export BACKEND_HOST=${BACKEND_HOST:-https://localhost:9200}
Expand Down
Loading

0 comments on commit 3cd5d52

Please sign in to comment.