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

#161966567 Signup New Users #14

Merged
merged 1 commit into from
Jan 22, 2019
Merged

#161966567 Signup New Users #14

merged 1 commit into from
Jan 22, 2019

Conversation

actlikewill
Copy link
Contributor

@actlikewill actlikewill commented Jan 17, 2019

What does this pull request do?

  • This pull request creates the Signup Page. It allows a user to create an account for Authors Haven.
    using their email and username.

Description of the tasks to be completed?

  • Creates a sign up page with validation.

How should this be manually tested?

  • clone the repo https://github.com/andela/ah-technocrats-frontend.git

  • change to the cloned directory cd ah-technocrats-frontend

  • git checkout ft-registration-161966567 to checkout to this branch

  • run npm install to install the application.

  • run npm start

  • To log in, Enter your username and email and a password.

  • The form will validate the entries according to the data provided. The following are the validations present:

    • Usernames should be at least five characters
    • Passwords should have at least eight characters, one special character and one capital letter.
    • None of the fields may be blank.

Screenshots

The form displaying all the errors
screen shot 2019-01-18 at 09 35 52

  • The Form after a successful login.

screen shot 2019-01-18 at 09 59 53

What are the relevant Pivotal Tracker Stories

#161966567

Checklist:

  • My code follows the style guidelines of this project
  • At least 2 people have reviewed my PR
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • My PR has one commit.

@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 17, 2019 21:14 Inactive
@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 18, 2019 09:05 Inactive
@actlikewill actlikewill removed the WIP label Jan 18, 2019
@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 18, 2019 09:08 Inactive
@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 18, 2019 09:10 Inactive
@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 18, 2019 09:18 Inactive
@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 20, 2019 12:41 Inactive
@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 20, 2019 16:26 Inactive
@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 21, 2019 11:03 Inactive
.codeclimate.yml Outdated Show resolved Hide resolved
export default function registrationReducer(state = initialState, action) {
switch (action.type) {
case types.USER_REGISTRATION_SUBMIT:
return Object.assign({}, state, { action: action.registrationData, loading: true });
Copy link
Contributor

Choose a reason for hiding this comment

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

Use the spread operator instead of Object.assign

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to use the spread operator

const wrapper = mount(<BrowserRouter><RegistrationPage {...props} /></BrowserRouter>);
const submitButton = wrapper.find('#submit').last();
expect(wrapper.find('#submit').exists()).toBe(true);
submitButton.simulate('click');
Copy link
Contributor

Choose a reason for hiding this comment

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

What is being tested here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I edited the test


describe('Registration Page class Methods', () => {
it('formatUserData Function', () => {
const setupProps = Object.assign({}, props, { actions: {}});
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of using Object.assign add actions to the props object and pass the props to the component instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

Copy link
Contributor

@dotNesh dotNesh left a comment

Choose a reason for hiding this comment

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

Good job. Please address the requested changes.

Copy link
Contributor

@dotNesh dotNesh left a comment

Choose a reason for hiding this comment

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

Fix the requested changes

@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 21, 2019 13:28 Inactive
@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 21, 2019 13:48 Inactive
@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 21, 2019 13:56 Inactive
@actlikewill
Copy link
Contributor Author

Fix the requested changes

I have made the requested changes.

@salma-nyagaka
Copy link
Contributor

@actlikewill You have not added me and Timothy as your reviewers

@actlikewill
Copy link
Contributor Author

@actlikewill You have not added me and Timothy as your reviewers

Sorry about that ... I have done so now, kindly review

src/App.js Outdated Show resolved Hide resolved
@verenceLola verenceLola temporarily deployed to ah-techno-staging-pr-14 January 22, 2019 08:16 Inactive
 - allows user to create a new account
[#161966567]
Copy link
Contributor

@verenceLola verenceLola left a comment

Choose a reason for hiding this comment

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

Nice work @actlikewill

Copy link
Contributor

@salma-nyagaka salma-nyagaka left a comment

Choose a reason for hiding this comment

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

Looks okey and everything is working well

Copy link
Contributor

@SnyderMbishai SnyderMbishai left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@dotNesh dotNesh merged commit f2b8c18 into develop Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants