diff --git a/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.jsx b/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.jsx index af6fffff8f..f78b84524b 100644 --- a/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.jsx +++ b/src/pages/AccountSettings/tabs/Admin/GithubIntegrationSection/GithubIntegrationSection.jsx @@ -11,7 +11,7 @@ function GithubIntegrationCopy({ integrationId }) { return (

This account is configured via the GitHub App. You can manage the apps - repository integration on Github. + repository integration on GitHub.

) return ( @@ -47,7 +47,7 @@ function GithubIntegrationSection() { return (
-

Github Integration

+

GitHub Integration

) diff --git a/src/pages/AccountSettings/tabs/Admin/ManageAdminCard/AdminTable/AdminTable.tsx b/src/pages/AccountSettings/tabs/Admin/ManageAdminCard/AdminTable/AdminTable.tsx index 63234b11cd..174536b3ef 100644 --- a/src/pages/AccountSettings/tabs/Admin/ManageAdminCard/AdminTable/AdminTable.tsx +++ b/src/pages/AccountSettings/tabs/Admin/ManageAdminCard/AdminTable/AdminTable.tsx @@ -166,7 +166,7 @@ export default function AdminTable() { if (!isLoading && !tableData?.length) { return (

- No admins yet. Note that admins in your Github organization are + No admins yet. Note that admins in your GitHub organization are automatically considered admins.

) diff --git a/src/pages/AccountSettings/tabs/Admin/ManageAdminCard/ManageAdminCard.spec.jsx b/src/pages/AccountSettings/tabs/Admin/ManageAdminCard/ManageAdminCard.spec.jsx index fb9067045f..59ebf43950 100644 --- a/src/pages/AccountSettings/tabs/Admin/ManageAdminCard/ManageAdminCard.spec.jsx +++ b/src/pages/AccountSettings/tabs/Admin/ManageAdminCard/ManageAdminCard.spec.jsx @@ -116,7 +116,7 @@ describe('ManageAdminCard', () => { render(, { wrapper }) const noAdmins = await screen.findByText( - /No admins yet. Note that admins in your Github organization are automatically considered admins./ + /No admins yet. Note that admins in your GitHub organization are automatically considered admins./ ) expect(noAdmins).toBeInTheDocument() }) @@ -129,7 +129,7 @@ describe('ManageAdminCard', () => { render(, { wrapper }) const noAdmins = await screen.findByText( - /No admins yet. Note that admins in your Github organization are automatically considered admins./ + /No admins yet. Note that admins in your GitHub organization are automatically considered admins./ ) expect(noAdmins).toBeInTheDocument() }) diff --git a/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.jsx b/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.jsx index 231133ef77..393ff5a295 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.jsx +++ b/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.jsx @@ -83,7 +83,7 @@ const BotErrorHeading = () => { if (ghWithApp) { return ( -

There was an issue with the Github app

+

There was an issue with the GitHub app

) } diff --git a/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.spec.jsx b/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.spec.jsx index 75b4b983fb..57ffb89aee 100644 --- a/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.spec.jsx +++ b/src/pages/CommitDetailPage/CommitCoverage/BotErrorBanner/BotErrorBanner.spec.jsx @@ -66,7 +66,7 @@ describe('BotErrorBanner', () => { }) const title = await screen.findByText( - 'There was an issue with the Github app' + 'There was an issue with the GitHub app' ) expect(title).toBeInTheDocument() }) diff --git a/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.jsx b/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.jsx index 5c962ff078..1c3087d0f6 100644 --- a/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.jsx +++ b/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.jsx @@ -13,7 +13,7 @@ export default function PullLabel({ pullId, provider, providerPullUrl }) { #{pullId} ( - {providerToName(provider)} + {providerToName(provider, true)} ) diff --git a/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.spec.jsx b/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.spec.jsx index 6e7069ead7..32fc2f6cc4 100644 --- a/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.spec.jsx +++ b/src/pages/CommitDetailPage/Header/PullLabel/PullLabel.spec.jsx @@ -37,7 +37,7 @@ describe('PullLabel', () => { it('renders provider pull url', async () => { render(, { wrapper }) - const pullUrlLink = await screen.findByRole('link', { name: /Github/ }) + const pullUrlLink = await screen.findByRole('link', { name: /GitHub/ }) expect(pullUrlLink).toBeInTheDocument() expect(pullUrlLink).toHaveAttribute( 'href', diff --git a/src/pages/LoginPage/LoginButton.jsx b/src/pages/LoginPage/LoginButton.jsx index 0c29d70243..b07c9062de 100644 --- a/src/pages/LoginPage/LoginButton.jsx +++ b/src/pages/LoginPage/LoginButton.jsx @@ -8,7 +8,6 @@ import { function LoginButton({ provider }) { const { signIn } = useNavLinks() - const to = `${window.location.protocol}//${window.location.host}/${provider}` const providerName = loginProviderToName(provider) const providerImage = loginProviderImage(provider) diff --git a/src/pages/LoginPage/LoginButton.spec.jsx b/src/pages/LoginPage/LoginButton.spec.jsx index ac6c73596a..bda971585d 100644 --- a/src/pages/LoginPage/LoginButton.spec.jsx +++ b/src/pages/LoginPage/LoginButton.spec.jsx @@ -26,7 +26,7 @@ describe('LoginButton', () => { }), }) - const bitbucket = screen.getByText(/Login with Bitbucket/i) + const bitbucket = screen.getByText(/Login with Bitbucket/) expect(bitbucket).toBeInTheDocument() }) }) @@ -40,7 +40,7 @@ describe('LoginButton', () => { }), }) - const github = screen.getByText(/Login with GitHub/i) + const github = screen.getByText(/Login with GitHub/) expect(github).toBeInTheDocument() }) }) @@ -54,7 +54,7 @@ describe('LoginButton', () => { }), }) - const gitlab = screen.getByText(/Login with GitLab/i) + const gitlab = screen.getByText(/Login with GitLab/) expect(gitlab).toBeInTheDocument() }) }) @@ -68,7 +68,7 @@ describe('LoginButton', () => { }), }) - const sentry = screen.getByText(/Login with Sentry/i) + const sentry = screen.getByText(/Login with Sentry/) expect(sentry).toBeInTheDocument() }) }) diff --git a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/shared/ActionsBilling/ActionsBilling.jsx b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/shared/ActionsBilling/ActionsBilling.jsx index 5b69fcc19d..775bf9c1c0 100644 --- a/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/shared/ActionsBilling/ActionsBilling.jsx +++ b/src/pages/PlanPage/subRoutes/CurrentOrgPlan/CurrentPlanCard/shared/ActionsBilling/ActionsBilling.jsx @@ -89,7 +89,7 @@ function ActionsBilling() {

- Github + GitHub

Your account is configured via GitHub Marketplace

diff --git a/src/pages/SyncProviderPage/SyncButton.spec.tsx b/src/pages/SyncProviderPage/SyncButton.spec.tsx index dfddcc29af..f5bd0d25bd 100644 --- a/src/pages/SyncProviderPage/SyncButton.spec.tsx +++ b/src/pages/SyncProviderPage/SyncButton.spec.tsx @@ -14,7 +14,7 @@ describe('SyncButton', () => { it('renders sync button', () => { render(, { wrapper }) - const link = screen.getByRole('link', { name: /Sync with Github/ }) + const link = screen.getByRole('link', { name: /Sync with GitHub/ }) const expectedRedirect = encodeURIComponent('http://localhost/gh') expect(link).toBeInTheDocument() @@ -26,7 +26,7 @@ describe('SyncButton', () => { it('renders sync button', () => { render(, { wrapper }) - const link = screen.getByRole('link', { name: /Sync with Gitlab/ }) + const link = screen.getByRole('link', { name: /Sync with GitLab/ }) const expectedRedirect = encodeURIComponent('http://localhost/gl') expect(link).toBeInTheDocument() @@ -38,7 +38,7 @@ describe('SyncButton', () => { it('renders sync button', () => { render(, { wrapper }) - const link = screen.getByRole('link', { name: /Sync with BitBucket/ }) + const link = screen.getByRole('link', { name: /Sync with Bitbucket/ }) const expectedRedirect = encodeURIComponent('http://localhost/bb') expect(link).toBeInTheDocument() @@ -51,7 +51,7 @@ describe('SyncButton', () => { render(, { wrapper }) const link = screen.getByRole('link', { - name: /Sync with Github Enterprise/, + name: /Sync with GitHub Enterprise/, }) const expectedRedirect = encodeURIComponent('http://localhost/ghe') @@ -65,7 +65,7 @@ describe('SyncButton', () => { render(, { wrapper }) const link = screen.getByRole('link', { - name: /Sync with Gitlab Enterprise/, + name: /Sync with GitLab Enterprise/, }) const expectedRedirect = encodeURIComponent('http://localhost/gle') @@ -79,7 +79,7 @@ describe('SyncButton', () => { render(, { wrapper }) const link = screen.getByRole('link', { - name: /Sync with BitBucket Server/, + name: /Sync with Bitbucket Server/, }) const expectedRedirect = encodeURIComponent('http://localhost/bbs') diff --git a/src/pages/SyncProviderPage/SyncButton.tsx b/src/pages/SyncProviderPage/SyncButton.tsx index 23026ae251..d433b2cc15 100644 --- a/src/pages/SyncProviderPage/SyncButton.tsx +++ b/src/pages/SyncProviderPage/SyncButton.tsx @@ -17,11 +17,11 @@ const SyncButton: React.FC = ({ provider }) => { data-cy={'login-button'} > {`Logo - Sync with {providerToName(provider)} + Sync with {providerToName(provider, true)}
) diff --git a/src/pages/SyncProviderPage/SyncProviderPage.spec.tsx b/src/pages/SyncProviderPage/SyncProviderPage.spec.tsx index a04ec928de..ce1da7d294 100644 --- a/src/pages/SyncProviderPage/SyncProviderPage.spec.tsx +++ b/src/pages/SyncProviderPage/SyncProviderPage.spec.tsx @@ -128,7 +128,7 @@ describe('SyncProviderPage', () => { setup() render(, { wrapper }) - const githubSyncButton = await screen.findByText(/Sync with Github/) + const githubSyncButton = await screen.findByText(/Sync with GitHub/) expect(githubSyncButton).toBeInTheDocument() }) @@ -138,7 +138,7 @@ describe('SyncProviderPage', () => { render(, { wrapper }) const gheSyncButton = await screen.findByText( - /Sync with Gitlab Enterprise/ + /Sync with GitLab Enterprise/ ) expect(gheSyncButton).toBeInTheDocument() }) diff --git a/src/services/navigation/useNavLinks/useStaticNavLinks.js b/src/services/navigation/useNavLinks/useStaticNavLinks.js index 1fc87c4f71..80cd01eb14 100644 --- a/src/services/navigation/useNavLinks/useStaticNavLinks.js +++ b/src/services/navigation/useNavLinks/useStaticNavLinks.js @@ -168,13 +168,13 @@ export function useStaticNavLinks() { codecovGithubApp: { path: () => 'https://github.com/apps/codecov', isExternalLink: true, - text: 'Codecov Github App', + text: 'Codecov GitHub App', openNewTab: true, }, codecovGithubAppSelectTarget: { path: () => 'https://github.com/apps/codecov/installations/select_target', isExternalLink: true, - text: 'Codecov Github App', + text: 'Codecov GitHub App', openNewTab: true, }, teamBot: { @@ -366,14 +366,14 @@ export function useStaticNavLinks() { openNewTab: true, }, codecovExampleWorkflow: { - text: 'Github Codecov Example workflow', + text: 'GitHub Codecov Example workflow', path: () => 'https://github.com/codecov/example-python/blob/main/.github/workflows/ci.yml', isExternalLink: true, openNewTab: true, }, codecovActionRepo: { - text: 'Github Codecov Action Repo', + text: 'GitHub Codecov Action Repo', path: () => 'https://github.com/codecov/codecov-action', isExternalLink: true, openNewTab: true, diff --git a/src/shared/utils/loginProviders.spec.ts b/src/shared/utils/loginProviders.spec.ts index 69244a2d9a..4f40e91629 100644 --- a/src/shared/utils/loginProviders.spec.ts +++ b/src/shared/utils/loginProviders.spec.ts @@ -35,7 +35,7 @@ describe('loginProviderToName', () => { describe('valid value is passed', () => { it('returns the provider name', () => { const data = loginProviderToName(LOGIN_PROVIDER_SHORT_NAMES.gh) - expect(data).toBe('Github') + expect(data).toBe('GitHub') }) }) diff --git a/src/shared/utils/loginProviders.ts b/src/shared/utils/loginProviders.ts index 8f2da8da55..ce2e2b6e10 100644 --- a/src/shared/utils/loginProviders.ts +++ b/src/shared/utils/loginProviders.ts @@ -78,18 +78,18 @@ export function loginProviderToShortName(loginProvider?: string) { } export const LOGIN_PROVIDER_NAMES = { - gh: 'Github', - bb: 'BitBucket', - gl: 'Gitlab', - ghe: 'Github Enterprise', - gle: 'Gitlab Enterprise', - bbs: 'BitBucket Server', - github: 'Github', - bitbucket: 'BitBucket', - gitlab: 'Gitlab', - github_enterprise: 'Github Enterprise', - gitlab_enterprise: 'Gitlab Enterprise', - bitbucket_server: 'BitBucket Server', + gh: 'GitHub', + bb: 'Bitbucket', + gl: 'GitLab', + ghe: 'GitHub Enterprise', + gle: 'GitLab Enterprise', + bbs: 'Bitbucket Server', + github: 'GitHub', + bitbucket: 'Bitbucket', + gitlab: 'GitLab', + github_enterprise: 'GitHub Enterprise', + gitlab_enterprise: 'GitLab Enterprise', + bitbucket_server: 'Bitbucket Server', sentry: 'Sentry', okta: 'Okta', } as const @@ -115,11 +115,18 @@ export function loginProviderToName(loginProvider?: string) { export const LOGIN_PROVIDER_IMAGES = { Github: githubLogo, + GitHub: githubLogo, Gitlab: gitlabLogo, + GitLab: gitlabLogo, BitBucket: bitbucketLogo, + Bitbucket: bitbucketLogo, 'Github Enterprise': githubLogo, + 'GitHub Enterprise': githubLogo, 'Gitlab Enterprise': gitlabLogo, + 'GitLab Enterprise': gitlabLogo, 'BitBucket Server': bitbucketLogo, + 'Bitbucket Server': bitbucketLogo, + Sentry: sentryLogo, Okta: oktaLogo, } as const diff --git a/src/shared/utils/provider.js b/src/shared/utils/provider.js index 654ebe3ec3..caca3b1429 100644 --- a/src/shared/utils/provider.js +++ b/src/shared/utils/provider.js @@ -5,20 +5,20 @@ import bitbucketLogo from 'assets/providers/bitbucket-icon.svg' import githubLogo from 'assets/providers/github-icon.svg' import gitlabLogo from 'assets/providers/gitlab-icon.svg' -export function providerToName(provider) { +export function providerToName(provider, forRender = false) { return { - gh: 'Github', - bb: 'BitBucket', - gl: 'Gitlab', - ghe: 'Github Enterprise', - gle: 'Gitlab Enterprise', - bbs: 'BitBucket Server', - github: 'Github', - bitbucket: 'BitBucket', - gitlab: 'Gitlab', - github_enterprise: 'Github Enterprise', - gitlab_enterprise: 'Gitlab Enterprise', - bitbucket_server: 'BitBucket Server', + gh: forRender ? 'GitHub' : 'Github', + bb: forRender ? 'Bitbucket' : 'BitBucket', + gl: forRender ? 'GitLab' : 'Gitlab', + ghe: forRender ? 'GitHub Enterprise' : 'Github Enterprise', + gle: forRender ? 'GitLab Enterprise' : 'Gitlab Enterprise', + bbs: forRender ? 'Bitbucket Server' : 'BitBucket Server', + github: forRender ? 'GitHub' : 'Github', + bitbucket: forRender ? 'Bitbucket' : 'BitBucket', + gitlab: forRender ? 'GitLab' : 'Gitlab', + github_enterprise: forRender ? 'GitHub Enterprise' : 'Github Enterprise', + gitlab_enterprise: forRender ? 'GitLab Enterprise' : 'Gitlab Enterprise', + bitbucket_server: forRender ? 'Bitbucket Server' : 'BitBucket Server', }[provider.toLowerCase()] } diff --git a/src/shared/utils/provider.spec.js b/src/shared/utils/provider.spec.js index fc229eb906..b17252e353 100644 --- a/src/shared/utils/provider.spec.js +++ b/src/shared/utils/provider.spec.js @@ -18,27 +18,45 @@ describe('providerToName', () => { }) }) + describe('when called with gh and for render', () => { + it('returns GitHub', () => { + expect(providerToName('gh', true)).toBe('GitHub') + }) + }) + describe('when called with gl', () => { it('returns Gitlab', () => { expect(providerToName('gl')).toBe('Gitlab') }) }) + describe('when called with gl and for render', () => { + it('returns GitLab', () => { + expect(providerToName('gl', true)).toBe('GitLab') + }) + }) + describe('when called with bb', () => { it('returns BitBucket', () => { expect(providerToName('bb')).toBe('BitBucket') }) }) + describe('when called with bb for render', () => { + it('returns Bitbucket', () => { + expect(providerToName('bb', true)).toBe('Bitbucket') + }) + }) + describe('when called with ghe', () => { it('returns Github Enterprise', () => { expect(providerToName('ghe')).toBe('Github Enterprise') }) }) - describe('when called with gle', () => { - it('returns Gitlab Enterprise', () => { - expect(providerToName('gle')).toBe('Gitlab Enterprise') + describe('when called with gle with render', () => { + it('returns GitLab Enterprise', () => { + expect(providerToName('gle', true)).toBe('GitLab Enterprise') }) }) @@ -48,24 +66,48 @@ describe('providerToName', () => { }) }) + describe('when called with bbs for render', () => { + it('returns Bitbucket Server', () => { + expect(providerToName('bbs', true)).toBe('Bitbucket Server') + }) + }) + describe('when called with Github', () => { it('returns Github', () => { expect(providerToName('github')).toBe('Github') }) }) + describe('when called with Github and for render', () => { + it('returns GitHub', () => { + expect(providerToName('github', true)).toBe('GitHub') + }) + }) + describe('when called with Gitlab', () => { it('returns Gitlab', () => { expect(providerToName('gitlab')).toBe('Gitlab') }) }) + describe('when called with Gitlab and for render', () => { + it('returns GitLab', () => { + expect(providerToName('gitlab', true)).toBe('GitLab') + }) + }) + describe('when called with BitBucket', () => { it('returns BitBucket', () => { expect(providerToName('BitBucket')).toBe('BitBucket') }) }) + describe('when called with BitBucket for render', () => { + it('returns Bitbucket', () => { + expect(providerToName('BitBucket', true)).toBe('Bitbucket') + }) + }) + describe('when called with github_enterprise', () => { it('returns Github Enterprise', () => { expect(providerToName('github_enterprise')).toBe('Github Enterprise') @@ -78,11 +120,25 @@ describe('providerToName', () => { }) }) + describe('when called with gitlab-enterprise for render', () => { + it('returns GitLab Enterprise', () => { + expect(providerToName('gitlab_enterprise', true)).toBe( + 'GitLab Enterprise' + ) + }) + }) + describe('when called with bitbucket_server', () => { it('returns BitBucket Server', () => { expect(providerToName('bitbucket_server')).toBe('BitBucket Server') }) }) + + describe('when called with bitbucket_server for render', () => { + it('returns Bitbucket Server', () => { + expect(providerToName('bitbucket_server', true)).toBe('Bitbucket Server') + }) + }) }) describe('providerImage', () => {