Skip to content

Commit 4cec586

Browse files
fix: change login copy to say 'log in' (#3879)
1 parent a1e6b33 commit 4cec586

File tree

11 files changed

+28
-28
lines changed

11 files changed

+28
-28
lines changed

src/layouts/Header/components/GuestHeader/GuestHeader.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ describe('GuestHeader', () => {
147147
render(<GuestHeader />, { wrapper })
148148

149149
const queryString = qs.stringify({ to: '/gh' })
150-
const login = screen.queryByText('Login')
150+
const login = screen.queryByText('Log in')
151151
expect(login).toBeInTheDocument()
152152
expect(login).toHaveAttribute('href', `/?${queryString}`)
153153
})

src/layouts/Header/components/GuestHeader/GuestHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function GuestHeader() {
8181
data-testid="login-link"
8282
hook="guest-header-login-link"
8383
>
84-
Login
84+
Log in
8585
</Button>
8686
) : (
8787
<div
@@ -96,7 +96,7 @@ function GuestHeader() {
9696
data-testid="login-link"
9797
hook="guest-header-login-link"
9898
>
99-
Login
99+
Log in
100100
</A>
101101
<Button
102102
to={{ pageName: 'freeTrial' }}

src/layouts/shared/NetworkErrorBoundary/NetworkErrorBoundary.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,15 @@ function ResetHandler({ logoutUser = false, reset, statusCode }) {
178178
return (
179179
<div className="my-4 flex items-center gap-2">
180180
<Button onClick={logoutUser ? handleSignOut : handleReset}>
181-
{logoutUser ? 'Return to login' : 'Return to previous page'}
181+
{logoutUser ? 'Return to log in' : 'Return to previous page'}
182182
</Button>
183183
{/* if the user is logged in, we don't want to show the login button */}
184184
{statusCode === 404 && !user ? (
185185
<Button
186186
variant="primary"
187187
to={{ pageName: 'login', options: { to: location.pathname } }}
188188
>
189-
Login
189+
Log in
190190
</Button>
191191
) : null}
192192
</div>

src/layouts/shared/NetworkErrorBoundary/NetworkErrorBoundary.test.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ describe('NetworkErrorBoundary', () => {
396396
await user.type(textBox, 'fail')
397397

398398
const queryString = qs.stringify({ to: '/gh/codecov' })
399-
const loginButton = await screen.findByText(/Login/)
399+
const loginButton = await screen.findByText(/Log in/)
400400
expect(loginButton).toBeInTheDocument()
401401
expect(loginButton).toHaveAttribute('href', `/login?${queryString}`)
402402
})
@@ -415,7 +415,7 @@ describe('NetworkErrorBoundary', () => {
415415
const notFound = await screen.findByText(/Not found/)
416416
expect(notFound).toBeInTheDocument()
417417

418-
const loginButton = screen.queryByText(/Login/)
418+
const loginButton = screen.queryByText(/Log in/)
419419
expect(loginButton).not.toBeInTheDocument()
420420
})
421421
})
@@ -459,7 +459,7 @@ describe('NetworkErrorBoundary', () => {
459459
await user.type(textBox, 'fail')
460460

461461
const queryString = qs.stringify({ to: '/gh/codecov' })
462-
const loginButton = await screen.findByText(/Login/)
462+
const loginButton = await screen.findByText(/Log in/)
463463
expect(loginButton).toBeInTheDocument()
464464
expect(loginButton).toHaveAttribute('href', `/?${queryString}`)
465465
})
@@ -478,7 +478,7 @@ describe('NetworkErrorBoundary', () => {
478478
const notFound = await screen.findByText(/Not found/)
479479
expect(notFound).toBeInTheDocument()
480480

481-
const loginButton = screen.queryByText(/Login/)
481+
const loginButton = screen.queryByText(/Log in/)
482482
expect(loginButton).not.toBeInTheDocument()
483483
})
484484
})
@@ -517,7 +517,7 @@ describe('NetworkErrorBoundary', () => {
517517
const textBox = await screen.findByRole('textbox')
518518
await user.type(textBox, 'fail')
519519

520-
const button = await screen.findByText('Return to login')
520+
const button = await screen.findByText('Return to log in')
521521
expect(button).toBeInTheDocument()
522522

523523
await user.click(button)

src/pages/EnterpriseLandingPage/ProviderCard/ProviderCard.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ describe('ProviderCard', () => {
101101
})
102102

103103
const element = screen.getByRole('link', {
104-
name: `Login via ${name}`,
104+
name: `Log in via ${name}`,
105105
})
106106
expect(element).toBeInTheDocument()
107107
expect(element).toHaveAttribute('href', `secret-api-url${to}`)
@@ -158,7 +158,7 @@ describe('ProviderCard', () => {
158158
)
159159

160160
const element = screen.getByRole('link', {
161-
name: `Login via ${name}`,
161+
name: `Log in via ${name}`,
162162
})
163163
expect(element).toBeInTheDocument()
164164
expect(element).toHaveAttribute(

src/pages/EnterpriseLandingPage/ProviderCard/ProviderCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const ExternalProviderButton: React.FC<ExternalProviderButtonProps> = ({
4444
options: { provider: provider?.externalKey, to },
4545
}}
4646
>
47-
Login via {provider.name}
47+
Log in via {provider.name}
4848
</Button>
4949
)
5050
}
@@ -77,7 +77,7 @@ const InternalProviderButton: React.FC<InternalProviderButtonProps> = ({
7777
options: { provider: provider.selfHostedKey, to },
7878
}}
7979
>
80-
Login via {provider.selfHostedName}
80+
Log in via {provider.selfHostedName}
8181
</Button>
8282
)
8383
}

src/pages/LoginPage/LoginButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function LoginButton({ provider }) {
4343
className="mx-4 w-6"
4444
src={providerImage}
4545
/>
46-
Login with {providerName}
46+
Log in with {providerName}
4747
</a>
4848
)
4949
}

src/pages/LoginPage/LoginButton.test.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('LoginButton', () => {
5151
}),
5252
})
5353

54-
const bitbucket = screen.getByText(/Login with Bitbucket/i)
54+
const bitbucket = screen.getByText(/Log in with Bitbucket/i)
5555
expect(bitbucket).toBeInTheDocument()
5656
})
5757
})
@@ -65,7 +65,7 @@ describe('LoginButton', () => {
6565
}),
6666
})
6767

68-
const github = screen.getByText(/Login with GitHub/i)
68+
const github = screen.getByText(/Log in with GitHub/i)
6969
expect(github).toBeInTheDocument()
7070
})
7171
})
@@ -79,7 +79,7 @@ describe('LoginButton', () => {
7979
}),
8080
})
8181

82-
const gitlab = screen.getByText(/Login with GitLab/i)
82+
const gitlab = screen.getByText(/Log in with GitLab/i)
8383
expect(gitlab).toBeInTheDocument()
8484
})
8585
})
@@ -93,7 +93,7 @@ describe('LoginButton', () => {
9393
}),
9494
})
9595

96-
const sentry = screen.getByText(/Login with Sentry/i)
96+
const sentry = screen.getByText(/Log in with Sentry/i)
9797
expect(sentry).toBeInTheDocument()
9898
})
9999
})
@@ -106,7 +106,7 @@ describe('LoginButton', () => {
106106
}),
107107
})
108108

109-
const github = screen.getByText(/Login with GitHub/i)
109+
const github = screen.getByText(/Log in with GitHub/i)
110110
expect(github).toBeInTheDocument()
111111

112112
act(() => github.click())
@@ -134,7 +134,7 @@ describe('LoginButton', () => {
134134
to: `http://secret-api-url/gh?${redirectQueryString}`,
135135
})
136136

137-
const github = screen.getByText(/Login with GitHub/i)
137+
const github = screen.getByText(/Log in with GitHub/i)
138138
expect(github).toHaveAttribute(
139139
'href',
140140
`secret-api-url/login/gh?${toQueryString}`

src/pages/LoginPage/LoginPage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function LoginPage() {
1717

1818
return (
1919
<div className="flex h-full flex-col items-center justify-center">
20-
<h1 className="mb-4 text-3xl">Login to Codecov</h1>
20+
<h1 className="mb-4 text-3xl">Log in to Codecov</h1>
2121
<p>You&apos;ll be taken to your provider to authenticate</p>
2222
<div className="mx-auto mt-6 w-96">
2323
<div className="mb-4">

src/pages/LoginPage/LoginPage.test.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe('LoginPage', () => {
5757
render(<LoginPage />, { wrapper: wrapper('/login') })
5858

5959
const githubLink = screen.getByRole('link', {
60-
name: /login with github/i,
60+
name: /Log in with github/i,
6161
})
6262
expect(githubLink).toBeInTheDocument()
6363
})
@@ -66,7 +66,7 @@ describe('LoginPage', () => {
6666
render(<LoginPage />, { wrapper: wrapper('/login') })
6767

6868
const sentryLink = screen.getByRole('link', {
69-
name: /login with sentry/i,
69+
name: /Log in with sentry/i,
7070
})
7171
expect(sentryLink).toBeInTheDocument()
7272
})
@@ -75,7 +75,7 @@ describe('LoginPage', () => {
7575
render(<LoginPage />, { wrapper: wrapper('/login') })
7676

7777
const gitlabLink = screen.getByRole('link', {
78-
name: /login with gitlab/i,
78+
name: /Log in with gitlab/i,
7979
})
8080
expect(gitlabLink).toBeInTheDocument()
8181
})
@@ -84,7 +84,7 @@ describe('LoginPage', () => {
8484
render(<LoginPage />, { wrapper: wrapper('/login') })
8585

8686
const bitBucketLink = screen.getByRole('link', {
87-
name: /login with bitbucket/i,
87+
name: /Log in with bitbucket/i,
8888
})
8989
expect(bitBucketLink).toBeInTheDocument()
9090
})
@@ -97,7 +97,7 @@ describe('LoginPage', () => {
9797
render(<LoginPage />, { wrapper: wrapper('/login/gh') })
9898

9999
const githubLink = screen.getByRole('link', {
100-
name: /login with github/i,
100+
name: /Log in with github/i,
101101
})
102102
expect(githubLink).toBeInTheDocument()
103103
})

0 commit comments

Comments
 (0)