From 77959dfb1468da96db4e65620d4868577a6d4d34 Mon Sep 17 00:00:00 2001 From: David Ray Date: Thu, 11 Apr 2024 16:48:53 -0400 Subject: [PATCH] Better error message if user is logged out from org (#3537) * Update error message when user is logged out to make it more clear. * update test --------- Co-authored-by: David Ray Co-authored-by: James Estevez --- locales/en/translation.json | 4 ++-- locales_dev/en/translation.json | 4 ++-- src/js/components/plans/detail.tsx | 4 ++-- test/js/components/plans/detail.test.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/locales/en/translation.json b/locales/en/translation.json index 9363e53a3d..833e7a1db8 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -73,12 +73,12 @@ "Oh no! This installation encountered an error.": "Oh no! This installation encountered an error.", "One Time Apex": "One Time Apex", "Only I and Salesforce staff can view this installation job.": "Only I and Salesforce staff can view this installation job.", - "Oops! It looks like you don’t have permissions to run an installation on this org.": "Oops! It looks like you don’t have permissions to run an installation on this org.", + "Oops! It looks like you have been logged out or don’t have permissions to run an installation on this org.": "Oops! It looks like you have been logged out or don’t have permissions to run an installation on this org.", "Optional": "Optional", "Org:": "Org:", "Other": "Other", "Package": "Package", - "Please contact an Admin within your org or use the button below to log in with a different org.": "Please contact an Admin within your org or use the button below to log in with a different org.", + "Please log back in, contact an Admin, or use the button below to log in with a different org.": "Please log back in, contact an Admin, or use the button below to log in with a different org.", "Potential Issues": "Potential Issues", "Pre-Install Validation In Progress…": "Pre-Install Validation In Progress…", "Pre-install validation completed successfully.": "Pre-install validation completed successfully.", diff --git a/locales_dev/en/translation.json b/locales_dev/en/translation.json index 5cb9591492..3ab47976cc 100644 --- a/locales_dev/en/translation.json +++ b/locales_dev/en/translation.json @@ -67,10 +67,10 @@ "Not Connected to Salesforce": "Not Connected to Salesforce", "Oh no! This installation encountered an error.": "Oh no! This installation encountered an error.", "Only I and Salesforce staff can view this installation job.": "Only I and Salesforce staff can view this installation job.", - "Oops! It looks like you don’t have permissions to run an installation on this org.": "Oops! It looks like you don’t have permissions to run an installation on this org.", + "Oops! It looks like you have been logged out or don’t have permissions to run an installation on this org.": "Oops! It looks like you have been logged out or don’t have permissions to run an installation on this org.", "Optional": "Optional", "Org:": "Org:", - "Please contact an Admin within your org or use the button below to log in with a different org.": "Please contact an Admin within your org or use the button below to log in with a different org.", + "Please log back in, contact an Admin, or use the button below to log in with a different org.": "Please log back in, contact an Admin, or use the button below to log in with a different org.", "Potential Issues": "Potential Issues", "Pre-Install Validation In Progress…": "Pre-Install Validation In Progress…", "Pre-install validation completed successfully.": "Pre-install validation completed successfully.", diff --git a/src/js/components/plans/detail.tsx b/src/js/components/plans/detail.tsx index 429e67c92f..a2d980a052 100644 --- a/src/js/components/plans/detail.tsx +++ b/src/js/components/plans/detail.tsx @@ -298,13 +298,13 @@ class PlanDetail extends Component { {t( - 'Oops! It looks like you don’t have permissions to run an installation on this org.', + 'Oops! It looks like you have been logged out or don’t have permissions to run an installation on this org.', )}

{t( - 'Please contact an Admin within your org or use the button below to log in with a different org.', + 'Please log back in, contact an Admin, or use the button below to log in with a different org.', )}

diff --git a/test/js/components/plans/detail.test.js b/test/js/components/plans/detail.test.js index f49d41d1d2..91304a9530 100644 --- a/test/js/components/plans/detail.test.js +++ b/test/js/components/plans/detail.test.js @@ -215,7 +215,7 @@ describe('', () => { }); expect( - getByText('you don’t have permissions', { exact: false }), + getByText('don’t have permissions', { exact: false }), ).toBeVisible(); }); });