diff --git a/browser_tests/tests/authAccountSwitch.spec.ts b/browser_tests/tests/authAccountSwitch.spec.ts index c81476f3450..5ab6d9f32c3 100644 --- a/browser_tests/tests/authAccountSwitch.spec.ts +++ b/browser_tests/tests/authAccountSwitch.spec.ts @@ -326,7 +326,7 @@ test.describe('Cloud account switch', { tag: '@cloud' }, () => { await page.getByRole('button', { name: 'Use email instead' }).click() await page.getByLabel('Email').fill(ACCOUNT_B.email) await page.getByLabel('Password').fill('password') - await page.getByRole('button', { name: 'Sign in' }).click() + await page.getByRole('button', { name: 'Sign in', exact: true }).click() await expect( page.getByRole('button', { name: 'Current user' }) diff --git a/src/assets/palettes/github.json b/src/assets/palettes/github.json index 133e4155d5d..1dccb07f1fb 100644 --- a/src/assets/palettes/github.json +++ b/src/assets/palettes/github.json @@ -1,6 +1,6 @@ { "id": "github", - "name": "Github", + "name": "GitHub", "colors": { "node_slot": { "BOOLEAN": "", diff --git a/src/locales/en/main.json b/src/locales/en/main.json index 02c66d75f7f..8b147ffdda7 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -1070,7 +1070,7 @@ "helpCenter": { "feedback": "Give Feedback", "docs": "Docs", - "github": "Github", + "github": "GitHub", "help": "Help & Support", "systemStatus": "System Status", "managerExtension": "Manager Extension", @@ -2514,7 +2514,7 @@ "loginButton": "Sign in", "orContinueWith": "Or continue with", "loginWithGoogle": "Log in with Google", - "loginWithGithub": "Log in with Github", + "loginWithGithub": "Log in with GitHub", "googleSsoInAppBrowserNotice": "If you opened this from an in-app browser (e.g. Instagram, LinkedIn), Google sign-in may not work. Use GitHub or email, or open this page in your device's default browser.", "termsText": "By clicking \"Next\" or \"Sign Up\", you agree to our", "termsLink": "Terms of Use", @@ -2529,8 +2529,8 @@ "freeTierBadge": "Eligible for Free Tier", "freeTierDescription": "Sign up with Google to get {credits} free credits every month. No card needed.", "freeTierDescriptionGeneric": "Sign up with Google to get free credits every month. No card needed.", - "backToSocialLogin": "Sign up with Google or Github instead", - "backToGithubLogin": "Sign up with Github instead" + "backToSocialLogin": "Sign in with Google or GitHub instead", + "backToGithubLogin": "Sign up with GitHub instead" }, "signup": { "title": "Create an account", @@ -2542,7 +2542,8 @@ "signUpButton": "Sign up", "signIn": "Sign in", "signUpWithGoogle": "Sign up with Google", - "signUpWithGithub": "Sign up with Github", + "signUpWithGithub": "Sign up with GitHub", + "backToSocialSignUp": "Sign up with Google or GitHub instead", "regionRestrictionChina": "In accordance with local regulatory requirements, our services are temporarily unavailable to users located in China.", "personalDataConsentLabel": "I agree to the processing of my personal data.", "emailNotEligibleForFreeTier": "Email sign-up is not eligible for Free Tier." diff --git a/src/platform/cloud/onboarding/CloudLoginView.test.ts b/src/platform/cloud/onboarding/CloudLoginView.test.ts index 5e20f022296..0e58eec6757 100644 --- a/src/platform/cloud/onboarding/CloudLoginView.test.ts +++ b/src/platform/cloud/onboarding/CloudLoginView.test.ts @@ -3,6 +3,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { createI18n } from 'vue-i18n' import { createMemoryHistory, createRouter } from 'vue-router' +import enMessages from '@/locales/en/main.json' with { type: 'json' } import CloudLoginView from '@/platform/cloud/onboarding/CloudLoginView.vue' vi.mock('@/composables/auth/useAuthActions', () => ({ @@ -110,6 +111,19 @@ describe('CloudLoginView', () => { ).not.toBeInTheDocument() }) + it('returns to the social buttons with sign-in wording, not sign-up', async () => { + const user = (await import('@testing-library/user-event')).default.setup() + await renderLoginView('/cloud/login', enMessages) + + await user.click(screen.getByRole('button', { name: 'Use email instead' })) + + expect( + screen.getByRole('button', { + name: 'Sign in with Google or GitHub instead' + }) + ).toBeInTheDocument() + }) + it.for([true, false])( 'renders the insecure-context warning only over plain HTTP (secure: %s)', async (secure: boolean) => { diff --git a/src/platform/cloud/onboarding/CloudSignupView.test.ts b/src/platform/cloud/onboarding/CloudSignupView.test.ts index 2a9a032fc9b..95958fbe79e 100644 --- a/src/platform/cloud/onboarding/CloudSignupView.test.ts +++ b/src/platform/cloud/onboarding/CloudSignupView.test.ts @@ -3,6 +3,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest' import { createI18n } from 'vue-i18n' import { createMemoryHistory, createRouter } from 'vue-router' +import enMessages from '@/locales/en/main.json' with { type: 'json' } import CloudSignupView from '@/platform/cloud/onboarding/CloudSignupView.vue' vi.mock('@/composables/auth/useAuthActions', () => ({ @@ -65,7 +66,10 @@ const MESSAGES = { } } -async function renderSignupView(url = '/cloud/signup') { +async function renderSignupView( + url = '/cloud/signup', + messages: typeof MESSAGES = MESSAGES +) { const router = createRouter({ history: createMemoryHistory(), routes: [ @@ -87,7 +91,7 @@ async function renderSignupView(url = '/cloud/signup') { global: { plugins: [ router, - createI18n({ legacy: false, locale: 'en', messages: { en: MESSAGES } }) + createI18n({ legacy: false, locale: 'en', messages: { en: messages } }) ], stubs: { SignUpForm: { template: '
' } } } @@ -223,6 +227,19 @@ describe('CloudSignupView', () => { expect(screen.queryByTestId('signup-form')).not.toBeInTheDocument() }) + it('returns to the social buttons with sign-up wording', async () => { + const user = (await import('@testing-library/user-event')).default.setup() + await renderSignupView('/cloud/signup', enMessages) + + await user.click(screen.getByRole('button', { name: 'Use email instead' })) + + expect( + screen.getByRole('button', { + name: 'Sign up with Google or GitHub instead' + }) + ).toBeInTheDocument() + }) + it.for([ ['pending', null], ['inside China', true], diff --git a/src/platform/cloud/onboarding/CloudSignupView.vue b/src/platform/cloud/onboarding/CloudSignupView.vue index 6e1881744b1..f023c78057c 100644 --- a/src/platform/cloud/onboarding/CloudSignupView.vue +++ b/src/platform/cloud/onboarding/CloudSignupView.vue @@ -78,7 +78,7 @@ :class="CLOUD_AUTH_LINK_BUTTON_CLASS" @click="switchToSocialLogin" > - {{ t('auth.login.backToSocialLogin') }} + {{ t('auth.signup.backToSocialSignUp') }}