-
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4459 from hotosm/develop
v4.4.3 Release
- Loading branch information
Showing
70 changed files
with
1,724 additions
and
1,012 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
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React from 'react'; | ||
import { render, screen, fireEvent } from '@testing-library/react'; | ||
import '@testing-library/jest-dom'; | ||
|
||
import { ReduxIntlProviders } from '../../../utils/testWithIntl'; | ||
import { AuthButtons } from '../index'; | ||
|
||
describe('AuthButtons', () => { | ||
it('without alternativeSignUpText', () => { | ||
render( | ||
<ReduxIntlProviders> | ||
<AuthButtons | ||
logInStyle="blue-dark bg-white" | ||
signUpStyle="bg-blue-dark white ml1 v-mid" | ||
redirectTo={'/welcome'} | ||
/> | ||
</ReduxIntlProviders>, | ||
); | ||
expect(screen.getByText('Log in').className).toContain('blue-dark bg-white'); | ||
expect(screen.getByText('Sign up').className).toContain('bg-blue-dark white ml1 v-mid'); | ||
expect(screen.queryByText('Create an account')).not.toBeInTheDocument(); | ||
expect(screen.queryByText('Name')).not.toBeInTheDocument(); | ||
fireEvent.click(screen.getByText('Sign up')); | ||
expect(screen.getByText('Name')).toBeInTheDocument(); | ||
expect(screen.getByText('Email')).toBeInTheDocument(); | ||
expect(screen.getByText('Next')).toBeInTheDocument(); | ||
}); | ||
it('with alternativeSignUpText', () => { | ||
render( | ||
<ReduxIntlProviders> | ||
<AuthButtons | ||
logInStyle="white bg-red" | ||
signUpStyle="bg-orange black ml1 v-mid" | ||
redirectTo={'/welcome'} | ||
alternativeSignUpText={true} | ||
/> | ||
</ReduxIntlProviders>, | ||
); | ||
expect(screen.getByText('Log in').className).toContain('white bg-red'); | ||
expect(screen.getByText('Create an account').className).toContain('bg-orange black ml1 v-mid'); | ||
expect(screen.queryByText('Sign up')).not.toBeInTheDocument(); | ||
expect(screen.queryByText('Name')).not.toBeInTheDocument(); | ||
fireEvent.click(screen.getByText('Create an account')); | ||
expect(screen.getByText('Name')).toBeInTheDocument(); | ||
expect(screen.getByText('Email')).toBeInTheDocument(); | ||
expect(screen.getByText('Next')).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
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.