Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe('GuestHeader', () => {
render(<GuestHeader />, { wrapper })

const queryString = qs.stringify({ to: '/gh' })
const login = screen.queryByText('Login')
const login = screen.queryByText('Log in')
expect(login).toBeInTheDocument()
expect(login).toHaveAttribute('href', `/?${queryString}`)
})
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/Header/components/GuestHeader/GuestHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function GuestHeader() {
data-testid="login-link"
hook="guest-header-login-link"
>
Login
Log in
</Button>
) : (
<div
Expand All @@ -96,7 +96,7 @@ function GuestHeader() {
data-testid="login-link"
hook="guest-header-login-link"
>
Login
Log in
</A>
<Button
to={{ pageName: 'freeTrial' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ function ResetHandler({ logoutUser = false, reset, statusCode }) {
return (
<div className="my-4 flex items-center gap-2">
<Button onClick={logoutUser ? handleSignOut : handleReset}>
{logoutUser ? 'Return to login' : 'Return to previous page'}
{logoutUser ? 'Return to log in' : 'Return to previous page'}
</Button>
{/* if the user is logged in, we don't want to show the login button */}
{statusCode === 404 && !user ? (
<Button
variant="primary"
to={{ pageName: 'login', options: { to: location.pathname } }}
>
Login
Log in
</Button>
) : null}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ describe('NetworkErrorBoundary', () => {
await user.type(textBox, 'fail')

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

const loginButton = screen.queryByText(/Login/)
const loginButton = screen.queryByText(/Log in/)
expect(loginButton).not.toBeInTheDocument()
})
})
Expand Down Expand Up @@ -459,7 +459,7 @@ describe('NetworkErrorBoundary', () => {
await user.type(textBox, 'fail')

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

const loginButton = screen.queryByText(/Login/)
const loginButton = screen.queryByText(/Log in/)
expect(loginButton).not.toBeInTheDocument()
})
})
Expand Down Expand Up @@ -517,7 +517,7 @@ describe('NetworkErrorBoundary', () => {
const textBox = await screen.findByRole('textbox')
await user.type(textBox, 'fail')

const button = await screen.findByText('Return to login')
const button = await screen.findByText('Return to log in')
expect(button).toBeInTheDocument()

await user.click(button)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('ProviderCard', () => {
})

const element = screen.getByRole('link', {
name: `Login via ${name}`,
name: `Log in via ${name}`,
})
expect(element).toBeInTheDocument()
expect(element).toHaveAttribute('href', `secret-api-url${to}`)
Expand Down Expand Up @@ -158,7 +158,7 @@ describe('ProviderCard', () => {
)

const element = screen.getByRole('link', {
name: `Login via ${name}`,
name: `Log in via ${name}`,
})
expect(element).toBeInTheDocument()
expect(element).toHaveAttribute(
Expand Down
4 changes: 2 additions & 2 deletions src/pages/EnterpriseLandingPage/ProviderCard/ProviderCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const ExternalProviderButton: React.FC<ExternalProviderButtonProps> = ({
options: { provider: provider?.externalKey, to },
}}
>
Login via {provider.name}
Log in via {provider.name}
</Button>
)
}
Expand Down Expand Up @@ -77,7 +77,7 @@ const InternalProviderButton: React.FC<InternalProviderButtonProps> = ({
options: { provider: provider.selfHostedKey, to },
}}
>
Login via {provider.selfHostedName}
Log in via {provider.selfHostedName}
</Button>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/LoginPage/LoginButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function LoginButton({ provider }) {
className="mx-4 w-6"
src={providerImage}
/>
Login with {providerName}
Log in with {providerName}
</a>
)
}
Expand Down
12 changes: 6 additions & 6 deletions src/pages/LoginPage/LoginButton.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('LoginButton', () => {
}),
})

const bitbucket = screen.getByText(/Login with Bitbucket/i)
const bitbucket = screen.getByText(/Log in with Bitbucket/i)
expect(bitbucket).toBeInTheDocument()
})
})
Expand All @@ -65,7 +65,7 @@ describe('LoginButton', () => {
}),
})

const github = screen.getByText(/Login with GitHub/i)
const github = screen.getByText(/Log in with GitHub/i)
expect(github).toBeInTheDocument()
})
})
Expand All @@ -79,7 +79,7 @@ describe('LoginButton', () => {
}),
})

const gitlab = screen.getByText(/Login with GitLab/i)
const gitlab = screen.getByText(/Log in with GitLab/i)
expect(gitlab).toBeInTheDocument()
})
})
Expand All @@ -93,7 +93,7 @@ describe('LoginButton', () => {
}),
})

const sentry = screen.getByText(/Login with Sentry/i)
const sentry = screen.getByText(/Log in with Sentry/i)
expect(sentry).toBeInTheDocument()
})
})
Expand All @@ -106,7 +106,7 @@ describe('LoginButton', () => {
}),
})

const github = screen.getByText(/Login with GitHub/i)
const github = screen.getByText(/Log in with GitHub/i)
expect(github).toBeInTheDocument()

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

const github = screen.getByText(/Login with GitHub/i)
const github = screen.getByText(/Log in with GitHub/i)
expect(github).toHaveAttribute(
'href',
`secret-api-url/login/gh?${toQueryString}`
Expand Down
2 changes: 1 addition & 1 deletion src/pages/LoginPage/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function LoginPage() {

return (
<div className="flex h-full flex-col items-center justify-center">
<h1 className="mb-4 text-3xl">Login to Codecov</h1>
<h1 className="mb-4 text-3xl">Log in to Codecov</h1>
<p>You&apos;ll be taken to your provider to authenticate</p>
<div className="mx-auto mt-6 w-96">
<div className="mb-4">
Expand Down
10 changes: 5 additions & 5 deletions src/pages/LoginPage/LoginPage.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('LoginPage', () => {
render(<LoginPage />, { wrapper: wrapper('/login') })

const githubLink = screen.getByRole('link', {
name: /login with github/i,
name: /Log in with github/i,
})
expect(githubLink).toBeInTheDocument()
})
Expand All @@ -66,7 +66,7 @@ describe('LoginPage', () => {
render(<LoginPage />, { wrapper: wrapper('/login') })

const sentryLink = screen.getByRole('link', {
name: /login with sentry/i,
name: /Log in with sentry/i,
})
expect(sentryLink).toBeInTheDocument()
})
Expand All @@ -75,7 +75,7 @@ describe('LoginPage', () => {
render(<LoginPage />, { wrapper: wrapper('/login') })

const gitlabLink = screen.getByRole('link', {
name: /login with gitlab/i,
name: /Log in with gitlab/i,
})
expect(gitlabLink).toBeInTheDocument()
})
Expand All @@ -84,7 +84,7 @@ describe('LoginPage', () => {
render(<LoginPage />, { wrapper: wrapper('/login') })

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

const githubLink = screen.getByRole('link', {
name: /login with github/i,
name: /Log in with github/i,
})
expect(githubLink).toBeInTheDocument()
})
Expand Down
2 changes: 1 addition & 1 deletion src/services/navigation/useNavLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function useNavLinks() {
isExternalLink: true,
},
login: {
text: 'Login',
text: 'Log in',
path: ({ to }: { to?: string } = {}) => {
const query = qs.stringify({ to }, { addQueryPrefix: true })

Expand Down