diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-01 17:43:59 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-12 05:12:42 -0400 |
commit | 4c42fc7c4cc4d322109306c433f1c234bdcfc397 (patch) | |
tree | 94d72b0657df465ea50fb349e8dcacb959518569 /features/steps/project | |
parent | 584f8601eff79fe6e400026ba6db086002ce2cba (diff) | |
download | gitlab-ce-4c42fc7c4cc4d322109306c433f1c234bdcfc397.tar.gz |
Call `page.all` instead of `all` in feature steps
There's a naming conflict between Capybara and rspec-matchers which both
define the `all` method.
See https://github.com/jnicklas/capybara/issues/1396
Diffstat (limited to 'features/steps/project')
-rw-r--r-- | features/steps/project/commits/branches.rb | 2 | ||||
-rw-r--r-- | features/steps/project/commits/commits.rb | 2 | ||||
-rw-r--r-- | features/steps/project/commits/tags.rb | 4 | ||||
-rw-r--r-- | features/steps/project/issues/issues.rb | 2 | ||||
-rw-r--r-- | features/steps/project/issues/labels.rb | 2 | ||||
-rw-r--r-- | features/steps/project/merge_requests.rb | 2 | ||||
-rw-r--r-- | features/steps/project/source/multiselect_blob.rb | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/features/steps/project/commits/branches.rb b/features/steps/project/commits/branches.rb index ff5baf5ddae..338f5e8d3ee 100644 --- a/features/steps/project/commits/branches.rb +++ b/features/steps/project/commits/branches.rb @@ -80,6 +80,6 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps end step "I should not see branch 'improve/awesome'" do - expect(all(visible: true)).not_to have_content 'improve/awesome' + expect(page.all(visible: true)).not_to have_content 'improve/awesome' end end diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index f0acea1d473..4b19e3beed4 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -83,7 +83,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps end step 'The diff links to both the previous and current image' do - links = all('.two-up span div a') + links = page.all('.two-up span div a') expect(links[0]['href']).to match %r{blob/#{sample_image_commit.old_blob_id}} expect(links[1]['href']).to match %r{blob/#{sample_image_commit.new_blob_id}} end diff --git a/features/steps/project/commits/tags.rb b/features/steps/project/commits/tags.rb index beecfd3a3ce..e6f8faf50fd 100644 --- a/features/steps/project/commits/tags.rb +++ b/features/steps/project/commits/tags.rb @@ -61,13 +61,13 @@ class Spinach::Features::ProjectCommitsTags < Spinach::FeatureSteps step "I should not see tag 'v1.1.0'" do page.within '.tags' do - expect(all(visible: true)).not_to have_content 'v1.1.0' + expect(page.all(visible: true)).not_to have_content 'v1.1.0' end end step 'I delete all tags' do page.within '.tags' do - all('.btn-remove').each do |remove| + page.all('.btn-remove').each do |remove| remove.click sleep 0.05 end diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 6a462fec269..6873c043e19 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -190,7 +190,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') - all(:css, '.git-empty .clone').each do |element| + page.all(:css, '.git-empty .clone').each do |element| expect(element.text).to include(project.url_to_repo) end end diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb index 2828f02c449..d656acf4220 100644 --- a/features/steps/project/issues/labels.rb +++ b/features/steps/project/issues/labels.rb @@ -15,7 +15,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps step 'I delete all labels' do page.within '.labels' do - all('.btn-remove').each do |remove| + page.all('.btn-remove').each do |remove| remove.click sleep 0.05 end diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 6e8c5f5ddd1..62c64e60f6d 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -121,7 +121,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps end step 'I should see the proper Inline and Side-by-side links' do - buttons = all('#commit-diff-viewtype') + buttons = page.all('#commit-diff-viewtype') expect(buttons.count).to eq(2) buttons.each do |b| diff --git a/features/steps/project/source/multiselect_blob.rb b/features/steps/project/source/multiselect_blob.rb index 212537fc333..8e14623b892 100644 --- a/features/steps/project/source/multiselect_blob.rb +++ b/features/steps/project/source/multiselect_blob.rb @@ -30,7 +30,7 @@ class Spinach::Features::ProjectSourceMultiselectBlob < Spinach::FeatureSteps ids = Array(range).map { |n| "LC#{n}" } extra = false - highlighted = all("#tree-content-holder .highlight .line.hll") + highlighted = page.all("#tree-content-holder .highlight .line.hll") highlighted.each do |element| extra ||= ids.delete(element[:id]).nil? end |