Skip to content

Commit

Permalink
use ssl in e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
inodb committed Feb 11, 2019
1 parent a3595f8 commit 6b3f1b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ jobs:
name: "Install http server"
command: "yarn add http-server"
- run:
name: "Spin up frontend repo and run end to end tests"
name: "Spin up frontend over ssl and run end to end tests"
command: |
./node_modules/http-server/bin/http-server --cors dist/ -p 3000 & \
openssl req -newkey rsa:2048 -new -nodes -x509 -days 1 -keyout key.pem -out cert.pem -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=localhost" && \
./node_modules/http-server/bin/http-server -S -C cert.pem --cors dist/ -p 3000 & \
cd end-to-end-tests && \
yarn install --frozen-lockfile && \
./node_modules/webdriver-manager/bin/webdriver-manager update --versions.chrome '2.42' && \
Expand All @@ -108,7 +109,7 @@ jobs:
sleep 5s && \
curl $CBIOPORTAL_URL > /dev/null && \
sleep 20s && \
curl http://localhost:3000 > /dev/null && \
curl --insecure https://localhost:3000 > /dev/null && \
sleep 1s && \
cd end-to-end-tests && \
yarn run test-webdriver-manager
Expand Down
4 changes: 1 addition & 3 deletions end-to-end-tests/specs/specUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ function goToUrlAndSetLocalStorage(url) {
if (!useExternalFrontend) {
browser.url(url);
} else {
var cleanUrl = url.replace(/^http[s]?:\/\//,''); // remove protocol
var urlparam = useLocalDist? 'localdist' : 'localdev';
var prefix = (url.indexOf("?") > 0)? '&' : '?';
// always use http
browser.url(`http://${cleanUrl}${prefix}${urlparam}=true`);
browser.url(`${url}${prefix}${urlparam}=true`);
}
browser.setViewportSize({ height: 1600, width: 1000 });

Expand Down
2 changes: 1 addition & 1 deletion end-to-end-tests/wdio/webdriver-manager.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ exports.config = {

browserName: 'chrome',
chromeOptions: {
args: ['--disable-composited-antialiasing']
args: ['--disable-composited-antialiasing','--allow-insecure-localhost']
}

// chromeOptions: {
Expand Down

0 comments on commit 6b3f1b7

Please sign in to comment.