diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-06-09 14:08:49 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-06-09 14:08:49 +0530 |
commit | 1f5ecf916ee7b1d34fbf8775890b2aada2055384 (patch) | |
tree | 72358f3dd981de0ead3effcbb84b65a7d5c3fdb4 /spec/features | |
parent | 0dff6fd7148957fa94d2626e3912cd929ba150d3 (diff) | |
download | gitlab-ce-1f5ecf916ee7b1d34fbf8775890b2aada2055384.tar.gz |
Implement @jschatz1's comments.
- No hardcoded colors in any SCSS file except `variables.scss`
- Don't allow choosing a date in the past
- Use the same table as in the "Applications" tab
- The button should say "Create Personal Access Token"
- Float the revoke button to the right of the table cell
- Change the revocation message to be more explicit.
- Date shouldn't look selected on page load
- Don't use a panel for the created token
- Use a normal flash for "Your new personal access token has been created"
- Show the input (with the token) below it full width.
- Put the "Make sure you save it - you won't be able to access it again." message near the input
- Have the created token's input highlight all on single click
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/profiles/personal_access_tokens_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/features/profiles/personal_access_tokens_spec.rb b/spec/features/profiles/personal_access_tokens_spec.rb index 5bba08d005c..105c5dae34e 100644 --- a/spec/features/profiles/personal_access_tokens_spec.rb +++ b/spec/features/profiles/personal_access_tokens_spec.rb @@ -12,7 +12,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do end def created_personal_access_token - find(".created-personal-access-token pre") + find(".created-personal-access-token input").value end def disallow_personal_access_token_saves! @@ -30,8 +30,8 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do visit profile_personal_access_tokens_path fill_in "Name", with: FFaker::Product.brand - expect {click_on "Add Personal Access Token"}.to change { PersonalAccessToken.count }.by(1) - expect(created_personal_access_token).to have_text(PersonalAccessToken.last.token) + expect {click_on "Create Personal Access Token"}.to change { PersonalAccessToken.count }.by(1) + expect(created_personal_access_token).to eq(PersonalAccessToken.last.token) expect(active_personal_access_tokens).to have_text(PersonalAccessToken.last.name) expect(active_personal_access_tokens).to have_text("Never") end @@ -44,8 +44,8 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do find("a[title='Next']").click click_on "1" - expect {click_on "Add Personal Access Token"}.to change { PersonalAccessToken.count }.by(1) - expect(created_personal_access_token).to have_text(PersonalAccessToken.last.token) + expect {click_on "Create Personal Access Token"}.to change { PersonalAccessToken.count }.by(1) + expect(created_personal_access_token).to eq(PersonalAccessToken.last.token) expect(active_personal_access_tokens).to have_text(PersonalAccessToken.last.name) expect(active_personal_access_tokens).to have_text(Date.today.next_month.at_beginning_of_month.to_s(:medium)) end @@ -56,7 +56,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do visit profile_personal_access_tokens_path fill_in "Name", with: FFaker::Product.brand - expect { click_on "Add Personal Access Token" }.not_to change { PersonalAccessToken.count } + expect { click_on "Create Personal Access Token" }.not_to change { PersonalAccessToken.count } expect(page).to have_content("Name cannot be nil") end end |