Skip to content

Commit

Permalink
Fix issues with build / tests (#527)
Browse files Browse the repository at this point in the history
- update yarn.locks and use --frozen-lockfile on CI

- increase timeouts on server-side pages

- move kill:port to 'posttest'
  • Loading branch information
aarongranick-okta authored Aug 19, 2019
1 parent 064aefa commit 5b2f0c8
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 27 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"cross-env": "^5.1.1",
"ejs": "^2.5.7",
"express-session": "^1.15.5",
"jasmine-protractor-browser-log-reporter": "^1.0.0",
"jasmine-reporters": "^2.2.0",
"jasmine-spec-reporter": "^4.1.0",
"jest": "^23.6.0",
Expand Down
26 changes: 26 additions & 0 deletions test/e2e/harness/start-server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*!
* Copyright (c) 2017-Present, Okta, Inc. and/or its affiliates. All rights reserved.
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
*
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and limitations under the License.
*/

const constants = require('../util/constants');
const util = require('../util/util');

const mockServerOptions = {
issuer: constants.ISSUER,
client_id: constants.WEB_CLIENT_ID || constants.CLIENT_ID,
client_secret: constants.CLIENT_SECRET,
testing: {
disableHttpsCheck: true
}
};

let server = util.createDemoServer(mockServerOptions);
server.start();
6 changes: 6 additions & 0 deletions test/e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@

const JUnitXmlReporter = require('jasmine-reporters').JUnitXmlReporter;
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;
const { ProtractorBrowserLogReporter } = require('jasmine-protractor-browser-log-reporter');

exports.config = {
framework: 'jasmine2',
onPrepare() {
jasmine.getEnv().addReporter(new ProtractorBrowserLogReporter());
jasmine.getEnv().addReporter(new JUnitXmlReporter({
savePath: 'reports/junit',
filePrefix: 'results',
Expand All @@ -34,8 +36,12 @@ exports.config = {
directConnect: true,
specs: ['specs/*.js'],
baseUrl: 'http://localhost:8080/',
loggingPrefs: {
'browser': 'ALL' // for reporter
},
capabilities: {
browserName: 'chrome',
loggingPrefs: { "driver": "INFO", "browser": "INFO" }, // for webdriver
chromeOptions: {
args: [
'--headless',
Expand Down
59 changes: 32 additions & 27 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ acorn@^5.5.3:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"

acorn@^6.0.1:
version "6.2.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51"
version "6.3.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e"

adm-zip@^0.4.9:
version "0.4.13"
Expand Down Expand Up @@ -470,8 +470,8 @@ browser-resolve@^1.11.3:
resolve "1.1.7"

browserstack@^1.5.1:
version "1.5.2"
resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.5.2.tgz#17d8bb76127a1cc0ea416424df80d218f803673f"
version "1.5.3"
resolved "https://registry.yarnpkg.com/browserstack/-/browserstack-1.5.3.tgz#93ab48799a12ef99dbd074dd595410ddb196a7ac"
dependencies:
https-proxy-agent "^2.2.1"

Expand Down Expand Up @@ -967,8 +967,8 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"

escodegen@^1.9.1:
version "1.11.1"
resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.1.tgz#c485ff8d6b4cdb89e27f4a856e91f118401ca510"
version "1.12.0"
resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.12.0.tgz#f763daf840af172bb3a2b6dd7219c0e17f7ff541"
dependencies:
esprima "^3.1.3"
estraverse "^4.2.0"
Expand All @@ -986,8 +986,8 @@ esprima@^4.0.0:
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"

estraverse@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
version "4.3.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"

esutils@^2.0.2:
version "2.0.3"
Expand Down Expand Up @@ -1380,8 +1380,8 @@ got@^8.3.1:
url-to-options "^1.0.1"

graceful-fs@^4.1.11, graceful-fs@^4.1.2:
version "4.2.1"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.1.tgz#1c1f0c364882c868f5bff6512146328336a11b1d"
version "4.2.2"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02"

growly@^1.3.0:
version "1.3.0"
Expand Down Expand Up @@ -1481,10 +1481,8 @@ home-or-tmp@^2.0.0:
os-tmpdir "^1.0.1"

hosted-git-info@^2.1.4:
version "2.8.2"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.2.tgz#a35c3f355ac1249f1093c0c2a542ace8818c171a"
dependencies:
lru-cache "^5.1.1"
version "2.8.4"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.4.tgz#44119abaf4bc64692a16ace34700fed9c03e2546"

html-encoding-sniffer@^1.0.2:
version "1.0.2"
Expand Down Expand Up @@ -1896,6 +1894,13 @@ jasmine-core@~2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"

jasmine-protractor-browser-log-reporter@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/jasmine-protractor-browser-log-reporter/-/jasmine-protractor-browser-log-reporter-1.0.0.tgz#78e16fc0290e9d2a7d73dad2b46ad4d805166b80"
integrity sha1-eOFvwCkOnSp9c9rStGrU2AUWa4A=
dependencies:
moment "^2.18.1"

jasmine-reporters@^2.2.0:
version "2.3.2"
resolved "https://registry.yarnpkg.com/jasmine-reporters/-/jasmine-reporters-2.3.2.tgz#898818ffc234eb8b3f635d693de4586f95548d43"
Expand Down Expand Up @@ -2414,12 +2419,6 @@ lru-cache@^4.0.1, lru-cache@^4.1.3:
pseudomap "^1.0.2"
yallist "^2.1.2"

lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
dependencies:
yallist "^3.0.2"

[email protected]:
version "1.0.11"
resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c"
Expand Down Expand Up @@ -2570,6 +2569,11 @@ mkdirp@^0.5.0, mkdirp@^0.5.1:
dependencies:
minimist "0.0.8"

moment@^2.18.1:
version "2.24.0"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b"
integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==

[email protected]:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
Expand Down Expand Up @@ -3169,8 +3173,8 @@ rc@^1.2.7:
strip-json-comments "~2.0.1"

read-package-json@^2.0.0:
version "2.0.13"
resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a"
version "2.1.0"
resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.0.tgz#e3d42e6c35ea5ae820d9a03ab0c7291217fc51d5"
dependencies:
glob "^7.1.1"
json-parse-better-errors "^1.0.1"
Expand Down Expand Up @@ -3346,8 +3350,8 @@ ret@~0.1.10:
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"

rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1:
version "2.6.3"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
version "2.7.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
dependencies:
glob "^7.1.3"

Expand Down Expand Up @@ -3412,8 +3416,8 @@ [email protected], selenium-webdriver@^3.0.1:
xml2js "^0.4.17"

"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0:
version "5.7.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"

[email protected]:
version "0.17.1"
Expand Down Expand Up @@ -3963,6 +3967,7 @@ [email protected]:
webdriver-manager@^12.0.6, webdriver-manager@^12.1.4:
version "12.1.6"
resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.1.6.tgz#9e5410c506d1a7e0a7aa6af91ba3d5bb37f362b6"
integrity sha512-B1mOycNCrbk7xODw7Jgq/mdD3qzPxMaTsnKIQDy2nXlQoyjTrJTTD0vRpEZI9b8RibPEyQvh9zIZ0M1mpOxS3w==
dependencies:
adm-zip "^0.4.9"
chalk "^1.1.1"
Expand Down Expand Up @@ -4082,7 +4087,7 @@ yallist@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"

yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3:
yallist@^3.0.0, yallist@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9"

Expand Down

0 comments on commit 5b2f0c8

Please sign in to comment.