-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(clerk-js,localizations): Improve text on username, password scree…
…ns (#2843) * chore(clerk-js): Remove unneeded localization key * fix(clerk-js,localizations): Improve text on username, profile, password screens
- Loading branch information
Showing
41 changed files
with
431 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,32 +16,34 @@ describe('AccountPage', () => { | |
}); | ||
|
||
describe('Sections', () => { | ||
it('open the profile section and can edit name', async () => { | ||
it('open the profile section and can update name', async () => { | ||
const { wrapper } = await createFixtures(f => { | ||
f.withName(); | ||
f.withUser({ email_addresses: ['[email protected]'], first_name: 'Clerk', last_name: 'User' }); | ||
}); | ||
|
||
const { getByText, getByRole, userEvent, queryByText, queryByLabelText } = render(<AccountPage />, { wrapper }); | ||
const { getByText, getByLabelText, getByRole, userEvent, queryByText, queryByLabelText } = render( | ||
<AccountPage />, | ||
{ wrapper }, | ||
); | ||
getByText('Clerk User'); | ||
await userEvent.click(getByRole('button', { name: /edit profile/i })); | ||
await waitFor(() => getByText(/update profile/i)); | ||
await userEvent.click(getByRole('button', { name: /update profile/i })); | ||
await waitFor(() => getByLabelText(/first name/i)); | ||
expect(queryByText('Clerk User')).not.toBeInTheDocument(); | ||
expect(queryByLabelText(/first name/i)).toBeInTheDocument(); | ||
expect(queryByLabelText(/last name/i)).toBeInTheDocument(); | ||
|
||
expect(getByRole('button', { name: /save$/i })).toBeDisabled(); | ||
}); | ||
|
||
it('open the profile section and cannot edit name', async () => { | ||
it('open the profile section and cannot update name', async () => { | ||
const { wrapper } = await createFixtures(f => { | ||
f.withUser({ email_addresses: ['[email protected]'], first_name: 'Clerk', last_name: 'User' }); | ||
}); | ||
|
||
const { getByText, getByRole, userEvent, queryByText, queryByLabelText } = render(<AccountPage />, { wrapper }); | ||
getByText('Clerk User'); | ||
await userEvent.click(getByRole('button', { name: /edit profile/i })); | ||
await waitFor(() => getByText(/update profile/i)); | ||
await userEvent.click(getByRole('button', { name: /update profile/i })); | ||
await waitFor(() => getByRole('button', { name: /save/i })); | ||
expect(queryByText('Clerk User')).not.toBeInTheDocument(); | ||
expect(queryByLabelText(/first name/i)).not.toBeInTheDocument(); | ||
expect(queryByLabelText(/last name/i)).not.toBeInTheDocument(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.