Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Membership authentication error handling #41

Merged
merged 3 commits into from
Feb 27, 2021

Conversation

saseungmin
Copy link
Owner

@saseungmin saseungmin commented Feb 27, 2021

  • npm install dependencies axios and notistack
  • Error handling when the input value is empty during member authentication

스크린샷 2021-02-27 오후 11 33 54

- npm install dependencies axios and notistack
- Error handling when the input value is empty during member authentication
@saseungmin saseungmin added the Feature New feature label Feb 27, 2021
Comment on lines +91 to +107
const props = {
auth: {
type: 'register',
visible: true,
},
fields: {
register: {
userId: 'test',
password: 'test',
passwordConfirm: 'test',
},
login: {
userId: '',
password: '',
},
},
};
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리팩토링 필요.
중복되는 테스트 케이스 코드가 많다.
fixtures 폴더를 만들어 테스트에 필요한 데이터를 가져다가 써주자.

Comment on lines 76 to +83
const handleSubmit = (e) => {
e.preventDefault();

if (!isCheckValidate(authFieldsState)) {
enqueueSnackbar(EMPTY_AUTH_INPUT, {
variant: 'error',
});
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: api 호출 처리

@codecov
Copy link

codecov bot commented Feb 27, 2021

Codecov Report

Merging #41 (d80e9be) into main (6091079) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #41   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           34        34           
  Lines          286       293    +7     
  Branches        40        41    +1     
=========================================
+ Hits           286       293    +7     
Impacted Files Coverage Δ
src/components/auth/AuthModalForm.jsx 100.00% <100.00%> (ø)
src/utils/constants/constants.js 100.00% <100.00%> (ø)
src/utils/utils.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6091079...d80e9be. Read the comment docs.

@saseungmin
Copy link
Owner Author

테스트 오류 수정

  • 로컬에서는 문제없이 테스트에 통과하였는데 Github action CI를 돌릴때 테스트오류가 다음과 같이 나왔다.
Cannot found module ~~~ @material-ui/core...
  • 나는 이걸 사용한적이 없었지만 @material-ui/core 가 필요했다. 이유는 notistack에서 dependency가 걸려있어서 그랬던 것이였다.
  • 그래서 궁금해서 이슈 란을 찾아봤는데 현재 @material-ui/core 종속성을 제거하는 작업을 진행중에 있단다. 종속성을 제거하려면 새 버전이 필요하단다.
  • Notistack without Material-UI? [POLL] 👍👎 iamhosseindhv/notistack#184

@saseungmin saseungmin merged commit 9d966fe into main Feb 27, 2021
@saseungmin saseungmin deleted the auth-error-handling branch September 29, 2021 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant