From fbb194cdacf56e219ab8116876f224e533a48f90 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Wed, 29 Aug 2018 16:01:51 +0200 Subject: [PATCH 1/3] Fix linter issue --- src/core/build/postcss.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/build/postcss.config.js b/src/core/build/postcss.config.js index 3a386d17b..543cc877f 100644 --- a/src/core/build/postcss.config.js +++ b/src/core/build/postcss.config.js @@ -37,7 +37,7 @@ const mediaQueryVariables = mapValues( // with the smallest screen and gradually add styling for the // next bigger screen. This is realized using `min-width` without // ever using `max-width`. - v => `${Number.parseInt(v) + 1}px` + v => `${Number.parseInt(v, 10) + 1}px` ); module.exports = { From 885a724876d8e182c511d72c714071517d8ef15f Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Wed, 29 Aug 2018 16:02:31 +0200 Subject: [PATCH 2/3] Make each test independent --- .../auth/containers/SignUpContainer.tsx | 4 +- .../test/__snapshots__/signIn.spec.tsx.snap | 27 +- .../test/__snapshots__/signUp.spec.tsx.snap | 292 +++++++++++++++--- src/core/client/auth/test/signIn.spec.tsx | 70 +++-- src/core/client/auth/test/signUp.spec.tsx | 90 ++++-- 5 files changed, 390 insertions(+), 93 deletions(-) diff --git a/src/core/client/auth/containers/SignUpContainer.tsx b/src/core/client/auth/containers/SignUpContainer.tsx index 8be2d84ed..a4400863f 100644 --- a/src/core/client/auth/containers/SignUpContainer.tsx +++ b/src/core/client/auth/containers/SignUpContainer.tsx @@ -17,8 +17,8 @@ interface SignUpContainerProps { class SignUpContainer extends Component { private onSubmit: SignUpForm["onSubmit"] = async (input, form) => { try { - return await this.props.signUp(input); - form.reset(); + await this.props.signUp(input); + return form.reset(); } catch (error) { return { [FORM_ERROR]: error.message }; } diff --git a/src/core/client/auth/test/__snapshots__/signIn.spec.tsx.snap b/src/core/client/auth/test/__snapshots__/signIn.spec.tsx.snap index 33a6f001a..2f6fa4225 100644 --- a/src/core/client/auth/test/__snapshots__/signIn.spec.tsx.snap +++ b/src/core/client/auth/test/__snapshots__/signIn.spec.tsx.snap @@ -25,14 +25,27 @@ exports[`accepts correct password 1`] = ` Email Address +
+ + + This field is required. + +
+
+ + + This field is required. + +
+
+ + + This field is required. + +
+
+ + + This field is required. + +