summaryrefslogtreecommitdiff
path: root/features/steps/project
diff options
context:
space:
mode:
Diffstat (limited to 'features/steps/project')
-rw-r--r--features/steps/project/active_tab.rb2
-rw-r--r--features/steps/project/commits/branches.rb4
-rw-r--r--features/steps/project/commits/commits.rb2
-rw-r--r--features/steps/project/commits/tags.rb8
-rw-r--r--features/steps/project/deploy_keys.rb12
-rw-r--r--features/steps/project/fork.rb2
-rw-r--r--features/steps/project/issues/filter_labels.rb10
-rw-r--r--features/steps/project/issues/issues.rb8
-rw-r--r--features/steps/project/issues/labels.rb20
-rw-r--r--features/steps/project/merge_requests.rb38
-rw-r--r--features/steps/project/network_graph.rb14
-rw-r--r--features/steps/project/project.rb2
-rw-r--r--features/steps/project/redirects.rb2
-rw-r--r--features/steps/project/snippets.rb6
-rw-r--r--features/steps/project/source/browse_files.rb2
-rw-r--r--features/steps/project/source/markdown_render.rb10
-rw-r--r--features/steps/project/team_management.rb16
-rw-r--r--features/steps/project/wiki.rb2
18 files changed, 80 insertions, 80 deletions
diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb
index dd3215adb1a..fabbc1d3d81 100644
--- a/features/steps/project/active_tab.rb
+++ b/features/steps/project/active_tab.rb
@@ -20,7 +20,7 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
end
step 'I click the "Edit" tab' do
- within '.project-settings-nav' do
+ page.within '.project-settings-nav' do
click_link('Project')
end
end
diff --git a/features/steps/project/commits/branches.rb b/features/steps/project/commits/branches.rb
index c4da380a715..ff5baf5ddae 100644
--- a/features/steps/project/commits/branches.rb
+++ b/features/steps/project/commits/branches.rb
@@ -17,7 +17,7 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps
end
step 'I should see "Shop" protected branches list' do
- within ".protected-branches-list" do
+ page.within ".protected-branches-list" do
expect(page).to have_content "stable"
expect(page).not_to have_content "master"
end
@@ -73,7 +73,7 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps
end
step "I click branch 'improve/awesome' delete link" do
- within '.js-branch-improve\/awesome' do
+ page.within '.js-branch-improve\/awesome' do
find('.btn-remove').click
sleep 0.05
end
diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb
index 55adb695416..f0acea1d473 100644
--- a/features/steps/project/commits/commits.rb
+++ b/features/steps/project/commits/commits.rb
@@ -45,7 +45,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end
step 'I should see additional file lines' do
- within @diff.parent do
+ page.within @diff.parent do
expect(first('.new_line').text).not_to have_content "..."
end
end
diff --git a/features/steps/project/commits/tags.rb b/features/steps/project/commits/tags.rb
index e87bf799af2..beecfd3a3ce 100644
--- a/features/steps/project/commits/tags.rb
+++ b/features/steps/project/commits/tags.rb
@@ -53,20 +53,20 @@ class Spinach::Features::ProjectCommitsTags < Spinach::FeatureSteps
end
step "I delete tag 'v1.1.0'" do
- within '.tags' do
+ page.within '.tags' do
first('.btn-remove').click
sleep 0.05
end
end
step "I should not see tag 'v1.1.0'" do
- within '.tags' do
+ page.within '.tags' do
expect(all(visible: true)).not_to have_content 'v1.1.0'
end
end
step 'I delete all tags' do
- within '.tags' do
+ page.within '.tags' do
all('.btn-remove').each do |remove|
remove.click
sleep 0.05
@@ -75,7 +75,7 @@ class Spinach::Features::ProjectCommitsTags < Spinach::FeatureSteps
end
step 'I should see tags info message' do
- within '.tags' do
+ page.within '.tags' do
expect(page).to have_content 'Repository has no tags yet.'
end
end
diff --git a/features/steps/project/deploy_keys.rb b/features/steps/project/deploy_keys.rb
index 423e20a507e..a4d6c9a1b8e 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
- within '.enabled-keys' do
+ page.within '.enabled-keys' do
expect(page).to have_content deploy_key.title
end
end
step 'I should see other project deploy key' do
- within '.available-keys' do
+ page.within '.available-keys' do
expect(page).to have_content other_deploy_key.title
end
end
step 'I should see public deploy key' do
- within '.available-keys' do
+ page.within '.available-keys' do
expect(page).to have_content public_deploy_key.title
end
end
@@ -40,7 +40,7 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
end
step 'I should see newly created deploy key' do
- within '.enabled-keys' do
+ page.within '.enabled-keys' do
expect(page).to have_content(deploy_key.title)
end
end
@@ -56,7 +56,7 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
end
step 'I should only see the same deploy key once' do
- within '.available-keys' do
+ page.within '.available-keys' do
expect(page).to have_selector('ul li', count: 1)
end
end
@@ -66,7 +66,7 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
end
step 'I click attach deploy key' do
- within '.available-keys' do
+ page.within '.available-keys' do
click_link 'Enable'
end
end
diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb
index 879b0e8129c..0e433781d7a 100644
--- a/features/steps/project/fork.rb
+++ b/features/steps/project/fork.rb
@@ -27,7 +27,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
end
step 'I fork to my namespace' do
- within '.fork-namespaces' do
+ page.within '.fork-namespaces' do
click_link current_user.name
end
end
diff --git a/features/steps/project/issues/filter_labels.rb b/features/steps/project/issues/filter_labels.rb
index 66a3c1ead69..50bb32429b9 100644
--- a/features/steps/project/issues/filter_labels.rb
+++ b/features/steps/project/issues/filter_labels.rb
@@ -5,25 +5,25 @@ class Spinach::Features::ProjectIssuesFilterLabels < Spinach::FeatureSteps
include Select2Helper
step 'I should see "Bugfix1" in issues list' do
- within ".issues-list" do
+ page.within ".issues-list" do
expect(page).to have_content "Bugfix1"
end
end
step 'I should see "Bugfix2" in issues list' do
- within ".issues-list" do
+ page.within ".issues-list" do
expect(page).to have_content "Bugfix2"
end
end
step 'I should not see "Bugfix2" in issues list' do
- within ".issues-list" do
+ page.within ".issues-list" do
expect(page).not_to have_content "Bugfix2"
end
end
step 'I should not see "Feature1" in issues list' do
- within ".issues-list" do
+ page.within ".issues-list" do
expect(page).not_to have_content "Feature1"
end
end
@@ -33,7 +33,7 @@ class Spinach::Features::ProjectIssuesFilterLabels < Spinach::FeatureSteps
end
step 'I click link "feature"' do
- within ".labels-filter" do
+ page.within ".labels-filter" do
click_link "feature"
end
end
diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb
index 87a3d280cd0..6a462fec269 100644
--- a/features/steps/project/issues/issues.rb
+++ b/features/steps/project/issues/issues.rb
@@ -87,7 +87,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
step 'I should see label \'bug\' with issue' do
- within '.issue-show-labels' do
+ page.within '.issue-show-labels' do
expect(page).to have_content 'bug'
end
end
@@ -201,7 +201,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
step 'I leave a comment with code block' do
- within(".js-main-target-form") do
+ page.within(".js-main-target-form") do
fill_in "note[note]", with: "```\nCommand [1]: /usr/local/bin/git , see [text](doc/text)\n```"
click_button "Add Comment"
sleep 0.05
@@ -209,7 +209,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
step 'I should see an error alert section within the comment form' do
- within(".js-main-target-form") do
+ page.within(".js-main-target-form") do
find(".error-alert")
end
end
@@ -257,7 +257,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
step 'I click label \'bug\'' do
- within ".issues-list" do
+ page.within ".issues-list" do
click_link 'bug'
end
end
diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb
index 4de8a39672e..2828f02c449 100644
--- a/features/steps/project/issues/labels.rb
+++ b/features/steps/project/issues/labels.rb
@@ -8,13 +8,13 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
end
step 'I remove label \'bug\'' do
- within "#label_#{bug_label.id}" do
+ page.within "#label_#{bug_label.id}" do
click_link 'Remove'
end
end
step 'I delete all labels' do
- within '.labels' do
+ page.within '.labels' do
all('.btn-remove').each do |remove|
remove.click
sleep 0.05
@@ -23,7 +23,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
end
step 'I should see labels help message' do
- within '.labels' do
+ page.within '.labels' do
expect(page).to have_content 'Create first label or generate default set of '\
'labels'
end
@@ -48,37 +48,37 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
end
step 'I should see label label exist error message' do
- within '.label-form' do
+ page.within '.label-form' do
expect(page).to have_content 'Title has already been taken'
end
end
step 'I should see label color error message' do
- within '.label-form' do
+ page.within '.label-form' do
expect(page).to have_content 'Color is invalid'
end
end
step 'I should see label \'feature\'' do
- within '.manage-labels-list' do
+ page.within '.manage-labels-list' do
expect(page).to have_content 'feature'
end
end
step 'I should see label \'bug\'' do
- within '.manage-labels-list' do
+ page.within '.manage-labels-list' do
expect(page).to have_content 'bug'
end
end
step 'I should not see label \'bug\'' do
- within '.manage-labels-list' do
+ page.within '.manage-labels-list' do
expect(page).not_to have_content 'bug'
end
end
step 'I should see label \'support\'' do
- within '.manage-labels-list' do
+ page.within '.manage-labels-list' do
expect(page).to have_content 'support'
end
end
@@ -90,7 +90,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
end
step 'I should see label \'fix\'' do
- within '.manage-labels-list' do
+ page.within '.manage-labels-list' do
expect(page).to have_content 'fix'
end
end
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index fe019a0b3af..6e8c5f5ddd1 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -24,7 +24,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I should see merge request "Wiki Feature"' do
- within '.merge-request' do
+ page.within '.merge-request' do
expect(page).to have_content "Wiki Feature"
end
end
@@ -113,7 +113,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I click on the Changes tab via Javascript' do
- within '.merge-request-tabs' do
+ page.within '.merge-request-tabs' do
click_link 'Changes'
end
@@ -134,11 +134,11 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I click on the commit in the merge request' do
- within '.merge-request-tabs' do
+ page.within '.merge-request-tabs' do
click_link 'Commits'
end
- within '.commits' do
+ page.within '.commits' do
click_link Commit.truncate_sha(sample_commit.id)
end
end
@@ -199,13 +199,13 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
merge!: true,
)
- within '.mr-state-widget' do
+ page.within '.mr-state-widget' do
click_button "Accept Merge Request"
end
end
step 'I should see merged request' do
- within '.issue-box' do
+ page.within '.issue-box' do
expect(page).to have_content "Accepted"
end
end
@@ -215,43 +215,43 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I should see reopened merge request "Bug NS-04"' do
- within '.issue-box' do
+ page.within '.issue-box' do
expect(page).to have_content "Open"
end
end
step 'I click link "Hide inline discussion" of the second file' do
- within '.files [id^=diff]:nth-child(2)' do
+ page.within '.files [id^=diff]:nth-child(2)' do
find('.js-toggle-diff-comments').click
end
end
step 'I click link "Show inline discussion" of the second file' do
- within '.files [id^=diff]:nth-child(2)' do
+ page.within '.files [id^=diff]:nth-child(2)' do
find('.js-toggle-diff-comments').click
end
end
step 'I should not see a comment like "Line is wrong" in the second file' do
- within '.files [id^=diff]:nth-child(2)' do
+ page.within '.files [id^=diff]:nth-child(2)' do
expect(page).not_to have_visible_content "Line is wrong"
end
end
step 'I should see a comment like "Line is wrong" in the second file' do
- within '.files [id^=diff]:nth-child(2) .note-body > .note-text' do
+ page.within '.files [id^=diff]:nth-child(2) .note-body > .note-text' do
expect(page).to have_visible_content "Line is wrong"
end
end
step 'I should not see a comment like "Line is wrong here" in the second file' do
- within '.files [id^=diff]:nth-child(2)' do
+ page.within '.files [id^=diff]:nth-child(2)' do
expect(page).not_to have_visible_content "Line is wrong here"
end
end
step 'I should see a comment like "Line is wrong here" in the second file' do
- within '.files [id^=diff]:nth-child(2) .note-body > .note-text' do
+ page.within '.files [id^=diff]:nth-child(2) .note-body > .note-text' do
expect(page).to have_visible_content "Line is wrong here"
end
end
@@ -259,12 +259,12 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I leave a comment like "Line is correct" on line 12 of the first file' do
init_diff_note_first_file
- within(".js-discussion-note-form") do
+ page.within(".js-discussion-note-form") do
fill_in "note_note", with: "Line is correct"
click_button "Add Comment"
end
- within ".files [id^=diff]:nth-child(1) .note-body > .note-text" do
+ page.within ".files [id^=diff]:nth-child(1) .note-body > .note-text" do
expect(page).to have_content "Line is correct"
end
end
@@ -272,14 +272,14 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I leave a comment like "Line is wrong" on line 39 of the second file' do
init_diff_note_second_file
- within(".js-discussion-note-form") do
+ page.within(".js-discussion-note-form") do
fill_in "note_note", with: "Line is wrong on here"
click_button "Add Comment"
end
end
step 'I should still see a comment like "Line is correct" in the first file' do
- within '.files [id^=diff]:nth-child(1) .note-body > .note-text' do
+ page.within '.files [id^=diff]:nth-child(1) .note-body > .note-text' do
expect(page).to have_visible_content "Line is correct"
end
end
@@ -297,7 +297,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I should see comments on the side-by-side diff page' do
- within '.files [id^=diff]:nth-child(1) .parallel .note-body > .note-text' do
+ page.within '.files [id^=diff]:nth-child(1) .parallel .note-body > .note-text' do
expect(page).to have_visible_content "Line is correct"
end
end
@@ -329,7 +329,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
def leave_comment(message)
- within(".js-discussion-note-form") do
+ page.within(".js-discussion-note-form") do
fill_in "note_note", with: message
click_button "Add Comment"
end
diff --git a/features/steps/project/network_graph.rb b/features/steps/project/network_graph.rb
index 14b06917f0a..992cf2734fd 100644
--- a/features/steps/project/network_graph.rb
+++ b/features/steps/project/network_graph.rb
@@ -24,7 +24,7 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps
end
step 'page should have "master" on graph' do
- within '.network-graph' do
+ page.within '.network-graph' do
expect(page).to have_content 'master'
end
end
@@ -45,13 +45,13 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps
end
step 'page should have content not containing "v1.0.0"' do
- within '.network-graph' do
+ page.within '.network-graph' do
expect(page).to have_content 'Change some files'
end
end
step 'page should not have content not containing "v1.0.0"' do
- within '.network-graph' do
+ page.within '.network-graph' do
expect(page).not_to have_content 'Change some files'
end
end
@@ -65,13 +65,13 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps
end
step 'page should have "feature" on graph' do
- within '.network-graph' do
+ page.within '.network-graph' do
expect(page).to have_content 'feature'
end
end
When 'I looking for a commit by SHA of "v1.0.0"' do
- within ".network-form" do
+ page.within ".network-form" do
fill_in 'extended_sha1', with: '6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9'
find('button').click
end
@@ -79,13 +79,13 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps
end
step 'page should have "v1.0.0" on graph' do
- within '.network-graph' do
+ page.within '.network-graph' do
expect(page).to have_content 'v1.0.0'
end
end
When 'I look for a commit by ";"' do
- within ".network-form" do
+ page.within ".network-form" do
fill_in 'extended_sha1', with: ';'
find('button').click
end
diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb
index 126c9c0524c..ee4c7cd0f06 100644
--- a/features/steps/project/project.rb
+++ b/features/steps/project/project.rb
@@ -67,7 +67,7 @@ class Spinach::Features::Project < Spinach::FeatureSteps
end
step 'I should see project "Shop" version' do
- within '.project-side' do
+ page.within '.project-side' do
expect(page).to have_content '6.7.0.pre'
end
end
diff --git a/features/steps/project/redirects.rb b/features/steps/project/redirects.rb
index 373f5bb8ada..0e724138a8a 100644
--- a/features/steps/project/redirects.rb
+++ b/features/steps/project/redirects.rb
@@ -18,7 +18,7 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
step 'I should see project "Community" home page' do
Gitlab.config.gitlab.should_receive(:host).and_return("www.example.com")
- within '.navbar-gitlab .title' do
+ page.within '.navbar-gitlab .title' do
expect(page).to have_content 'Community'
end
end
diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb
index ff3e14b53ba..eedb4e1b74a 100644
--- a/features/steps/project/snippets.rb
+++ b/features/steps/project/snippets.rb
@@ -42,7 +42,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
end
step 'I click link "Edit"' do
- within ".file-title" do
+ page.within ".file-title" do
click_link "Edit"
end
end
@@ -54,7 +54,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
step 'I submit new snippet "Snippet three"' do
fill_in "project_snippet_title", :with => "Snippet three"
fill_in "project_snippet_file_name", :with => "my_snippet.rb"
- within('.file-editor') do
+ page.within('.file-editor') do
find(:xpath, "//input[@id='project_snippet_content']").set 'Content of snippet three'
end
click_button "Create snippet"
@@ -75,7 +75,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
end
step 'I leave a comment like "Good snippet!"' do
- within('.js-main-target-form') do
+ page.within('.js-main-target-form') do
fill_in "note_note", with: "Good snippet!"
click_button "Add Comment"
end
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index 58a6ef4f394..398c9bf5756 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -124,7 +124,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
step 'I click on readme file' do
- within '.tree-table' do
+ page.within '.tree-table' do
click_link 'README.md'
end
end
diff --git a/features/steps/project/source/markdown_render.rb b/features/steps/project/source/markdown_render.rb
index b6534f757c7..c78e86fa1a7 100644
--- a/features/steps/project/source/markdown_render.rb
+++ b/features/steps/project/source/markdown_render.rb
@@ -67,27 +67,27 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I click on link "empty" in the README' do
- within('.readme-holder') do
+ page.within('.readme-holder') do
click_link "empty"
end
end
step 'I click on link "id" in the README' do
- within('.readme-holder') do
+ page.within('.readme-holder') do
click_link "#id"
end
end
step 'I navigate to the doc/api/README' do
- within '.tree-table' do
+ page.within '.tree-table' do
click_link "doc"
end
- within '.tree-table' do
+ page.within '.tree-table' do
click_link "api"
end
- within '.tree-table' do
+ page.within '.tree-table' do
click_link "README.md"
end
end
diff --git a/features/steps/project/team_management.rb b/features/steps/project/team_management.rb
index 4f4329359f9..97d63016458 100644
--- a/features/steps/project/team_management.rb
+++ b/features/steps/project/team_management.rb
@@ -22,7 +22,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
step 'I select "Mike" as "Reporter"' do
user = User.find_by(name: "Mike")
- within ".users-project-form" do
+ page.within ".users-project-form" do
select2(user.id, from: "#user_ids", multiple: true)
select "Reporter", from: "access_level"
end
@@ -30,13 +30,13 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
end
step 'I should see "Mike" in team list as "Reporter"' do
- within ".access-reporter" do
+ page.within ".access-reporter" do
expect(page).to have_content('Mike')
end
end
step 'I select "sjobs@apple.com" as "Reporter"' do
- within ".users-project-form" do
+ page.within ".users-project-form" do
select2("sjobs@apple.com", from: "#user_ids", multiple: true)
select "Reporter", from: "access_level"
end
@@ -44,7 +44,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
end
step 'I should see "sjobs@apple.com" in team list as invited "Reporter"' do
- within ".access-reporter" do
+ page.within ".access-reporter" do
expect(page).to have_content('sjobs@apple.com')
expect(page).to have_content('invited')
expect(page).to have_content('Reporter')
@@ -52,7 +52,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
end
step 'I should see "Dmitriy" in team list as "Developer"' do
- within ".access-developer" do
+ page.within ".access-developer" do
expect(page).to have_content('Dmitriy')
end
end
@@ -61,7 +61,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
project = Project.find_by(name: "Shop")
user = User.find_by(name: 'Dmitriy')
project_member = project.project_members.find_by(user_id: user.id)
- within "#project_member_#{project_member.id}" do
+ page.within "#project_member_#{project_member.id}" do
click_button "Edit access level"
select "Reporter", from: "project_member_access_level"
click_button "Save"
@@ -69,7 +69,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
end
step 'I should see "Dmitriy" in team list as "Reporter"' do
- within ".access-reporter" do
+ page.within ".access-reporter" do
expect(page).to have_content('Dmitriy')
end
end
@@ -123,7 +123,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
project = Project.find_by(name: "Shop")
user = User.find_by(name: 'Dmitriy')
project_member = project.project_members.find_by(user_id: user.id)
- within "#project_member_#{project_member.id}" do
+ page.within "#project_member_#{project_member.id}" do
click_link('Remove user from team')
end
end
diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb
index c6062e2f132..eebfaee1ede 100644
--- a/features/steps/project/wiki.rb
+++ b/features/steps/project/wiki.rb
@@ -6,7 +6,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
include WikiHelper
step 'I click on the Cancel button' do
- within(:css, ".form-actions") do
+ page.within(:css, ".form-actions") do
click_on "Cancel"
end
end