Skip to content

Commit a3f53ac

Browse files
committed
link to buildid + show error when project failed
1 parent 40322ac commit a3f53ac

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/utils/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export interface ICapability {
1111
browserName: string;
1212
platform: string;
1313
version: string | number;
14+
screenResolution?: string;
1415
localHttpPorts?: number[];
1516
build?: string;
1617
headless?: boolean;

src/utils/poller.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ interface IPollResponse {
3434
runs: IRun[];
3535
version: string;
3636
build?: string;
37+
build_id?: number;
3738
}
3839

3940
export default class Poller {
@@ -57,17 +58,20 @@ export default class Poller {
5758
const status = this.getStatus(response);
5859

5960
if (status === IStatus.DONE) {
60-
spinner.succeed('Cypress Project has finished running on TestingBot');
61-
6261
const errors = this.getErrors(response);
6362
if (errors.length === 0) {
63+
spinner.succeed(
64+
'Cypress Project has finished running on TestingBot',
65+
);
6466
if (this.intervalId) {
6567
clearInterval(this.intervalId);
6668
this.intervalId = undefined;
6769
}
6870
return resolve(response);
6971
}
7072

73+
spinner.fail('Cypress Project has finished running on TestingBot');
74+
7175
if (this.intervalId) {
7276
clearInterval(this.intervalId);
7377
this.intervalId = undefined;
@@ -103,14 +107,9 @@ export default class Poller {
103107
);
104108
} else if (status === IStatus.READY && !this.initSuccess) {
105109
this.initSuccess = true;
106-
for (let i = 0; i < response.runs.length; i++) {
107-
const testCase = response.runs[i].test;
108-
if (testCase) {
109-
log.info(`Testcase started on:
110-
Browser: ${testCase.environment.name}
111-
OS: ${testCase.environment.os}
112-
View live stream https://testingbot.com/members/tests/${testCase.sessionId}`);
113-
}
110+
if (response.build_id) {
111+
log.info(`Cypress Job started.
112+
View results on https://testingbot.com/members/builds/${response.build_id}`);
114113
}
115114

116115
this.runner.onReady();

0 commit comments

Comments
 (0)