Skip to content

Commit 8984ac7

Browse files
authored
Merge branch 'develop' into feature/validateVariables
2 parents 264fdea + 2c6d50d commit 8984ac7

File tree

8 files changed

+80
-34
lines changed

8 files changed

+80
-34
lines changed

cypress/cypress-functions.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ export function runOneCypressSpec(specName: string, cb: ((err: any) => void)) {
241241
const browser = process.env.CYPRESS_BROWSER || "electron"
242242
const context = specName.replace("_spec.js", "") + "-" + releaseStage
243243
qmGit.setGithubStatus("pending", context, `Running ${context} Cypress tests...`)
244-
console.info("Running " + specPath + "...")
245244
// noinspection JSUnresolvedFunction
246245
cypress.run({
247246
browser,
@@ -280,6 +279,7 @@ export function runOneCypressSpec(specName: string, cb: ((err: any) => void)) {
280279
console.error(runtimeError)
281280
process.exit(1)
282281
})
282+
qmLog.logEndOfProcess(specPath)
283283
})
284284
}
285285

@@ -305,6 +305,7 @@ function getSpecsPath() {
305305
}
306306

307307
export function runCypressTestsInParallel(cb?: (err: any) => void) {
308+
qmLog.logStartOfProcess("runCypressTestsInParallel")
308309
deleteSuccessFile()
309310
try {
310311
copyCypressEnvConfigIfNecessary()
@@ -340,13 +341,15 @@ export function runCypressTestsInParallel(cb?: (err: any) => void) {
340341
if (cb) {
341342
cb(false)
342343
}
344+
qmLog.logEndOfProcess("runCypressTestsInParallel")
343345
})
344346
})
345347
})
346348
})
347349
}
348350

349351
export function runCypressTests(cb?: (err: any) => void) {
352+
qmLog.logStartOfProcess("runCypressTests")
350353
deleteSuccessFile()
351354
try {
352355
copyCypressEnvConfigIfNecessary()
@@ -379,6 +382,7 @@ export function runCypressTests(cb?: (err: any) => void) {
379382
}
380383
})
381384
}
385+
qmLog.logEndOfProcess("runCypressTests")
382386
resolve()
383387
})
384388
}))
@@ -419,6 +423,7 @@ function deleteLastFailedCypressTest() {
419423
}
420424
// tslint:disable-next-line:unified-signatures
421425
export function runLastFailedCypressTest(cb: (err: any) => void) {
426+
qmLog.logStartOfProcess("runLastFailedCypressTest")
422427
getLastFailedCypressTest()
423428
.then(function(name) {
424429
if (!name) {

cypress/cypress-runner.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as qmLog from "../ts/qm.log"
12
import * as qmTests from "./cypress-functions"
23
import {loadEnv} from "../ts/env-helper"
34
// loadEnv("local")
@@ -9,16 +10,17 @@ const PARALLEL = false // Doesn't work for some reason
910
if (specName) {
1011
console.log("Only running process.env.SPEC_NAME "+specName)
1112
qmTests.runOneCypressSpec(specName, function() {
12-
console.info("Done with "+specName)
13+
qmLog.logEndOfProcess(specName)
1314
})
1415
} else if (PARALLEL) {
1516
console.log("runCypressTestsInParallel")
1617
qmTests.runCypressTestsInParallel()
1718
} else {
1819
console.log("runLastFailedCypressTest and then run runCypressTests")
1920
qmTests.runLastFailedCypressTest(function(err: any): void {
20-
console.log("Done with runLastFailedCypressTest. Going to run all now...")
21+
qmLog.logEndOfProcess("runLastFailedCypressTest")
2122
if (err) { throw err }
23+
console.log("Done with runLastFailedCypressTest. Going to run all now...")
2224
qmTests.runCypressTests()
2325
})
2426
}

gulpfile.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ var qmLog = {
258258
.replace(/\s+/g, '-') // collapse whitespace and replace by a dash
259259
.replace(/-+/g, '-'); // collapse dashes
260260
return str;
261+
},
262+
logStartOfProcess: function (str){
263+
console.log("STARTING "+str+"\n====================================")
264+
},
265+
logEndOfProcess: function (str){
266+
console.log("====================================\n"+"DONE WITH "+str)
261267
}
262268
};
263269
var bugsnag = require("bugsnag");
@@ -1295,7 +1301,26 @@ var timeHelper = {
12951301
secondsAgo: function(unixTimestamp) {return Math.round((timeHelper.getUnixTimestampInSeconds() - unixTimestamp));}
12961302
};
12971303
gulp.Gulp.prototype.__runTask = gulp.Gulp.prototype._runTask; // Lets us get task name
1298-
gulp.Gulp.prototype._runTask = function(task) { this.currentTask = task; this.__runTask(task);};
1304+
gulp.Gulp.prototype._runTask = function(task) {
1305+
this.currentTask = task;
1306+
this.__runTask(task);
1307+
};
1308+
1309+
gulp.on('task_start', function(e) {
1310+
// TODO: batch these
1311+
// so when 5 tasks start at once it only logs one time with all 5
1312+
//gutil.log('Starting', '\'' + chalk.cyan(e.task) + '\'...');
1313+
qmLog.logStartOfProcess(e.task);
1314+
});
1315+
1316+
gulp.on('task_stop', function(e) {
1317+
// var time = prettyTime(e.hrDuration);
1318+
// gutil.log(
1319+
// 'Finished', '\'' + chalk.cyan(e.task) + '\'',
1320+
// 'after', chalk.magenta(time)
1321+
// );
1322+
qmLog.logEndOfProcess(e.task);
1323+
});
12991324
// Set the default to the build task
13001325
gulp.task('default', ['configureApp']);
13011326
// Executes taks specified in winPlatforms, linuxPlatforms, or osxPlatforms based on

package-lock.json

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@slack/types": "1.9.0",
2020
"@slack/webhook": "5.0.3",
2121
"angular": "latest",
22-
"aws-sdk": "2.939.0",
22+
"aws-sdk": "2.940.0",
2323
"aws-sdk-mock": "4.5.0",
2424
"beautify": "0.0.8",
2525
"chai": "4.3.4",
@@ -56,7 +56,7 @@
5656
"fs-extra": "8.1.0",
5757
"ghost-inspector": "4.0.1",
5858
"git-repo-name": "1.0.1",
59-
"husky": "7.0.0",
59+
"husky": "7.0.1",
6060
"ionic-plugin-keyboard": "2.2.1",
6161
"jasmine": "3.8.0",
6262
"js-beautify": "1.14.0",
@@ -86,14 +86,14 @@
8686
"yaml-lint": "1.2.4"
8787
},
8888
"dependencies": {
89-
"@bugsnag/js": "7.10.4",
89+
"@bugsnag/js": "7.10.5",
9090
"@bugsnag/plugin-express": "7.10.0",
9191
"@capacitor/core": "2.4.7",
9292
"@octokit/rest": "16.35.2",
9393
"@types/angular": "latest",
9494
"@types/app-root-path": "1.2.4",
95-
"@types/bluebird": "3.5.35",
96-
"@types/chai": "4.2.19",
95+
"@types/bluebird": "3.5.36",
96+
"@types/chai": "4.2.20",
9797
"@types/dotenv": "6.1.1",
9898
"@types/gulp": "4.0.7",
9999
"@types/mime": "2.0.3",

src/js/qmLogger.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,12 @@ var qmLog = {
853853
.replace(/\s+/g, '-') // collapse whitespace and replace by a dash
854854
.replace(/-+/g, '-'); // collapse dashes
855855
return str;
856+
},
857+
logStartOfProcess: function (str){
858+
console.log("STARTING "+str+"\n====================================")
859+
},
860+
logEndOfProcess: function (str){
861+
console.log("====================================\n"+"DONE WITH "+str)
856862
}
857863
};
858864
function getCalleeFunction(){

ts/qm.git.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ export const githubStatusStates = {
9898
// tslint:disable-next-line:max-line-length
9999
export function setGithubStatus(testState: "error" | "failure" | "pending" | "success", context: string,
100100
description: string, url?: string | null, cb?: ((arg0: any) => void) | undefined) {
101-
if (testState === "error") {
102-
qmLog.error(description + " " + context)
103-
}
101+
if(testState === "pending") {qmLog.logStartOfProcess(context)}
102+
if (testState === "error") {qmLog.error(description + " " + context)}
104103
qmLog.info("Setting status on Github: "+ description + " " + context)
105104
description = _str.truncate(description, 135)
106105
url = url || getBuildLink()
@@ -124,6 +123,7 @@ export function setGithubStatus(testState: "error" | "failure" | "pending" | "su
124123
target_url: url,
125124
}
126125
console.log(`${context} - ${description} - ${testState} at ${url}`)
126+
if(testState !== "pending") {qmLog.logEndOfProcess(context)}
127127
getOctoKit().repos.createStatus(params).then((data: any) => {
128128
if (cb) {
129129
cb(data)

ts/qm.log.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,11 @@ export function logErrorAndThrowException(message: string, object?: any) {
161161
error(message, object)
162162
throw message
163163
}
164+
165+
export function logStartOfProcess(str: string) {
166+
console.log("STARTING "+str+"\n====================================")
167+
}
168+
169+
export function logEndOfProcess(str: string) {
170+
console.log("====================================\n"+"DONE WITH "+str)
171+
}

0 commit comments

Comments
 (0)