diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-29 18:50:45 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-29 18:50:45 -0700 |
commit | 9d6ffcfa5f09608d81031c7e366470b9c8a46db8 (patch) | |
tree | 03f25e79adbfcdd405c82eb9a269ee1578c41a6b /features/steps/project/star.rb | |
parent | 405f91d2b8eb7c8276341ac44fcabc758fc89343 (diff) | |
download | gitlab-ce-9d6ffcfa5f09608d81031c7e366470b9c8a46db8.tar.gz |
Refactor star btn logic for non-logged in user and fix tests
Diffstat (limited to 'features/steps/project/star.rb')
-rw-r--r-- | features/steps/project/star.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/features/steps/project/star.rb b/features/steps/project/star.rb index ae2e4c7a201..50cdfd73c34 100644 --- a/features/steps/project/star.rb +++ b/features/steps/project/star.rb @@ -22,12 +22,16 @@ class Spinach::Features::ProjectStar < Spinach::FeatureSteps # Requires @javascript step "I click on the star toggle button" do - find(".star .toggle", visible: true).click + find(".star-btn", visible: true).click + end + + step 'I redirected to sign in page' do + current_path.should == new_user_session_path end protected def has_n_stars(n) - expect(page).to have_css(".star .count", text: /^#{n}$/, visible: true) + expect(page).to have_css(".star-btn .count", text: n, visible: true) end end |