Skip to content

Commit

Permalink
Add 'beta' messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
lfkellogg committed Jan 31, 2024
1 parent 409c3cc commit 9bed02b
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/commands/appdistribution-distribute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@ export const command = new Command("appdistribution:distribute <release-binary-f
)
.option(
"--test-devices <string>",
"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",
"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.",
)
.option(
"--test-devices-file <string>",
"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",
"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.",
)
.option("--test-username <string>", "username for automatic login")
.option("--test-password <string>", "password for automatic login")
.option(
"--test-username-resource <string>",
"resource name of the username field for automatic login",
"resource name for the username field for automatic login",
)
.option(
"--test-password-resource <string>",
"resource name of the password field for automatic login",
"resource name for the password field for automatic login",
)
.option("--test-async", "don't wait for automatic test results")
.option("--test-async", "run tests asynchronously. Visit the Firebase console for the automatic test results.")

Check failure on line 71 in src/commands/appdistribution-distribute.ts

View workflow job for this annotation

GitHub Actions / unit (18)

Replace `"--test-async",·"run·tests·asynchronously.·Visit·the·Firebase·console·for·the·automatic·test·results."` with `⏎····"--test-async",⏎····"run·tests·asynchronously.·Visit·the·Firebase·console·for·the·automatic·test·results.",⏎··`

Check failure on line 71 in src/commands/appdistribution-distribute.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Replace `"--test-async",·"run·tests·asynchronously.·Visit·the·Firebase·console·for·the·automatic·test·results."` with `⏎····"--test-async",⏎····"run·tests·asynchronously.·Visit·the·Firebase·console·for·the·automatic·test·results.",⏎··`

Check failure on line 71 in src/commands/appdistribution-distribute.ts

View workflow job for this annotation

GitHub Actions / unit (18)

Replace `"--test-async",·"run·tests·asynchronously.·Visit·the·Firebase·console·for·the·automatic·test·results."` with `⏎····"--test-async",⏎····"run·tests·asynchronously.·Visit·the·Firebase·console·for·the·automatic·test·results.",⏎··`
.before(requireAuth)
.action(async (file: string, options: any) => {
const appName = getAppName(options);
Expand Down Expand Up @@ -178,7 +178,7 @@ export const command = new Command("appdistribution:distribute <release-binary-f
{ exit: 1 },
);
}
throw new FirebaseError(`failed to upload release. ${err.message}`, { exit: 1 });
throw new FirebaseError(`Failed to upload release. ${err.message}`, { exit: 1 });
}

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

// Run automated tests
if (testDevices) {
utils.logBullet("starting automated tests (note: this feature is in beta)")

Check failure on line 207 in src/commands/appdistribution-distribute.ts

View workflow job for this annotation

GitHub Actions / unit (18)

Insert `;`

Check failure on line 207 in src/commands/appdistribution-distribute.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Insert `;`

Check failure on line 207 in src/commands/appdistribution-distribute.ts

View workflow job for this annotation

GitHub Actions / unit (18)

Insert `;`
const releaseTest = await requests.createReleaseTest(
releaseName,
testDevices,
Expand All @@ -220,7 +221,7 @@ async function awaitTestResults(
requests: AppDistributionClient,
): Promise<void> {
for (let i = 0; i < TEST_MAX_POLLING_RETRIES; i++) {
utils.logBullet("waiting for test(s) to complete…");
utils.logBullet("the automated tests results are pending");
await delay(TEST_POLLING_INTERVAL_MILLIS);
const releaseTest = await requests.getReleaseTest(releaseTestName);
if (releaseTest.deviceExecutions.every((e) => e.state === TestState.PASSED)) {
Expand All @@ -234,23 +235,23 @@ async function awaitTestResults(
continue;
case TestState.FAILED:
throw new FirebaseError(
`automated test failed for ${deviceToString(execution.device)}: ${execution.failedReason}`,
`Automated test failed for ${deviceToString(execution.device)}: ${execution.failedReason}`,
{ exit: 1 },
);
case TestState.INCONCLUSIVE:
throw new FirebaseError(
`automated test inconclusive for ${deviceToString(execution.device)}: ${execution.inconclusiveReason}`,
`Automated test inconclusive for ${deviceToString(execution.device)}: ${execution.inconclusiveReason}`,
{ exit: 1 },
);
default:
throw new FirebaseError(
`unsupported automated test state for ${deviceToString(execution.device)}: ${execution.state}`,
`Unsupported automated test state for ${deviceToString(execution.device)}: ${execution.state}`,
{ exit: 1 },
);
}
}
}
throw new FirebaseError("tests are running for longer than expected", { exit: 1 });
throw new FirebaseError("It took longer than expected to process your test, please try again.", { exit: 1 });

Check failure on line 254 in src/commands/appdistribution-distribute.ts

View workflow job for this annotation

GitHub Actions / unit (18)

Replace `·exit:·1` with `⏎····exit:·1,⏎·`

Check failure on line 254 in src/commands/appdistribution-distribute.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Replace `·exit:·1` with `⏎····exit:·1,⏎·`

Check failure on line 254 in src/commands/appdistribution-distribute.ts

View workflow job for this annotation

GitHub Actions / unit (18)

Replace `·exit:·1` with `⏎····exit:·1,⏎·`
}

function delay(ms: number) {
Expand Down

0 comments on commit 9bed02b

Please sign in to comment.