Skip to content

Commit 9bed02b

Browse files
committed
Add 'beta' messaging
1 parent 409c3cc commit 9bed02b

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

src/commands/appdistribution-distribute.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,23 @@ export const command = new Command("appdistribution:distribute <release-binary-f
5252
)
5353
.option(
5454
"--test-devices <string>",
55-
"semicolon-separated list of devices to run automated tests on, in the format 'model=<model-id>,version=<os-version-id>,locale=<locale>,orientation=<orientation>'. Run 'gcloud firebase test android|ios models list' to see available devices",
55+
"semicolon-separated list of devices to run automated tests on, in the format 'model=<model-id>,version=<os-version-id>,locale=<locale>,orientation=<orientation>'. Run 'gcloud firebase test android|ios models list' to see available devices. Note: This feature is in beta.",
5656
)
5757
.option(
5858
"--test-devices-file <string>",
59-
"path to file containing a list of semicolon- or newline-separated devices to run automated tests on, in the format 'model=<model-id>,version=<os-version-id>,locale=<locale>,orientation=<orientation>'. Run 'gcloud firebase test android|ios models list' to see available devices",
59+
"path to file containing a list of semicolon- or newline-separated devices to run automated tests on, in the format 'model=<model-id>,version=<os-version-id>,locale=<locale>,orientation=<orientation>'. Run 'gcloud firebase test android|ios models list' to see available devices. Note: This feature is in beta.",
6060
)
6161
.option("--test-username <string>", "username for automatic login")
6262
.option("--test-password <string>", "password for automatic login")
6363
.option(
6464
"--test-username-resource <string>",
65-
"resource name of the username field for automatic login",
65+
"resource name for the username field for automatic login",
6666
)
6767
.option(
6868
"--test-password-resource <string>",
69-
"resource name of the password field for automatic login",
69+
"resource name for the password field for automatic login",
7070
)
71-
.option("--test-async", "don't wait for automatic test results")
71+
.option("--test-async", "run tests asynchronously. Visit the Firebase console for the automatic test results.")
7272
.before(requireAuth)
7373
.action(async (file: string, options: any) => {
7474
const appName = getAppName(options);
@@ -178,7 +178,7 @@ export const command = new Command("appdistribution:distribute <release-binary-f
178178
{ exit: 1 },
179179
);
180180
}
181-
throw new FirebaseError(`failed to upload release. ${err.message}`, { exit: 1 });
181+
throw new FirebaseError(`Failed to upload release. ${err.message}`, { exit: 1 });
182182
}
183183

184184
// If this is an app bundle and the certificate was originally blank fetch the updated
@@ -204,6 +204,7 @@ export const command = new Command("appdistribution:distribute <release-binary-f
204204

205205
// Run automated tests
206206
if (testDevices) {
207+
utils.logBullet("starting automated tests (note: this feature is in beta)")
207208
const releaseTest = await requests.createReleaseTest(
208209
releaseName,
209210
testDevices,
@@ -220,7 +221,7 @@ async function awaitTestResults(
220221
requests: AppDistributionClient,
221222
): Promise<void> {
222223
for (let i = 0; i < TEST_MAX_POLLING_RETRIES; i++) {
223-
utils.logBullet("waiting for test(s) to complete…");
224+
utils.logBullet("the automated tests results are pending");
224225
await delay(TEST_POLLING_INTERVAL_MILLIS);
225226
const releaseTest = await requests.getReleaseTest(releaseTestName);
226227
if (releaseTest.deviceExecutions.every((e) => e.state === TestState.PASSED)) {
@@ -234,23 +235,23 @@ async function awaitTestResults(
234235
continue;
235236
case TestState.FAILED:
236237
throw new FirebaseError(
237-
`automated test failed for ${deviceToString(execution.device)}: ${execution.failedReason}`,
238+
`Automated test failed for ${deviceToString(execution.device)}: ${execution.failedReason}`,
238239
{ exit: 1 },
239240
);
240241
case TestState.INCONCLUSIVE:
241242
throw new FirebaseError(
242-
`automated test inconclusive for ${deviceToString(execution.device)}: ${execution.inconclusiveReason}`,
243+
`Automated test inconclusive for ${deviceToString(execution.device)}: ${execution.inconclusiveReason}`,
243244
{ exit: 1 },
244245
);
245246
default:
246247
throw new FirebaseError(
247-
`unsupported automated test state for ${deviceToString(execution.device)}: ${execution.state}`,
248+
`Unsupported automated test state for ${deviceToString(execution.device)}: ${execution.state}`,
248249
{ exit: 1 },
249250
);
250251
}
251252
}
252253
}
253-
throw new FirebaseError("tests are running for longer than expected", { exit: 1 });
254+
throw new FirebaseError("It took longer than expected to process your test, please try again.", { exit: 1 });
254255
}
255256

256257
function delay(ms: number) {

0 commit comments

Comments
 (0)