diff options
Diffstat (limited to 'features/steps/project')
-rw-r--r-- | features/steps/project/browse_branches.rb | 2 | ||||
-rw-r--r-- | features/steps/project/browse_commits.rb | 10 | ||||
-rw-r--r-- | features/steps/project/browse_files.rb | 8 | ||||
-rw-r--r-- | features/steps/project/browse_tags.rb | 2 | ||||
-rw-r--r-- | features/steps/project/hooks.rb | 4 | ||||
-rw-r--r-- | features/steps/project/issues.rb | 6 | ||||
-rw-r--r-- | features/steps/project/network_graph.rb | 4 | ||||
-rw-r--r-- | features/steps/project/redirects.rb | 8 | ||||
-rw-r--r-- | features/steps/project/star.rb | 2 |
9 files changed, 23 insertions, 23 deletions
diff --git a/features/steps/project/browse_branches.rb b/features/steps/project/browse_branches.rb index e2b5ca59617..3b1e51f179a 100644 --- a/features/steps/project/browse_branches.rb +++ b/features/steps/project/browse_branches.rb @@ -80,6 +80,6 @@ class Spinach::Features::ProjectBrowseBranches < Spinach::FeatureSteps end step "I should not see branch 'improve/awesome'" do - page.all(visible: true).should_not have_content 'improve/awesome' + all(visible: true).should_not have_content 'improve/awesome' end end diff --git a/features/steps/project/browse_commits.rb b/features/steps/project/browse_commits.rb index 9f1f7c96972..2048818e88c 100644 --- a/features/steps/project/browse_commits.rb +++ b/features/steps/project/browse_commits.rb @@ -17,10 +17,10 @@ class Spinach::Features::ProjectBrowseCommits < Spinach::FeatureSteps step 'I see commits atom feed' do commit = @project.repository.commit - page.response_headers['Content-Type'].should have_content("application/atom+xml") - page.body.should have_selector("title", text: "Recent commits to #{@project.name}") - page.body.should have_selector("author email", text: commit.author_email) - page.body.should have_selector("entry summary", text: commit.description[0..10]) + response_headers['Content-Type'].should have_content("application/atom+xml") + body.should have_selector("title", text: "Recent commits to #{@project.name}") + body.should have_selector("author email", text: commit.author_email) + body.should have_selector("entry summary", text: commit.description[0..10]) end step 'I click on commit link' do @@ -72,7 +72,7 @@ class Spinach::Features::ProjectBrowseCommits < Spinach::FeatureSteps end step 'The diff links to both the previous and current image' do - links = page.all('.two-up span div a') + links = all('.two-up span div a') links[0]['href'].should =~ %r{blob/#{sample_image_commit.old_blob_id}} links[1]['href'].should =~ %r{blob/#{sample_image_commit.new_blob_id}} end diff --git a/features/steps/project/browse_files.rb b/features/steps/project/browse_files.rb index ca96ed0b6fa..536902934ba 100644 --- a/features/steps/project/browse_files.rb +++ b/features/steps/project/browse_files.rb @@ -29,7 +29,7 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps end step 'I should see raw file content' do - page.source.should == sample_blob.data + source.should == sample_blob.data end step 'I click button "edit"' do @@ -37,12 +37,12 @@ class Spinach::Features::ProjectBrowseFiles < Spinach::FeatureSteps end step 'I can edit code' do - page.execute_script('editor.setValue("GitlabFileEditor")') - page.evaluate_script('editor.getValue()').should == "GitlabFileEditor" + execute_script('editor.setValue("GitlabFileEditor")') + evaluate_script('editor.getValue()').should == "GitlabFileEditor" end step 'I edit code' do - page.execute_script('editor.setValue("GitlabFileEditor")') + execute_script('editor.setValue("GitlabFileEditor")') end step 'I click link "Diff"' do diff --git a/features/steps/project/browse_tags.rb b/features/steps/project/browse_tags.rb index 85cdc71ef75..722c0a91076 100644 --- a/features/steps/project/browse_tags.rb +++ b/features/steps/project/browse_tags.rb @@ -61,7 +61,7 @@ class Spinach::Features::ProjectBrowseTags < Spinach::FeatureSteps step "I should not see tag 'v1.1.0'" do within '.tags' do - page.all(visible: true).should_not have_content 'v1.1.0' + all(visible: true).should_not have_content 'v1.1.0' end end diff --git a/features/steps/project/hooks.rb b/features/steps/project/hooks.rb index 79a51020568..f4b8d372be8 100644 --- a/features/steps/project/hooks.rb +++ b/features/steps/project/hooks.rb @@ -29,7 +29,7 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps end step 'I should see newly created hook' do - page.current_path.should == project_hooks_path(current_project) + current_path.should == project_hooks_path(current_project) page.should have_content(@url) end @@ -44,7 +44,7 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps end step 'hook should be triggered' do - page.current_path.should == project_hooks_path(current_project) + current_path.should == project_hooks_path(current_project) page.should have_selector '.flash-notice', text: 'Hook successfully executed.' end diff --git a/features/steps/project/issues.rb b/features/steps/project/issues.rb index 1aaf8b1cb7e..137eac33238 100644 --- a/features/steps/project/issues.rb +++ b/features/steps/project/issues.rb @@ -113,7 +113,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps step 'I should see selected milestone with title "v3.0"' do issues_milestone_selector = "#issue_milestone_id_chzn > a" - page.find(issues_milestone_selector).should have_content("v3.0") + find(issues_milestone_selector).should have_content("v3.0") end When 'I select first assignee from "Shop" project' do @@ -126,7 +126,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps issues_assignee_selector = "#issue_assignee_id_chzn > a" assignee_name = project.users.first.name - page.find(issues_assignee_selector).should have_content(assignee_name) + find(issues_assignee_selector).should have_content(assignee_name) end step 'project "Shop" have "Release 0.4" open issue' do @@ -164,7 +164,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps step 'I see empty project details with ssh clone info' do project = Project.find_by(name: 'Empty Project') - page.all(:css, '.git-empty .clone').each do |element| + all(:css, '.git-empty .clone').each do |element| element.text.should include(project.url_to_repo) end end diff --git a/features/steps/project/network_graph.rb b/features/steps/project/network_graph.rb index 5f7327fc2db..14fdc72b8b6 100644 --- a/features/steps/project/network_graph.rb +++ b/features/steps/project/network_graph.rb @@ -30,12 +30,12 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps end When 'I switch ref to "feature"' do - page.select 'feature', from: 'ref' + select 'feature', from: 'ref' sleep 2 end When 'I switch ref to "v1.0.0"' do - page.select 'v1.0.0', from: 'ref' + select 'v1.0.0', from: 'ref' sleep 2 end diff --git a/features/steps/project/redirects.rb b/features/steps/project/redirects.rb index 39d39c8aeca..e54637120ce 100644 --- a/features/steps/project/redirects.rb +++ b/features/steps/project/redirects.rb @@ -48,8 +48,8 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps step 'I should be redirected to "Community" page' do project = Project.find_by(name: 'Community') - page.current_path.should == "/#{project.path_with_namespace}" - page.status_code.should == 200 + current_path.should == "/#{project.path_with_namespace}" + status_code.should == 200 end step 'I get redirected to signin page where I sign in' do @@ -63,7 +63,7 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps step 'I should be redirected to "Enterprise" page' do project = Project.find_by(name: 'Enterprise') - page.current_path.should == "/#{project.path_with_namespace}" - page.status_code.should == 200 + current_path.should == "/#{project.path_with_namespace}" + status_code.should == 200 end end diff --git a/features/steps/project/star.rb b/features/steps/project/star.rb index 562df04e340..ae2e4c7a201 100644 --- a/features/steps/project/star.rb +++ b/features/steps/project/star.rb @@ -22,7 +22,7 @@ class Spinach::Features::ProjectStar < Spinach::FeatureSteps # Requires @javascript step "I click on the star toggle button" do - page.find(".star .toggle", visible: true).click + find(".star .toggle", visible: true).click end protected |