Skip to content

Commit 75eae2c

Browse files
Merge pull request #3878 from NativeScript/vladimirov/fix-postinstall-prompter
fix: prompter for mail on postinstall is very obligatory
2 parents b66a227 + 465b836 commit 75eae2c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export class MacOSVersions {
182182
export const MacOSDeprecationStringFormat = "Support for macOS %s is deprecated and will be removed in one of the next releases of NativeScript. Please, upgrade to the latest macOS version.";
183183
export const PROGRESS_PRIVACY_POLICY_URL = "https://www.progress.com/legal/privacy-policy";
184184
export class SubscribeForNewsletterMessages {
185-
public static AgreeToReceiveEmailMsg = "I agree to receive email communications from Progress Software or its Partners (`https://www.progress.com/partners/partner-directory`)," +
185+
public static AgreeToReceiveEmailMsg = "I agree".green.bold + " to receive email communications from Progress Software or its Partners (`https://www.progress.com/partners/partner-directory`)," +
186186
"containing information about Progress Software's products. Consent may be withdrawn at any time.";
187187
public static ReviewPrivacyPolicyMsg = `You can review the Progress Software Privacy Policy at \`${PROGRESS_PRIVACY_POLICY_URL}\``;
188188
public static PromptMsg = "Input your e-mail address to agree".green + " or " + "leave empty to decline".red.bold + ":";

lib/services/subscription-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export class SubscriptionService implements ISubscriptionService {
1212

1313
public async subscribeForNewsletter(): Promise<void> {
1414
if (await this.shouldAskForEmail()) {
15-
this.$logger.printMarkdown(SubscribeForNewsletterMessages.AgreeToReceiveEmailMsg);
1615
this.$logger.printMarkdown(SubscribeForNewsletterMessages.ReviewPrivacyPolicyMsg);
16+
this.$logger.printMarkdown(SubscribeForNewsletterMessages.AgreeToReceiveEmailMsg);
1717

1818
const email = await this.getEmail(SubscribeForNewsletterMessages.PromptMsg);
1919
await this.$userSettingsService.saveSetting("EMAIL_REGISTERED", true);

test/services/subscription-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe("subscriptionService", () => {
160160

161161
await subscriptionService.subscribeForNewsletter();
162162

163-
assert.equal(loggerOutput, `${SubscribeForNewsletterMessages.AgreeToReceiveEmailMsg}${SubscribeForNewsletterMessages.ReviewPrivacyPolicyMsg}`);
163+
assert.equal(loggerOutput, `${SubscribeForNewsletterMessages.ReviewPrivacyPolicyMsg}${SubscribeForNewsletterMessages.AgreeToReceiveEmailMsg}`);
164164
});
165165

166166
const expectedMessageInPrompter = SubscribeForNewsletterMessages.PromptMsg;

0 commit comments

Comments
 (0)