From 15ff9676f922a02a89a5340bc0bc892bd4b43b97 Mon Sep 17 00:00:00 2001 From: Rajat Bajaj Date: Wed, 18 Dec 2024 12:36:22 +0530 Subject: [PATCH] Added new CDN url + updated tests (#1109) * Added new CDN url + updated tests * temp * Update unit tests * Update doc info of default prompt-screen-settings.json * Updated comments * Add unit tests for promptScreenRendererResourceFetcher * Fix lint * Fix ACUL error check message --------- Co-authored-by: ramya18101 Co-authored-by: Ramya Anusri <62586490+ramya18101@users.noreply.github.com> --- .../prompt-screen-settings.json | 6 +- internal/cli/prompts_custom_text.go | 2 +- internal/cli/terraform_fetcher.go | 2 +- internal/cli/terraform_fetcher_test.go | 66 ++++ .../cli/universal_login_customize_test.go | 332 ++++++++++-------- .../fixtures/update-ul-prompts-login.json | 1 - .../universal-login-test-cases.yaml | 6 +- 7 files changed, 262 insertions(+), 153 deletions(-) diff --git a/internal/cli/data/universal-login/prompt-screen-settings.json b/internal/cli/data/universal-login/prompt-screen-settings.json index c585d9b69..d6b4ed4af 100644 --- a/internal/cli/data/universal-login/prompt-screen-settings.json +++ b/internal/cli/data/universal-login/prompt-screen-settings.json @@ -1,9 +1,9 @@ { "__doc1__": "The rendering_mode could be either advanced or standard... default_head_tags_disabled is a toggle to override Universal Login default head tags... context_configuration are the set of Context values to make available(Refer docs for the possible values)... head_tags are the array of head tags)..", - "__doc2__": "Note1: To update the rendering_mode to standard, only parse the rendering_mode field; no other fields are needed.", + "__doc2__": "Note1: while updating the rendering_mode to standard, only the rendering_mode field gets updated, the other fields shall not be updated.", "__doc3__": "Note2: head_tags must contain at least one script tag", - "__doc4__": "Only the declared fields will be updated, Rest stays same.", - "__doc5__": "See the docs for possible values", + "__doc4__": "Only the declared fields get updated, rest stays same", + "__doc5__": "See https://auth0.com/docs/customize/login-pages/advanced-customizations/getting-started/configure-acul-screens for all possible values for each field", "rendering_mode": "advanced", "default_head_tags": false, diff --git a/internal/cli/prompts_custom_text.go b/internal/cli/prompts_custom_text.go index c201c1f27..5832f6ee8 100644 --- a/internal/cli/prompts_custom_text.go +++ b/internal/cli/prompts_custom_text.go @@ -15,7 +15,7 @@ import ( const ( textDocsKey = "__doc__" textDocsURL = "https://auth0.com/docs/customize/universal-login-pages/customize-login-text-prompts" - textLocalesURL = "https://cdn.auth0.com/ulp/react-components/1.66.3/languages/%s/prompts.json" + textLocalesURL = "https://cdn.auth0.com/ulp/react-components/1.102.1/languages/%s/prompts.json" textLanguageDefault = "en" ) diff --git a/internal/cli/terraform_fetcher.go b/internal/cli/terraform_fetcher.go index 5ca9c914c..7de5a0944 100644 --- a/internal/cli/terraform_fetcher.go +++ b/internal/cli/terraform_fetcher.go @@ -477,7 +477,7 @@ func (f *promptScreenRendererResourceFetcher) FetchData(ctx context.Context) (im _, err := f.api.Prompt.ReadRendering(ctx, "login-id", "login-id") // Checking for the ACUL enabled feature. if err != nil { - if strings.Contains(err.Error(), "This tenant does not have ACUL enabled") { + if strings.Contains(err.Error(), "403 Forbidden: This tenant does not have Advanced Customizations enabled") { return nil, nil } diff --git a/internal/cli/terraform_fetcher_test.go b/internal/cli/terraform_fetcher_test.go index 054f3bae5..0c7c75061 100644 --- a/internal/cli/terraform_fetcher_test.go +++ b/internal/cli/terraform_fetcher_test.go @@ -1308,6 +1308,72 @@ func TestPromptProviderResourceFetcher_FetchData(t *testing.T) { }) } +func TestPromptScreenRendererResourceFetcher_FetchData(t *testing.T) { + t.Run("it successfully renders the prompts & screen settings import data", func(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + promptAPI := mock.NewMockPromptAPI(ctrl) + promptAPI.EXPECT().ReadRendering(gomock.Any(), management.PromptType("login-id"), management.ScreenName("login-id")). + Return(&management.PromptRendering{}, nil) + + fetcher := promptScreenRendererResourceFetcher{ + api: &auth0.API{ + Prompt: promptAPI, + }, + } + + expectedData := importDataList{} + for promptType, screenNames := range ScreenPromptMap { + for _, screenName := range screenNames { + expectedData = append(expectedData, importDataItem{ + ResourceName: "auth0_prompt_screen_renderer." + sanitizeResourceName(promptType+"_"+screenName), + ImportID: promptType + ":" + screenName, + }) + } + } + + data, err := fetcher.FetchData(context.Background()) + assert.NoError(t, err) + assert.ElementsMatch(t, expectedData, data) + }) + t.Run("it handles error, even if tenant does not have ACUL enabled", func(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + promptAPI := mock.NewMockPromptAPI(ctrl) + promptAPI.EXPECT().ReadRendering(gomock.Any(), management.PromptType("login-id"), management.ScreenName("login-id")). + Return(&management.PromptRendering{}, fmt.Errorf("403 Forbidden: This tenant does not have Advanced Customizations enabled")) + + fetcher := promptScreenRendererResourceFetcher{ + api: &auth0.API{ + Prompt: promptAPI, + }, + } + + data, err := fetcher.FetchData(context.Background()) + assert.NoError(t, err) + assert.Len(t, data, 0) + }) + t.Run("it returns error, if the API call fails", func(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + promptAPI := mock.NewMockPromptAPI(ctrl) + promptAPI.EXPECT().ReadRendering(gomock.Any(), management.PromptType("login-id"), management.ScreenName("login-id")). + Return(&management.PromptRendering{}, fmt.Errorf("failed to read rendering settings")) + + fetcher := promptScreenRendererResourceFetcher{ + api: &auth0.API{ + Prompt: promptAPI, + }, + } + + _, err := fetcher.FetchData(context.Background()) + assert.EqualError(t, err, "failed to read rendering settings") + }) +} + func TestPromptCustomTextResourceFetcher_FetchData(t *testing.T) { t.Run("it successfully retrieves custom text prompts data", func(t *testing.T) { ctrl := gomock.NewController(t) diff --git a/internal/cli/universal_login_customize_test.go b/internal/cli/universal_login_customize_test.go index 703f717e2..42955651f 100644 --- a/internal/cli/universal_login_customize_test.go +++ b/internal/cli/universal_login_customize_test.go @@ -383,42 +383,53 @@ func TestFetchUniversalLoginBrandingData(t *testing.T) { Prompt: "login", CustomText: map[string]interface{}{ "login": map[string]interface{}{ - "alertListTitle": "Alerts", - "auth0-users-validation": "Something went wrong, please try again later", - "authentication-failure": "We are sorry, something went wrong when attempting to login", - "buttonText": "Continue", - "custom-script-error-code": "Something went wrong, please try again later.", - "description": "Log in to ${companyName} to continue to ${clientName}.", - "editEmailText": "Edit", - "emailPlaceholder": "Email address", - "federatedConnectionButtonText": "Continue with ${connectionName}", - "footerLinkText": "Sign up", - "footerText": "Don't have an account?", - "forgotPasswordText": "Forgot password?", - "hidePasswordText": "Hide password", - "invalid-connection": "Invalid connection", - "invalid-email-format": "Email is not valid.", - "invitationDescription": "Log in to accept ${inviterName}'s invitation to join ${companyName} on ${clientName}.", - "invitationTitle": "You've Been Invited!", - "ip-blocked": "We have detected suspicious login behavior and further attempts will be blocked. Please contact the administrator.", - "logoAltText": "${companyName}", - "no-db-connection": "Invalid connection", - "no-email": "Please enter an email address", - "no-password": "Password is required", - "no-username": "Username is required", - "pageTitle": "Log in | ${clientName}", - "password-breached": "We have detected a potential security issue with this account. To protect your account, we have prevented this login. Please reset your password to proceed.", - "passwordPlaceholder": "Password", - "same-user-login": "Too many login attempts for this user. Please wait, and try again later.", - "separatorText": "Or", - "showPasswordText": "Show password", - "signupActionLinkText": "${footerLinkText}", - "signupActionText": "${footerText}", - "title": "Welcome friend, glad to have you!", - "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", - "usernamePlaceholder": "Username or email address", - "wrong-credentials": "Wrong username or password", - "wrong-email-credentials": "Wrong email or password", + "alertListTitle": "Alerts", + "auth0-users-validation": "Something went wrong, please try again later", + "authentication-failure": "We are sorry, something went wrong when attempting to log in", + "buttonText": "Continue", + "custom-script-error-code": "Something went wrong, please try again later.", + "description": "Log in to ${companyName} to continue to ${clientName}.", + "editEmailText": "Edit", + "emailPlaceholder": "Email address", + "federatedConnectionButtonText": "Continue with ${connectionName}", + "footerLinkText": "Sign up", + "footerText": "Don't have an account?", + "forgotPasswordText": "Forgot password?", + "hidePasswordText": "Hide password", + "invalid-connection": "Invalid connection", + "invitationDescription": "Log in to accept ${inviterName}'s invitation to join ${companyName} on ${clientName}.", + "invitationTitle": "You've Been Invited!", + "ip-blocked": "We have detected suspicious login behavior and further attempts will be blocked. Please contact the administrator.", + "logoAltText": "${companyName}", + "no-db-connection": "Invalid connection", + "no-email": "Please enter an email address", + "no-password": "Password is required", + "no-username": "Username is required", + "pageTitle": "Log in | ${clientName}", + "password-breached": "We have detected a potential security issue with this account. To protect your account, we have prevented this login. Please reset your password to proceed.", + "passwordPlaceholder": "Password", + "phoneOrEmailPlaceholder": "Phone number or Email address", + "phoneOrUsernameOrEmailPlaceholder": "Phone or Username or Email", + "phoneOrUsernamePlaceholder": "Phone Number or Username", + "phonePlaceholder": "Phone number", + "same-user-login": "Too many login attempts for this user. Please wait, and try again later.", + "separatorText": "Or", + "showPasswordText": "Show password", + "signupActionLinkText": "${footerLinkText}", + "signupActionText": "${footerText}", + "title": "Welcome friend, glad to have you!", + "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", + "usernamePlaceholder": "Username or email address", + "usernameOnlyPlaceholder": "Username", + "usernameOrEmailPlaceholder": "Username or Email address", + "wrong-credentials": "Wrong username or password", + "wrong-email-credentials": "Wrong email or password", + "wrong-email-phone-credentials": "Incorrect email address, phone number, or password. Phone numbers must include the country code.", + "wrong-email-phone-username-credentials": " Incorrect email address, phone number, username, or password. Phone numbers must include the country code.", + "wrong-email-username-credentials": "Incorrect email address, username, or password", + "wrong-phone-credentials": "Incorrect phone number or password", + "wrong-phone-username-credentials": "Incorrect phone number, username or password. Phone numbers must include the country code.", + "wrong-username-credentials": "Incorrect username or password", }, }, }, @@ -590,42 +601,53 @@ func TestFetchUniversalLoginBrandingData(t *testing.T) { Prompt: "login", CustomText: map[string]interface{}{ "login": map[string]interface{}{ - "alertListTitle": "Alerts", - "auth0-users-validation": "Something went wrong, please try again later", - "authentication-failure": "We are sorry, something went wrong when attempting to login", - "buttonText": "Continue", - "custom-script-error-code": "Something went wrong, please try again later.", - "description": "Log in to ${companyName} to continue to ${clientName}.", - "editEmailText": "Edit", - "emailPlaceholder": "Email address", - "federatedConnectionButtonText": "Continue with ${connectionName}", - "footerLinkText": "Sign up", - "footerText": "Don't have an account?", - "forgotPasswordText": "Forgot password?", - "hidePasswordText": "Hide password", - "invalid-connection": "Invalid connection", - "invalid-email-format": "Email is not valid.", - "invitationDescription": "Log in to accept ${inviterName}'s invitation to join ${companyName} on ${clientName}.", - "invitationTitle": "You've Been Invited!", - "ip-blocked": "We have detected suspicious login behavior and further attempts will be blocked. Please contact the administrator.", - "logoAltText": "${companyName}", - "no-db-connection": "Invalid connection", - "no-email": "Please enter an email address", - "no-password": "Password is required", - "no-username": "Username is required", - "pageTitle": "Log in | ${clientName}", - "password-breached": "We have detected a potential security issue with this account. To protect your account, we have prevented this login. Please reset your password to proceed.", - "passwordPlaceholder": "Password", - "same-user-login": "Too many login attempts for this user. Please wait, and try again later.", - "separatorText": "Or", - "showPasswordText": "Show password", - "signupActionLinkText": "${footerLinkText}", - "signupActionText": "${footerText}", - "title": "Welcome friend, glad to have you!", - "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", - "usernamePlaceholder": "Username or email address", - "wrong-credentials": "Wrong username or password", - "wrong-email-credentials": "Wrong email or password", + "alertListTitle": "Alerts", + "auth0-users-validation": "Something went wrong, please try again later", + "authentication-failure": "We are sorry, something went wrong when attempting to log in", + "buttonText": "Continue", + "custom-script-error-code": "Something went wrong, please try again later.", + "description": "Log in to ${companyName} to continue to ${clientName}.", + "editEmailText": "Edit", + "emailPlaceholder": "Email address", + "federatedConnectionButtonText": "Continue with ${connectionName}", + "footerLinkText": "Sign up", + "footerText": "Don't have an account?", + "forgotPasswordText": "Forgot password?", + "hidePasswordText": "Hide password", + "invalid-connection": "Invalid connection", + "invitationDescription": "Log in to accept ${inviterName}'s invitation to join ${companyName} on ${clientName}.", + "invitationTitle": "You've Been Invited!", + "ip-blocked": "We have detected suspicious login behavior and further attempts will be blocked. Please contact the administrator.", + "logoAltText": "${companyName}", + "no-db-connection": "Invalid connection", + "no-email": "Please enter an email address", + "no-password": "Password is required", + "no-username": "Username is required", + "pageTitle": "Log in | ${clientName}", + "password-breached": "We have detected a potential security issue with this account. To protect your account, we have prevented this login. Please reset your password to proceed.", + "passwordPlaceholder": "Password", + "phoneOrEmailPlaceholder": "Phone number or Email address", + "phoneOrUsernameOrEmailPlaceholder": "Phone or Username or Email", + "phoneOrUsernamePlaceholder": "Phone Number or Username", + "phonePlaceholder": "Phone number", + "same-user-login": "Too many login attempts for this user. Please wait, and try again later.", + "separatorText": "Or", + "showPasswordText": "Show password", + "signupActionLinkText": "${footerLinkText}", + "signupActionText": "${footerText}", + "title": "Welcome friend, glad to have you!", + "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", + "usernamePlaceholder": "Username or email address", + "usernameOnlyPlaceholder": "Username", + "usernameOrEmailPlaceholder": "Username or Email address", + "wrong-credentials": "Wrong username or password", + "wrong-email-credentials": "Wrong email or password", + "wrong-email-phone-credentials": "Incorrect email address, phone number, or password. Phone numbers must include the country code.", + "wrong-email-phone-username-credentials": " Incorrect email address, phone number, username, or password. Phone numbers must include the country code.", + "wrong-email-username-credentials": "Incorrect email address, username, or password", + "wrong-phone-credentials": "Incorrect phone number or password", + "wrong-phone-username-credentials": "Incorrect phone number, username or password. Phone numbers must include the country code.", + "wrong-username-credentials": "Incorrect username or password", }, }, }, @@ -799,42 +821,53 @@ func TestFetchUniversalLoginBrandingData(t *testing.T) { Prompt: "login", CustomText: map[string]interface{}{ "login": map[string]interface{}{ - "alertListTitle": "Alerts", - "auth0-users-validation": "Something went wrong, please try again later", - "authentication-failure": "We are sorry, something went wrong when attempting to login", - "buttonText": "Continue", - "custom-script-error-code": "Something went wrong, please try again later.", - "description": "Log in to ${companyName} to continue to ${clientName}.", - "editEmailText": "Edit", - "emailPlaceholder": "Email address", - "federatedConnectionButtonText": "Continue with ${connectionName}", - "footerLinkText": "Sign up", - "footerText": "Don't have an account?", - "forgotPasswordText": "Forgot password?", - "hidePasswordText": "Hide password", - "invalid-connection": "Invalid connection", - "invalid-email-format": "Email is not valid.", - "invitationDescription": "Log in to accept ${inviterName}'s invitation to join ${companyName} on ${clientName}.", - "invitationTitle": "You've Been Invited!", - "ip-blocked": "We have detected suspicious login behavior and further attempts will be blocked. Please contact the administrator.", - "logoAltText": "${companyName}", - "no-db-connection": "Invalid connection", - "no-email": "Please enter an email address", - "no-password": "Password is required", - "no-username": "Username is required", - "pageTitle": "Log in | ${clientName}", - "password-breached": "We have detected a potential security issue with this account. To protect your account, we have prevented this login. Please reset your password to proceed.", - "passwordPlaceholder": "Password", - "same-user-login": "Too many login attempts for this user. Please wait, and try again later.", - "separatorText": "Or", - "showPasswordText": "Show password", - "signupActionLinkText": "${footerLinkText}", - "signupActionText": "${footerText}", - "title": "Welcome friend, glad to have you!", - "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", - "usernamePlaceholder": "Username or email address", - "wrong-credentials": "Wrong username or password", - "wrong-email-credentials": "Wrong email or password", + "alertListTitle": "Alerts", + "auth0-users-validation": "Something went wrong, please try again later", + "authentication-failure": "We are sorry, something went wrong when attempting to log in", + "buttonText": "Continue", + "custom-script-error-code": "Something went wrong, please try again later.", + "description": "Log in to ${companyName} to continue to ${clientName}.", + "editEmailText": "Edit", + "emailPlaceholder": "Email address", + "federatedConnectionButtonText": "Continue with ${connectionName}", + "footerLinkText": "Sign up", + "footerText": "Don't have an account?", + "forgotPasswordText": "Forgot password?", + "hidePasswordText": "Hide password", + "invalid-connection": "Invalid connection", + "invitationDescription": "Log in to accept ${inviterName}'s invitation to join ${companyName} on ${clientName}.", + "invitationTitle": "You've Been Invited!", + "ip-blocked": "We have detected suspicious login behavior and further attempts will be blocked. Please contact the administrator.", + "logoAltText": "${companyName}", + "no-db-connection": "Invalid connection", + "no-email": "Please enter an email address", + "no-password": "Password is required", + "no-username": "Username is required", + "pageTitle": "Log in | ${clientName}", + "password-breached": "We have detected a potential security issue with this account. To protect your account, we have prevented this login. Please reset your password to proceed.", + "passwordPlaceholder": "Password", + "phoneOrEmailPlaceholder": "Phone number or Email address", + "phoneOrUsernameOrEmailPlaceholder": "Phone or Username or Email", + "phoneOrUsernamePlaceholder": "Phone Number or Username", + "phonePlaceholder": "Phone number", + "same-user-login": "Too many login attempts for this user. Please wait, and try again later.", + "separatorText": "Or", + "showPasswordText": "Show password", + "signupActionLinkText": "${footerLinkText}", + "signupActionText": "${footerText}", + "title": "Welcome friend, glad to have you!", + "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", + "usernamePlaceholder": "Username or email address", + "usernameOnlyPlaceholder": "Username", + "usernameOrEmailPlaceholder": "Username or Email address", + "wrong-credentials": "Wrong username or password", + "wrong-email-credentials": "Wrong email or password", + "wrong-email-phone-credentials": "Incorrect email address, phone number, or password. Phone numbers must include the country code.", + "wrong-email-phone-username-credentials": " Incorrect email address, phone number, username, or password. Phone numbers must include the country code.", + "wrong-email-username-credentials": "Incorrect email address, username, or password", + "wrong-phone-credentials": "Incorrect phone number or password", + "wrong-phone-username-credentials": "Incorrect phone number, username or password. Phone numbers must include the country code.", + "wrong-username-credentials": "Incorrect username or password", }, }, }, @@ -1088,42 +1121,53 @@ func TestFetchUniversalLoginBrandingData(t *testing.T) { Prompt: "login", CustomText: map[string]interface{}{ "login": map[string]interface{}{ - "alertListTitle": "Alerts", - "auth0-users-validation": "Something went wrong, please try again later", - "authentication-failure": "We are sorry, something went wrong when attempting to login", - "buttonText": "Continue", - "custom-script-error-code": "Something went wrong, please try again later.", - "description": "Log in to ${companyName} to continue to ${clientName}.", - "editEmailText": "Edit", - "emailPlaceholder": "Email address", - "federatedConnectionButtonText": "Continue with ${connectionName}", - "footerLinkText": "Sign up", - "footerText": "Don't have an account?", - "forgotPasswordText": "Forgot password?", - "hidePasswordText": "Hide password", - "invalid-connection": "Invalid connection", - "invalid-email-format": "Email is not valid.", - "invitationDescription": "Log in to accept ${inviterName}'s invitation to join ${companyName} on ${clientName}.", - "invitationTitle": "You've Been Invited!", - "ip-blocked": "We have detected suspicious login behavior and further attempts will be blocked. Please contact the administrator.", - "logoAltText": "${companyName}", - "no-db-connection": "Invalid connection", - "no-email": "Please enter an email address", - "no-password": "Password is required", - "no-username": "Username is required", - "pageTitle": "Log in | ${clientName}", - "password-breached": "We have detected a potential security issue with this account. To protect your account, we have prevented this login. Please reset your password to proceed.", - "passwordPlaceholder": "Password", - "same-user-login": "Too many login attempts for this user. Please wait, and try again later.", - "separatorText": "Or", - "showPasswordText": "Show password", - "signupActionLinkText": "${footerLinkText}", - "signupActionText": "${footerText}", - "title": "Welcome friend, glad to have you!", - "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", - "usernamePlaceholder": "Username or email address", - "wrong-credentials": "Wrong username or password", - "wrong-email-credentials": "Wrong email or password", + "alertListTitle": "Alerts", + "auth0-users-validation": "Something went wrong, please try again later", + "authentication-failure": "We are sorry, something went wrong when attempting to log in", + "buttonText": "Continue", + "custom-script-error-code": "Something went wrong, please try again later.", + "description": "Log in to ${companyName} to continue to ${clientName}.", + "editEmailText": "Edit", + "emailPlaceholder": "Email address", + "federatedConnectionButtonText": "Continue with ${connectionName}", + "footerLinkText": "Sign up", + "footerText": "Don't have an account?", + "forgotPasswordText": "Forgot password?", + "hidePasswordText": "Hide password", + "invalid-connection": "Invalid connection", + "invitationDescription": "Log in to accept ${inviterName}'s invitation to join ${companyName} on ${clientName}.", + "invitationTitle": "You've Been Invited!", + "ip-blocked": "We have detected suspicious login behavior and further attempts will be blocked. Please contact the administrator.", + "logoAltText": "${companyName}", + "no-db-connection": "Invalid connection", + "no-email": "Please enter an email address", + "no-password": "Password is required", + "no-username": "Username is required", + "pageTitle": "Log in | ${clientName}", + "password-breached": "We have detected a potential security issue with this account. To protect your account, we have prevented this login. Please reset your password to proceed.", + "passwordPlaceholder": "Password", + "phoneOrEmailPlaceholder": "Phone number or Email address", + "phoneOrUsernameOrEmailPlaceholder": "Phone or Username or Email", + "phoneOrUsernamePlaceholder": "Phone Number or Username", + "phonePlaceholder": "Phone number", + "same-user-login": "Too many login attempts for this user. Please wait, and try again later.", + "separatorText": "Or", + "showPasswordText": "Show password", + "signupActionLinkText": "${footerLinkText}", + "signupActionText": "${footerText}", + "title": "Welcome friend, glad to have you!", + "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", + "usernamePlaceholder": "Username or email address", + "usernameOnlyPlaceholder": "Username", + "usernameOrEmailPlaceholder": "Username or Email address", + "wrong-credentials": "Wrong username or password", + "wrong-email-credentials": "Wrong email or password", + "wrong-email-phone-credentials": "Incorrect email address, phone number, or password. Phone numbers must include the country code.", + "wrong-email-phone-username-credentials": " Incorrect email address, phone number, username, or password. Phone numbers must include the country code.", + "wrong-email-username-credentials": "Incorrect email address, username, or password", + "wrong-phone-credentials": "Incorrect phone number or password", + "wrong-phone-username-credentials": "Incorrect phone number, username or password. Phone numbers must include the country code.", + "wrong-username-credentials": "Incorrect username or password", }, }, }, diff --git a/test/integration/fixtures/update-ul-prompts-login.json b/test/integration/fixtures/update-ul-prompts-login.json index 473b4e0c5..28f9a1f71 100644 --- a/test/integration/fixtures/update-ul-prompts-login.json +++ b/test/integration/fixtures/update-ul-prompts-login.json @@ -22,7 +22,6 @@ "showPasswordText": "Show password", "hidePasswordText": "Hide password", "wrong-credentials": "Wrong username or password", - "invalid-email-format": "Email is not valid.", "wrong-email-credentials": "Wrong email or password", "custom-script-error-code": "Something went wrong, please try again later.", "auth0-users-validation": "Something went wrong, please try again later", diff --git a/test/integration/universal-login-test-cases.yaml b/test/integration/universal-login-test-cases.yaml index 6b3d4eee6..2c6ae4fd1 100644 --- a/test/integration/universal-login-test-cases.yaml +++ b/test/integration/universal-login-test-cases.yaml @@ -86,9 +86,9 @@ tests: contains: - "Failed to fetch the Universal Login template data: this feature requires at least one custom domain to be set and verified for the tenant, use 'auth0 domains create' to create one and 'auth0 domains verify' to have it verified" -# 010 - update universal login branding prompts (login): -# command: cat ./test/integration/fixtures/update-ul-prompts-login.json | auth0 ul prompts update login -# exit-code: 0 + 010 - update universal login branding prompts (login): + command: cat ./test/integration/fixtures/update-ul-prompts-login.json | auth0 ul prompts update login + exit-code: 0 011 - update universal login branding prompts (mfa-push): command: cat ./test/integration/fixtures/update-ul-prompts-mfa-push.json | auth0 ul prompts update mfa-push