Skip to content

Commit

Permalink
refactor: e2e-test-config to separate folder (#258)
Browse files Browse the repository at this point in the history
* refactor: e2e-test-config

* fix: change path for multiversion conf

* fix: change path for multiversion conf

Co-authored-by: dominik.feininger <[email protected]>
  • Loading branch information
dominikfeininger and dominikfeininger authored Jun 10, 2022
1 parent d5fbbc0 commit 7321b5d
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ examples/ui5-js-app/webapp/test/__screenshots__/**/*.png
# btp
*.mtar
*.zip
*.mta
10 changes: 5 additions & 5 deletions docker/Dockerfile.standalone
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ COPY ./examples/ui5-js-app/webapp webapp
COPY ./examples/ui5-js-app/ui5.yaml ui5.yaml
COPY ./docker/package-standalone.json package.json
# this is the standard file and allows for a simple call like "wdio"
COPY ./examples/ui5-js-app/wdio-docker-standalone.conf.js wdio.conf.js
COPY ./examples/ui5-js-app/wdio.base.conf.js wdio.base.conf.js
COPY ./examples/ui5-js-app/e2e-test-config/wdio-docker-standalone.conf.js wdio.conf.js
COPY ./examples/ui5-js-app/e2e-test-config/wdio.base.conf.js wdio.base.conf.js
RUN mkdir -p report/screenshots

# install basic setup:
# - local minimal WebdriverIO environment
# install basic setup:
# - local minimal WebdriverIO environment
# and setup, incl standard reporter + Chrome
# - wdi5
RUN npm install

# run wdio + wdi5
CMD npm test
CMD npm test
4 changes: 2 additions & 2 deletions docker/Dockerfile.wdi5
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ WORKDIR /app
# COPY all to root
COPY ../docker/package-wdi5.json package.json
COPY ../examples/ui5-js-app/webapp/test test
COPY ../examples/ui5-js-app/wdio-docker-selenium.conf.js wdio-docker-selenium.conf.js
COPY ../examples/ui5-js-app/wdio.base.conf.js wdio.base.conf.js
COPY ../examples/ui5-js-app/e2e-test-config/wdio-docker-selenium.conf.js wdio-docker-selenium.conf.js
COPY ../examples/ui5-js-app/e2e-test-config/wdio.base.conf.js wdio.base.conf.js

COPY ../ wdio-ui5-service

Expand Down
4 changes: 2 additions & 2 deletions docker/package-app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "test for wdi5 in docker",
"keywords": ["wdio-service", "ui5", "openui5", "sapui5", "docker"],
"scripts": {
"test:docker:grid": "wdio wdio-docker.conf.js",
"test:docker:grid": "wdio e2e-test-config/wdio-docker.conf.js",
"start": "soerver -d ./webapp -p 8888 -x ./webapp/proxyrc.json",
"test:standalone": "wdio run wdio-docker-standalone.conf.js",
"test:standalone": "wdio run e2e-test-config/wdio-docker-standalone.conf.js",
"test:docker:standalone": "run-p start test:standalone"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion docker/package-standalone.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"start:webserver": "soerver -d ./webapp -p 8888 -x ./webapp/proxyrc.json",
"//start:ui5-tooling": "have /app/webapp served on :8080 via ui5 tooling + simpleproxy",
"start:ui5-tooling": "ui5 serve",
"wdi5": "wdio run wdio.conf.js --spec basic.test",
"wdi5": "wdio run e2e-test-config/wdio.conf.js --spec basic.test",
"test": "run-p -r start:* wdi5"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions docker/package-wdi5-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "test for wdi5 in docker",
"keywords": ["wdio-service", "ui5", "openui5", "sapui5", "docker"],
"scripts": {
"test:docker:grid": "wdio wdio-docker.conf.js",
"test:docker:grid": "wdio e2e-test-config/wdio-docker.conf.js",
"start": "soerver -d ./webapp -p 8888 -x ./webapp/proxyrc.json",
"test:standalone": "wdio run wdio-docker-standalone.conf.js",
"test:standalone": "wdio run e2e-test-config/wdio-docker-standalone.conf.js",
"test:docker:standalone": "run-p start test:standalone"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions docker/package-wdi5.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "test for wdi5 in docker",
"keywords": ["wdio-service", "ui5", "openui5", "sapui5", "docker"],
"scripts": {
"test:docker:grid": "wdio wdio-docker.conf.js",
"test:docker:selenium": "wdio wdio-docker-selenium.conf.js",
"test:docker:grid": "wdio e2e-test-config/wdio-docker.conf.js",
"test:docker:selenium": "wdio e2e-test-config/wdio-docker-selenium.conf.js",
"start": "soerver -d ./webapp -p 8888 -x ./webapp/proxyrc.json",
"test:standalone": "wdio run wdio-docker-standalone.conf.js",
"test:standalone": "wdio run e2e-test-config/wdio-docker-standalone.conf.js",
"test:docker:standalone": "run-p start test:standalone"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const versions = ["", "1.71.19", "1.84.3"]
;(async () => {
for (const version of versions) {
// create an index.html for bootstrapping per version
const targetIndex = path.resolve(__dirname, `webapp/index-${version}.html`)
const targetIndex = path.resolve(__dirname, `../webapp/index-${version}.html`)
const bootstrapSrc = `https://openui5nightly.hana.ondemand.com/${version}/resources/sap-ui-core.js`
fsExtra.copySync(path.resolve(__dirname, `webapp/index.html`), targetIndex)
fsExtra.copySync(path.resolve(__dirname, `../webapp/index.html`), targetIndex)
const optionsIndex = {
files: targetIndex,
from: [/src=\".*\"/, /"sap_horizon"/],
Expand All @@ -30,7 +30,7 @@ const versions = ["", "1.71.19", "1.84.3"]
from: [/url: "#"/, /specs: \[.*\]/],
to: [
`url: "index-${version}"`, // this is only b/c of the "soerver" webserver in use...
`specs: ["${path.resolve(__dirname, "webapp/test/e2e/properties-matcher.test.js")}"]`
`specs: ["${path.resolve(__dirname, "../webapp/test/e2e/properties-matcher.test.js")}"]`
]
}
await replace(optionsWdioConf)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions examples/ui5-js-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"test": "run-s test:*",
"test-h": "run-s \"test:* -- --headless\"",
"start": "soerver -d ./webapp -p 8888 -x ./webapp/proxyrc.json",
"test:lateInject": "wdio run wdio-ui5-late.conf.js",
"test:ui5tooling": "wdio run wdio-ui5tooling.conf.js",
"test:webserver": "wdio run wdio-webserver.conf.js",
"test:multiversion": "node wdi5-multiversion.js",
"test-selenium": "wdio run wdio-selenium-service.conf.js"
"test:lateInject": "wdio run e2e-test-config/wdio-ui5-late.conf.js",
"test:ui5tooling": "wdio run e2e-test-config/wdio-ui5tooling.conf.js",
"test:webserver": "wdio run e2e-test-config/wdio-webserver.conf.js",
"test:multiversion": "node e2e-test-config/wdi5-multiversion.js",
"test-selenium": "wdio run e2e-test-config/wdio-selenium-service.conf.js"
},
"devDependencies": {
"@ui5/cli": "^2.14.9",
Expand Down

0 comments on commit 7321b5d

Please sign in to comment.