Skip to content

Commit 300cac9

Browse files
committed
Add support for maestro-chrome-onboarding
1 parent 48b139c commit 300cac9

File tree

5 files changed

+15
-2
lines changed

5 files changed

+15
-2
lines changed

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ inputs:
103103
use-beta:
104104
description: 'Use the beta version of the DCD CLI instead of the latest stable version'
105105
required: false
106+
maestro-chrome-onboarding:
107+
description: '[Android only] Force Maestro-based Chrome onboarding - note: this will slow your tests but can fix browser related crashes. See https://docs.devicecloud.dev/reference/chrome-onboarding for more information.'
108+
required: false
109+
106110

107111
outputs:
108112
DEVICE_CLOUD_CONSOLE_URL:

dist/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30005,7 +30005,7 @@ const getLatestDcdVersion = (...args_1) => __awaiter(void 0, [...args_1], void 0
3000530005
const run = () => __awaiter(void 0, void 0, void 0, function* () {
3000630006
var _a;
3000730007
try {
30008-
const { additionalAppBinaryIds, additionalAppFiles, androidApiLevel, androidDevice, apiKey, apiUrl, appBinaryId, appFilePath, async, config, deviceLocale, downloadArtifacts, env, excludeFlows, excludeTags, googlePlay, ignoreShaCheck, includeTags, iOSVersion, iosDevice, jsonFile, maestroVersion, name, orientation, report, retry, workspaceFolder, runnerType, debug, moropoV1ApiKey, useBeta, } = yield (0, params_1.getParameters)();
30008+
const { additionalAppBinaryIds, additionalAppFiles, androidApiLevel, androidDevice, apiKey, apiUrl, appBinaryId, appFilePath, async, config, deviceLocale, downloadArtifacts, env, excludeFlows, excludeTags, googlePlay, ignoreShaCheck, includeTags, iOSVersion, iosDevice, jsonFile, maestroVersion, name, orientation, report, retry, workspaceFolder, runnerType, debug, moropoV1ApiKey, useBeta, maestroChromeOnboarding, } = yield (0, params_1.getParameters)();
3000930009
const dcdVersionString = yield getLatestDcdVersion(useBeta);
3001030010
const params = {
3001130011
'additional-app-binary-ids': additionalAppBinaryIds,
@@ -30037,6 +30037,7 @@ const run = () => __awaiter(void 0, void 0, void 0, function* () {
3003730037
'json-file': jsonFile,
3003830038
debug,
3003930039
'moropo-v1-api-key': moropoV1ApiKey,
30040+
'maestro-chrome-onboarding': maestroChromeOnboarding,
3004030041
};
3004130042
let paramsString = Object.keys(params).reduce((acc, key) => {
3004230043
if (!params[key])
@@ -30271,6 +30272,7 @@ function getParameters() {
3027130272
required: false,
3027230273
});
3027330274
const useBeta = core.getInput('use-beta', { required: false }) === 'true';
30275+
const maestroChromeOnboarding = core.getInput('maestro-chrome-onboarding', { required: false }) === 'true';
3027430276
if (!(appFilePath !== '') !== (appBinaryId !== '')) {
3027530277
throw new Error('Either app-file or app-binary-id must be used');
3027630278
}
@@ -30310,6 +30312,7 @@ function getParameters() {
3031030312
debug,
3031130313
moropoV1ApiKey,
3031230314
useBeta,
30315+
maestroChromeOnboarding,
3031330316
};
3031430317
});
3031530318
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dcd-github-action",
33
"description": "run maestro tests on devicecloud.dev",
44
"author": "devicecloud.dev",
5-
"version": "2.0.3",
5+
"version": "2.0.4",
66
"main": "src/index.ts",
77
"license": "MIT",
88
"engines": {

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ const run = async (): Promise<void> => {
131131
debug,
132132
moropoV1ApiKey,
133133
useBeta,
134+
maestroChromeOnboarding,
134135
} = await getParameters();
135136

136137
const dcdVersionString = await getLatestDcdVersion(useBeta);
@@ -165,6 +166,7 @@ const run = async (): Promise<void> => {
165166
'json-file': jsonFile,
166167
debug,
167168
'moropo-v1-api-key': moropoV1ApiKey,
169+
'maestro-chrome-onboarding': maestroChromeOnboarding,
168170
};
169171

170172
let paramsString = Object.keys(params).reduce((acc, key) => {

src/methods/params.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export type Params = {
3333
debug?: boolean;
3434
moropoV1ApiKey?: string;
3535
useBeta?: boolean;
36+
maestroChromeOnboarding?: boolean;
3637
};
3738

3839
function getAndroidApiLevel(apiLevel?: string): number | undefined {
@@ -184,6 +185,8 @@ export async function getParameters(): Promise<Params> {
184185
});
185186
const useBeta = core.getInput('use-beta', { required: false }) === 'true';
186187

188+
const maestroChromeOnboarding = core.getInput('maestro-chrome-onboarding', { required: false }) === 'true';
189+
187190
if (!(appFilePath !== '') !== (appBinaryId !== '')) {
188191
throw new Error('Either app-file or app-binary-id must be used');
189192
}
@@ -228,5 +231,6 @@ export async function getParameters(): Promise<Params> {
228231
debug,
229232
moropoV1ApiKey,
230233
useBeta,
234+
maestroChromeOnboarding,
231235
};
232236
}

0 commit comments

Comments
 (0)