Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Mobile
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
200
Merge Requests
13
Security & Compliance
Packages
Project Analytics
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Commits
0ecdd5af
Commit
0ecdd5af
authored
21 minutes ago
by
Juan Manuel Solaro
Browse files
Options
Download
(fix) update tests
parent
f7c4e8f6
new-onboarding-fixes
1 merge request
!489
WIP: Fix various issues for new onboarding and Email Confirmation
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
__tests__/auth/RegisterFormNew.js
View file @
0ecdd5af
...
...
@@ -9,6 +9,7 @@ import authService from '../../src/auth/AuthService';
jest
.
mock
(
'
../../src/auth/AuthService
'
);
jest
.
mock
(
'
../../src/auth/UserStore
'
);
jest
.
mock
(
'
../../src/onboarding/OnboardingStore
'
);
Alert
.
alert
=
jest
.
fn
();
...
...
@@ -16,6 +17,7 @@ Alert.alert = jest.fn();
// Note: test renderer must be required after react-native.
import
renderer
from
'
react-test-renderer
'
;
import
UserStore
from
'
../../src/auth/UserStore
'
;
import
OnboardingStore
from
'
../../src/onboarding/OnboardingStore
'
;
describe
(
'
RegisterFormNew component
'
,
()
=>
{
beforeEach
(()
=>
{
...
...
@@ -25,8 +27,9 @@ describe('RegisterFormNew component', () => {
it
(
'
should renders correctly
'
,
()
=>
{
const
userStore
=
new
UserStore
();
const
onboardingStore
=
new
OnboardingStore
();
const
registerForm
=
renderer
.
create
(
<
RegisterFormNew
user
=
{
userStore
}
/
>
<
RegisterFormNew
user
=
{
userStore
}
onboarding
=
{
onboardingStore
}
/
>
).
toJSON
();
expect
(
registerForm
).
toMatchSnapshot
();
});
...
...
@@ -36,9 +39,10 @@ describe('RegisterFormNew component', () => {
authService
.
register
.
mockResolvedValue
();
const
userStore
=
new
UserStore
();
const
onboardingStore
=
new
OnboardingStore
();
const
wrapper
=
shallow
(
<
RegisterFormNew
user
=
{
userStore
}
/
>
<
RegisterFormNew
user
=
{
userStore
}
onboarding
=
{
onboardingStore
}
/
>
);
const
render
=
wrapper
.
dive
();
...
...
@@ -75,9 +79,10 @@ describe('RegisterFormNew component', () => {
it
(
'
should warn the user if the password confirmation is different
'
,
async
()
=>
{
const
userStore
=
new
UserStore
();
const
onboardingStore
=
new
OnboardingStore
();
const
wrapper
=
shallow
(
<
RegisterFormNew
user
=
{
userStore
}
/
>
<
RegisterFormNew
user
=
{
userStore
}
onboarding
=
{
onboardingStore
}
/
>
);
const
render
=
wrapper
.
dive
();
...
...
@@ -113,9 +118,10 @@ describe('RegisterFormNew component', () => {
it
(
'
should warn the user if the terms and conditions are not accepted
'
,
async
()
=>
{
const
userStore
=
new
UserStore
();
const
onboardingStore
=
new
OnboardingStore
();
const
wrapper
=
shallow
(
<
RegisterFormNew
user
=
{
userStore
}
/
>
<
RegisterFormNew
user
=
{
userStore
}
onboarding
=
{
onboardingStore
}
/
>
);
const
render
=
wrapper
.
dive
();
...
...
This diff is collapsed.
__tests__/auth/__snapshots__/RegisterFormNew.js.snap
View file @
0ecdd5af
...
...
@@ -201,7 +201,7 @@ exports[`RegisterFormNew component should renders correctly 1`] = `
"color": "#4F4F50",
"fontFamily": "Roboto",
"fontSize": 16,
"height":
4
0,
"height":
5
0,
"lineHeight": 21,
"padding": 10,
},
...
...
@@ -280,7 +280,7 @@ exports[`RegisterFormNew component should renders correctly 1`] = `
"color": "#4F4F50",
"fontFamily": "Roboto",
"fontSize": 16,
"height":
4
0,
"height":
5
0,
"lineHeight": 21,
"padding": 10,
},
...
...
@@ -360,7 +360,7 @@ exports[`RegisterFormNew component should renders correctly 1`] = `
"color": "#4F4F50",
"fontFamily": "Roboto",
"fontSize": 16,
"height":
4
0,
"height":
5
0,
"lineHeight": 21,
"padding": 10,
},
...
...
@@ -405,7 +405,6 @@ exports[`RegisterFormNew component should renders correctly 1`] = `
Object {
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "flex-end",
}
}
>
...
...
This diff is collapsed.
Please
register
or
sign in
to comment