diff options
author | Phil Hughes <me@iamphill.com> | 2017-04-28 22:59:20 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-04-28 22:59:20 +0300 |
commit | 357ab10da34102499a32ad569d9b58c8d5b97d17 (patch) | |
tree | 00fd99161d55174097298604dc1222dd836f251e /features/steps/project/deploy_keys.rb | |
parent | 0b7824d433ec5029da17114389f425f816b7be74 (diff) |
Fixed some spinach & rspec tests
Diffstat (limited to 'features/steps/project/deploy_keys.rb')
-rw-r--r-- | features/steps/project/deploy_keys.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/features/steps/project/deploy_keys.rb b/features/steps/project/deploy_keys.rb index ec59a2c094e..8ad9d4a4741 100644 --- a/features/steps/project/deploy_keys.rb +++ b/features/steps/project/deploy_keys.rb @@ -8,19 +8,19 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps end step 'I should see project deploy key' do - page.within '.deploy-keys' do + page.within(find('.deploy-keys')) do expect(page).to have_content deploy_key.title end end step 'I should see other project deploy key' do - page.within '.deploy-keys' do + page.within(find('.deploy-keys')) do expect(page).to have_content other_deploy_key.title end end step 'I should see public deploy key' do - page.within '.deploy-keys' do + page.within(find('.deploy-keys')) do expect(page).to have_content public_deploy_key.title end end @@ -40,7 +40,8 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps end step 'I should see newly created deploy key' do - page.within '.deploy-keys' do + @project.reload + page.within(find('.deploy-keys')) do expect(page).to have_content(deploy_key.title) end end @@ -56,7 +57,7 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps end step 'I should only see the same deploy key once' do - page.within '.deploy-keys' do + page.within(find('.deploy-keys')) do expect(page).to have_selector('ul li', count: 1) end end @@ -66,8 +67,9 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps end step 'I click attach deploy key' do - page.within '.deploy-keys' do - click_link 'Enable' + page.within(find('.deploy-keys')) do + click_button 'Enable' + expect(page).not_to have_selector('.fa-spinner') end end |