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

Fix user page to display 'GitHub Username' #52

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/creation/new.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
= user_form.text_field :name, label: 'User Name'
= user_form.email_field :email, label: 'Email'
= user_form.phone_field :preferred_contact, label: 'Preferred Contact'
= user_form.text_field :github_uid, label: 'Github Uid'
= user_form.text_field :github_uid, label: 'GitHub Username'
= user_form.collection_select :user_type, User.user_types, :first, ->(x){x.first.humanize}, {label: 'User Type'}, {class: 'select2'}
= user_form.text_field :sid, label: 'SID'
%fieldset.col-sm-4
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
= f.text_field :name, label: 'User Name'
= f.email_field :email, label: 'Email'
= f.phone_field :preferred_contact, label: 'Preferred Contact'
= f.text_field :github_uid, label: 'Github Uid'
= f.text_field :github_uid, label: 'GitHub Username'
= f.collection_select :user_type, User.user_types, :first, ->(x) { x.first.humanize }, {label: 'User Type'}, {class: 'select2'}
= f.text_field :sid, label: 'SID'
= f.file_field :profile_picture, label: 'Profile Picture'
Expand Down
6 changes: 3 additions & 3 deletions app/views/users/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
- else
%li{:class=>'each_page'}
%a{:class=>"page-link", :href=>"?user_each_page=#{num_per_page}"}=num_per_page

%ul{:class => 'pagination pull-right'}
- ["First","Previous","Current","Next","Last"].each do |action|
- if action != "Current" then
%li{:class=>'page_num'}
%a{:class=>"page-link", :href=>"?user_page_action=#{action}&prev=#{@page_num}"}=action
%a{:class=>"page-link", :href=>"?user_page_action=#{action}&prev=#{@page_num}"}=action
- else
%li{:class=>"page-num"}
%a{:class=>'page_link'} Page #{[1,@page_num].max}
Expand All @@ -29,7 +29,7 @@
%tr
%th Name
%th Email
%th GitHub username
%th GitHub Username
%th Type
%th SID
%th
Expand Down
4 changes: 2 additions & 2 deletions app/views/users/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
%strong Email:
= @user.email
%li
%strong Github User ID:
%strong GitHub Username:
= @user.github_uid
%li
%strong Preferred Contact:
Expand All @@ -32,4 +32,4 @@
%h1 Engagements
%span.help-block This user is participating in the following Engagement(s):

= render partial: 'engagements/index', locals: {engagements: @user.participating_engagements}
= render partial: 'engagements/index', locals: {engagements: @user.participating_engagements}
8 changes: 4 additions & 4 deletions features/clear_form.feature
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Scenario: user can reset a form for New User
And I fill in "User Name" with "user"
And I fill in "Email" with "[email protected]"
And I fill in "Preferred Contact" with "1234567890"
And I fill in "Github Uid" with "dave_id"
And I fill in "GitHub Username" with "dave_id"
And I select "Coach" from "User Type"
And I fill in "SID" with "123123123"
And I press "Reset"
Expand All @@ -95,7 +95,7 @@ Scenario: user can reset a form for Create New User, Org, and App
When I fill in "User Name" with "user"
And I fill in "Email" with "[email protected]"
And I fill in "Preferred Contact" with "1234567890"
And I fill in "Github Uid" with "dave_id"
And I fill in "GitHub Username" with "dave_id"
And I select "Coach" from "User Type"
And I fill in "SID" with "123123123"
And I fill in "Organization Name" with "myNewOrg"
Expand Down Expand Up @@ -187,12 +187,12 @@ Scenario: user can reset a form for Edit User
Given I am on the edit user page for user id: "2"
When I fill in "User Name" with "Fox Armando"
And I fill in "Email" with "[email protected]"
And I fill in "Github Uid" with "afox"
And I fill in "GitHub Username" with "afox"
And I select "Coach" from "User Type"
And I press "Reset"
Then I should have filled in "Armando Fox" for "User Name"
And I should have filled in "[email protected]" for "Email"
And I should have filled in "armandofox" for "Github Uid"
And I should have filled in "armandofox" for "GitHub Username"
And the "User Type" field should contain "coach"

# Story ID: 153070009
Expand Down
2 changes: 1 addition & 1 deletion features/create.feature
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Scenario: User can submit successfully if form is complete
| User Name | Fakeuser |
| Email | [email protected] |
| Preferred Contact | 555-555-5555 |
| Github Uid | fakegithubuid |
| GitHub Username | fakegithubuid |
And I fill in the "Org Information" fields as follows:
| field | value |
| Organization Name | Group 20 |
Expand Down
4 changes: 1 addition & 3 deletions features/create_user.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Scenario: There is a form on users page that I can use to create a user
And I should see "User Name"
And I should see "Email"
And I should see "Preferred Contact"
And I should see "Github Uid"
And I should see "GitHub Username"

Scenario: I can create a user
Given I am on the new user page
Expand Down Expand Up @@ -68,5 +68,3 @@ Scenario: When I click back I go back to the users page
Given I am on the new user page
And I follow "Back"
Then I am on the users page


4 changes: 1 addition & 3 deletions features/edit_user.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Scenario: There is a form on the edit user page
And I should see "User Name"
And I should see "Email"
And I should see "Preferred Contact"
And I should see "Github Uid"
And I should see "GitHub Username"

Scenario: I can edit a user
And I fill in the "Edit User" fields as follows:
Expand Down Expand Up @@ -54,5 +54,3 @@ Scenario: I cannot submit with user name field blank
Scenario: When I click back I go back to the users page
And I follow "Back"
Then I am on the users page


6 changes: 3 additions & 3 deletions features/type_users.feature
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Scenario: User can submit a create form that includes user type and SID for Stud
| User Name | Fakeuser |
| Email | [email protected] |
| Preferred Contact | 555-555-5555 |
| Github Uid | fakegithubuid |
| GitHub Username | fakegithubuid |
| User Type | Student |
| SID | 11111111 |
And I fill in the "Org Information" fields as follows:
Expand Down Expand Up @@ -123,7 +123,7 @@ Scenario: User can submit a create form that includes user type and SID for Staf
| User Name | Professor |
| Email | [email protected] |
| Preferred Contact | 555-555-5555 |
| Github Uid | fakegithubuid |
| GitHub Username | fakegithubuid |
| User Type | Staff |
| SID | 222222 |
And I fill in the "Org Information" fields as follows:
Expand All @@ -143,4 +143,4 @@ Scenario: User can submit a create form that includes user type and SID for Staf
| Code Climate Url | Fake app codeclimate url |
And I press "Submit"
Then I should be on the app details page for "Fake app"
Then I should see "User, Org, and App were successfully created"
Then I should see "User, Org, and App were successfully created"
4 changes: 3 additions & 1 deletion features/user_view.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Scenario: User view displays the correct names
Given I am on the Users page
Then I should see "Joe Deatrick"
And I should see "Armando Fox"
And I should see "GitHub Username"
And I should not see "Jackson Murphy"

# Story ID: 153070288
Expand All @@ -48,6 +49,7 @@ Scenario: The User profile page should have the correct information
And I should see "2017-11-02"
And I should see "178"
And I should see "Armando Fox"
And I should see "GitHub Username"
And I should not see "ACElab"
And I should not see "Teamscope"

And I should not see "Github ID"