diff options
Diffstat (limited to 'features/steps/project')
-rw-r--r-- | features/steps/project/builds/summary.rb | 43 | ||||
-rw-r--r-- | features/steps/project/fork.rb | 4 | ||||
-rw-r--r-- | features/steps/project/issues/award_emoji.rb | 107 | ||||
-rw-r--r-- | features/steps/project/issues/issues.rb | 2 | ||||
-rw-r--r-- | features/steps/project/issues/milestones.rb | 2 | ||||
-rw-r--r-- | features/steps/project/merge_requests.rb | 2 | ||||
-rw-r--r-- | features/steps/project/merge_requests/acceptance.rb | 55 | ||||
-rw-r--r-- | features/steps/project/merge_requests/revert.rb | 56 | ||||
-rw-r--r-- | features/steps/project/project.rb | 1 | ||||
-rw-r--r-- | features/steps/project/project_group_links.rb | 51 | ||||
-rw-r--r-- | features/steps/project/project_milestone.rb | 62 | ||||
-rw-r--r-- | features/steps/project/redirects.rb | 2 | ||||
-rw-r--r-- | features/steps/project/snippets.rb | 2 | ||||
-rw-r--r-- | features/steps/project/source/markdown_render.rb | 2 | ||||
-rw-r--r-- | features/steps/project/team_management.rb | 87 | ||||
-rw-r--r-- | features/steps/project/wiki.rb | 195 |
16 files changed, 8 insertions, 665 deletions
diff --git a/features/steps/project/builds/summary.rb b/features/steps/project/builds/summary.rb deleted file mode 100644 index 40d373a680b..00000000000 --- a/features/steps/project/builds/summary.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedBuilds - include RepoHelpers - - step 'I see coverage' do - page.within('td.coverage') do - expect(page).to have_content "99.9%" - end - end - - step 'I see button to CI Lint' do - page.within('.nav-controls') do - ci_lint_tool_link = page.find_link('CI lint') - expect(ci_lint_tool_link[:href]).to end_with(ci_lint_path) - end - end - - step 'I click erase build button' do - accept_confirm { click_link 'Erase' } - end - - step 'recent build has been erased' do - expect(@build).not_to have_trace - expect(@build.artifacts_file.exists?).to be_falsy - expect(@build.artifacts_metadata.exists?).to be_falsy - end - - step 'recent build summary does not have artifacts widget' do - expect(page).to have_no_css('.artifacts') - end - - step 'recent build summary contains information saying that build has been erased' do - page.within('.erased') do - expect(page).to have_content 'Job has been erased' - end - end - - step 'the build count cache is updated' do - expect(@build.project.running_or_pending_build_count).to eq @build.project.builds.running_or_pending.count(:all) - end -end diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb index 3b8d9af96c1..f88738b4c61 100644 --- a/features/steps/project/fork.rb +++ b/features/steps/project/fork.rb @@ -37,7 +37,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps step 'I goto the Merge Requests page' do page.within '.nav-sidebar' do - click_link "Merge Requests" + first(:link, "Merge Requests").click end end @@ -52,7 +52,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps end step 'I visit the forks page of the "Shop" project' do - @project = Project.where(name: 'Shop').last + @project = Project.where(name: 'Shop').first visit project_forks_path(@project) end diff --git a/features/steps/project/issues/award_emoji.rb b/features/steps/project/issues/award_emoji.rb deleted file mode 100644 index bbd284b4633..00000000000 --- a/features/steps/project/issues/award_emoji.rb +++ /dev/null @@ -1,107 +0,0 @@ -class Spinach::Features::AwardEmoji < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - include Select2Helper - - step 'I visit "Bugfix" issue page' do - visit project_issue_path(@project, @issue) - end - - step 'I click the thumbsup award Emoji' do - page.within '.awards' do - thumbsup = page.first('.award-control') - thumbsup.click - thumbsup.hover - end - end - - step 'I click to emoji-picker' do - page.within '.awards' do - page.find('.js-add-award').click - end - end - - step 'I click to emoji in the picker' do - page.within '.emoji-menu-content' do - emoji_button = page.first('.js-emoji-btn') - emoji_button.hover - emoji_button.click - end - end - - step 'I can remove it by clicking to icon' do - page.within '.awards' do - expect do - page.find('.js-emoji-btn.active').click - wait_for_requests - end.to change { page.all(".award-control.js-emoji-btn").size }.from(3).to(2) - end - end - - step 'I can see the activity and food categories' do - page.within '.emoji-menu' do - expect(page).not_to have_selector 'Activity' - expect(page).not_to have_selector 'Food' - end - end - - step 'I have new comment with emoji added' do - expect(page).to have_selector 'gl-emoji[data-name="smile"]' - end - - step 'I have award added' do - page.within '.awards' do - expect(page).to have_selector '.js-emoji-btn' - expect(page.find('.js-emoji-btn.active .js-counter')).to have_content '1' - expect(page).to have_css(".js-emoji-btn.active[data-original-title='You']") - end - end - - step 'I have no awards added' do - page.within '.awards' do - expect(page).to have_selector '.award-control.js-emoji-btn' - expect(page.all('.award-control.js-emoji-btn').size).to eq(2) - - # Check tooltip data - page.all('.award-control.js-emoji-btn').each do |element| - expect(element['title']).to eq("") - end - - page.all('.award-control .js-counter').each do |element| - expect(element).to have_content '0' - end - end - end - - step 'project "Shop" has issue "Bugfix"' do - @project = Project.find_by(name: 'Shop') - @issue = create(:issue, title: 'Bugfix', project: project) - end - - step 'I leave comment with a single emoji' do - page.within('.js-main-target-form') do - fill_in 'note[note]', with: ':smile:' - click_button 'Comment' - end - end - - step 'I search "hand"' do - fill_in 'emoji-menu-search', with: 'hand' - end - - step 'I see search result for "hand"' do - page.within '.emoji-menu-content' do - expect(page).to have_selector '[data-name="raised_hand"]' - end - end - - step 'The emoji menu is visible' do - page.find(".emoji-menu.is-visible") - end - - step 'The search field is focused' do - expect(page).to have_selector('.js-emoji-menu-search') - expect(page.evaluate_script("document.activeElement.classList.contains('js-emoji-menu-search')")).to eq(true) - end -end diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index f7dd4fc21e9..b9460f5b534 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -62,7 +62,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end step 'I click link "New issue"' do - page.within '.breadcrumbs' do + page.within '#content-body' do page.has_link?('New Issue') ? click_link('New Issue') : click_link('New issue') end end diff --git a/features/steps/project/issues/milestones.rb b/features/steps/project/issues/milestones.rb index 4765bb7cebe..33a24e8913a 100644 --- a/features/steps/project/issues/milestones.rb +++ b/features/steps/project/issues/milestones.rb @@ -17,7 +17,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps end step 'I click link "New Milestone"' do - page.within('.breadcrumbs') do + page.within('.nav-controls') do click_link "New milestone" end end diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index a57edc287be..17b1bcd02f3 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -15,7 +15,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps end step 'I click link "New Merge Request"' do - page.within '.breadcrumbs' do + page.within '.nav-controls' do page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request') end end diff --git a/features/steps/project/merge_requests/acceptance.rb b/features/steps/project/merge_requests/acceptance.rb deleted file mode 100644 index 3c640e3512a..00000000000 --- a/features/steps/project/merge_requests/acceptance.rb +++ /dev/null @@ -1,55 +0,0 @@ -class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps - include LoginHelpers - include WaitForRequests - - step 'I am on the Merge Request detail page' do - visit merge_request_path(@merge_request) - end - - step 'I am on the Merge Request detail with note anchor page' do - visit merge_request_path(@merge_request, anchor: 'note_123') - end - - step 'I uncheck the "Remove source branch" option' do - uncheck('Remove source branch') - end - - step 'I check the "Remove source branch" option' do - check('Remove source branch') - end - - step 'I click on Accept Merge Request' do - click_button('Merge') - end - - step 'I should see the Remove Source Branch button' do - expect(page).to have_selector('.js-remove-branch-button') - - # Wait for View Resource requests to complete so they don't blow up if they are - # only handled after `DatabaseCleaner` has already run - wait_for_requests - end - - step 'I should not see the Remove Source Branch button' do - expect(page).not_to have_selector('.js-remove-branch-button') - - # Wait for View Resource requests to complete so they don't blow up if they are - # only handled after `DatabaseCleaner` has already run - wait_for_requests - end - - step 'There is an open Merge Request' do - @user = create(:user) - @project = create(:project, :public, :repository) - @project_member = create(:project_member, :developer, user: @user, project: @project) - @merge_request = create(:merge_request, :with_diffs, :simple, source_project: @project) - end - - step 'I am signed in as a developer of the project' do - sign_in(@user) - end - - step 'I should see merge request merged' do - expect(page).to have_content('The changes were merged into') - end -end diff --git a/features/steps/project/merge_requests/revert.rb b/features/steps/project/merge_requests/revert.rb deleted file mode 100644 index 25ccf5ab180..00000000000 --- a/features/steps/project/merge_requests/revert.rb +++ /dev/null @@ -1,56 +0,0 @@ -class Spinach::Features::RevertMergeRequests < Spinach::FeatureSteps - include LoginHelpers - include WaitForRequests - - step 'I click on the revert button' do - find("a[href='#modal-revert-commit']").click - end - - step 'I revert the changes directly' do - page.within('#modal-revert-commit') do - uncheck 'create_merge_request' - click_button 'Revert' - end - end - - step 'I should see the revert merge request notice' do - page.should have_content('The merge request has been successfully reverted.') - wait_for_requests - end - - step 'I should not see the revert button' do - expect(page).not_to have_selector(:xpath, "a[href='#modal-revert-commit']") - end - - step 'I am on the Merge Request detail page' do - visit merge_request_path(@merge_request) - end - - step 'I click on Accept Merge Request' do - click_button('Merge') - end - - step 'I am signed in as a developer of the project' do - @user = create(:user) { |u| @project.add_developer(u) } - sign_in(@user) - end - - step 'There is an open Merge Request' do - @merge_request = create(:merge_request, :with_diffs, :simple) - @project = @merge_request.source_project - end - - step 'I should see a revert error' do - page.should have_content('Sorry, we cannot revert this merge request automatically.') - end - - step 'I revert the changes in a new merge request' do - page.within('#modal-revert-commit') do - click_button 'Revert' - end - end - - step 'I should see the new merge request notice' do - page.should have_content('The merge request has been successfully reverted. You can now submit a merge request to get this change into the original branch.') - end -end diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb index 0a89c1baf20..3a762be8f1f 100644 --- a/features/steps/project/project.rb +++ b/features/steps/project/project.rb @@ -6,7 +6,6 @@ class Spinach::Features::Project < Spinach::FeatureSteps step 'change project settings' do fill_in 'project_name_edit', with: 'NewName' - select 'Disabled', from: 'project_project_feature_attributes_issues_access_level' end step 'I save project' do diff --git a/features/steps/project/project_group_links.rb b/features/steps/project/project_group_links.rb deleted file mode 100644 index 47ee31786a6..00000000000 --- a/features/steps/project/project_group_links.rb +++ /dev/null @@ -1,51 +0,0 @@ -class Spinach::Features::ProjectGroupLinks < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - include Select2Helper - - step 'I should see project already shared with group "Ops"' do - page.within '.project-members-groups' do - expect(page).to have_content "Ops" - end - end - - step 'I should see project is not shared with group "Market"' do - page.within '.project-members-groups' do - expect(page).not_to have_content "Market" - end - end - - step 'I select group "Market" for share' do - click_link 'Share with group' - group = Group.find_by(path: 'market') - select2(group.id, from: "#link_group_id") - select "Master", from: 'link_group_access' - click_button "Share" - end - - step 'I should see project is shared with group "Market"' do - page.within '.project-members-groups' do - expect(page).to have_content "Market" - end - end - - step 'project "Shop" is shared with group "Ops"' do - group = create(:group, name: 'Ops') - share_link = project.project_group_links.new(group_access: Gitlab::Access::MASTER) - share_link.group_id = group.id - share_link.save! - end - - step 'project "Shop" is not shared with group "Market"' do - create(:group, name: 'Market', path: 'market') - end - - step 'I visit project group links page' do - visit project_group_links_path(project) - end - - def project - @project ||= Project.find_by_name "Shop" - end -end diff --git a/features/steps/project/project_milestone.rb b/features/steps/project/project_milestone.rb deleted file mode 100644 index b2d08515e77..00000000000 --- a/features/steps/project/project_milestone.rb +++ /dev/null @@ -1,62 +0,0 @@ -class Spinach::Features::ProjectMilestone < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - include WaitForRequests - - step 'milestone has issue "Bugfix1" with labels: "bug", "feature"' do - project = Project.find_by(name: "Shop") - milestone = project.milestones.find_by(title: 'v2.2') - issue = create(:issue, title: "Bugfix1", project: project, milestone: milestone) - issue.labels << project.labels.find_by(title: 'bug') - issue.labels << project.labels.find_by(title: 'feature') - end - - step 'milestone has issue "Bugfix2" with labels: "bug", "enhancement"' do - project = Project.find_by(name: "Shop") - milestone = project.milestones.find_by(title: 'v2.2') - issue = create(:issue, title: "Bugfix2", project: project, milestone: milestone) - issue.labels << project.labels.find_by(title: 'bug') - issue.labels << project.labels.find_by(title: 'enhancement') - end - - step 'project "Shop" has milestone "v2.2"' do - project = Project.find_by(name: "Shop") - milestone = create(:milestone, - title: "v2.2", - project: project, - description: "# Description header" - ) - 3.times { create(:issue, project: project, milestone: milestone) } - end - - step 'I should see the list of labels' do - expect(page).to have_selector('ul.manage-labels-list') - end - - step 'I should see the labels "bug", "enhancement" and "feature"' do - wait_for_requests - - page.within('#tab-issues') do - expect(page).to have_content 'bug' - expect(page).to have_content 'enhancement' - expect(page).to have_content 'feature' - end - end - - step 'I should see the "bug" label listed only once' do - page.within('#tab-labels') do - expect(page).to have_content('bug', count: 1) - end - end - - step 'I click link "v2.2"' do - click_link "v2.2" - end - - step 'I click link "Labels"' do - page.within('.nav-sidebar') do - page.find(:xpath, "//a[@href='#tab-labels']").click - end - end -end diff --git a/features/steps/project/redirects.rb b/features/steps/project/redirects.rb index 100e674abed..9ce86ca45d0 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") - page.within '.breadcrumbs .title' do + page.within '.breadcrumbs .breadcrumb-item-text' do expect(page).to have_content 'Community' end end diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb index 0646a70acfd..12257593621 100644 --- a/features/steps/project/snippets.rb +++ b/features/steps/project/snippets.rb @@ -23,7 +23,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps end step 'I click link "New snippet"' do - page.within '.breadcrumbs' do + page.within '.nav-controls' do first(:link, "New snippet").click end end diff --git a/features/steps/project/source/markdown_render.rb b/features/steps/project/source/markdown_render.rb index 243a0f54f7f..f6445b57ec0 100644 --- a/features/steps/project/source/markdown_render.rb +++ b/features/steps/project/source/markdown_render.rb @@ -218,7 +218,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps # Wiki step 'I go to wiki page' do - click_link "Wiki" + first(:link, "Wiki").click expect(current_path).to eq project_wiki_path(@project, "home") end diff --git a/features/steps/project/team_management.rb b/features/steps/project/team_management.rb deleted file mode 100644 index 5c4025ace34..00000000000 --- a/features/steps/project/team_management.rb +++ /dev/null @@ -1,87 +0,0 @@ -class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - include Select2Helper - - step 'I should not see "Dmitriy" in team list' do - user = User.find_by(name: "Dmitriy") - expect(page).not_to have_content(user.name) - expect(page).not_to have_content(user.username) - end - - step 'I should see "Mike" in team list as "Reporter"' do - user = User.find_by(name: 'Mike') - project_member = project.project_members.find_by(user_id: user.id) - page.within "#project_member_#{project_member.id}" do - expect(page).to have_content('Mike') - expect(page).to have_content('Reporter') - end - end - - step 'gitlab user "Mike"' do - create(:user, name: "Mike") - end - - step 'gitlab user "Dmitriy"' do - create(:user, name: "Dmitriy") - end - - step '"Dmitriy" is "Shop" developer' do - user = User.find_by(name: "Dmitriy") - project = Project.find_by(name: "Shop") - project.team << [user, :developer] - end - - step 'I own project "Website"' do - @project = create(:project, name: "Website", namespace: @user.namespace) - @project.team << [@user, :master] - end - - step '"Mike" is "Website" reporter' do - user = User.find_by(name: "Mike") - project = Project.find_by(name: "Website") - project.team << [user, :reporter] - end - - step 'I click link "Import team from another project"' do - page.within '.users-project-form' do - click_link "Import" - end - end - - When 'I submit "Website" project for import team' do - project = Project.find_by(name: "Website") - select project.name_with_namespace, from: 'source_project_id' - click_button 'Import' - end - - step 'I click cancel link for "Dmitriy"' do - project = Project.find_by(name: "Shop") - user = User.find_by(name: 'Dmitriy') - project_member = project.project_members.find_by(user_id: user.id) - page.within "#project_member_#{project_member.id}" do - click_link('Remove user from project') - end - end - - step 'I share project with group "OpenSource"' do - project = Project.find_by(name: 'Shop') - os_group = create(:group, name: 'OpenSource') - create(:project, group: os_group) - @os_user1 = create(:user) - @os_user2 = create(:user) - os_group.add_owner(@os_user1) - os_group.add_user(@os_user2, Gitlab::Access::DEVELOPER) - share_link = project.project_group_links.new(group_access: Gitlab::Access::MASTER) - share_link.group_id = os_group.id - share_link.save! - end - - step 'I should see "Opensource" group user listing' do - page.within '.project-members-groups' do - expect(page).to have_content('OpenSource') - expect(first('.group_member')).to have_content('Master') - end - end -end diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb deleted file mode 100644 index 855757e34b3..00000000000 --- a/features/steps/project/wiki.rb +++ /dev/null @@ -1,195 +0,0 @@ -class Spinach::Features::ProjectWiki < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedNote - include SharedPaths - - step 'I click on the Cancel button' do - page.within(:css, ".wiki-form .form-actions") do - click_on "Cancel" - end - end - - step 'I should be redirected back to the Edit Home Wiki page' do - expect(current_path).to eq project_wiki_path(project, :home) - end - - step 'I create the Wiki Home page' do - fill_in "wiki_content", with: '[link test](test)' - page.within '.wiki-form' do - click_on "Create page" - end - end - - step 'I create the Wiki Home page with no content' do - fill_in "wiki_content", with: '' - page.within '.wiki-form' do - click_on "Create page" - end - end - - step 'I should see the newly created wiki page' do - expect(page).to have_content "Home" - expect(page).to have_content "link test" - - click_link "link test" - expect(page).to have_content "Create page" - end - - step 'I have an existing Wiki page' do - wiki.create_page("existing", "content", :markdown, "first commit") - @page = wiki.find_page("existing") - end - - step 'I browse to that Wiki page' do - visit project_wiki_path(project, @page) - end - - step 'I click on the Edit button' do - click_on "Edit" - end - - step 'I change the content' do - fill_in "Content", with: 'Updated Wiki Content' - click_on "Save changes" - end - - step 'I should see the updated content' do - expect(page).to have_content "Updated Wiki Content" - end - - step 'I should be redirected back to that Wiki page' do - expect(current_path).to eq project_wiki_path(project, @page) - end - - step 'That page has two revisions' do - @page.update(content: "new content", message: "second commit") - end - - step 'I click the History button' do - click_on 'Page history' - end - - step 'I should see both revisions' do - expect(page).to have_content current_user.name - expect(page).to have_content "first commit" - expect(page).to have_content "second commit" - end - - step 'I click on the "Delete this page" button' do - click_on "Delete" - end - - step 'The page should be deleted' do - expect(page).to have_content "Page was successfully deleted" - end - - step 'I should see the existing page in the pages list' do - expect(page).to have_content current_user.name - expect(find('.wiki-pages')).to have_content @page.title.capitalize - end - - step 'I have an existing Wiki page with images linked on page' do - wiki.create_page("pictures", "Look at this [image](image.jpg)\n\n ![alt text](image.jpg)", :markdown, "first commit") - @wiki_page = wiki.find_page("pictures") - end - - step 'I browse to wiki page with images' do - visit project_wiki_path(project, @wiki_page) - end - - step 'I click on existing image link' do - file = Gollum::File.new(wiki.wiki) - Gollum::Wiki.any_instance.stub(:file).with("image.jpg", "master", true).and_return(file) - Gollum::File.any_instance.stub(:mime_type).and_return("image/jpeg") - expect(page).to have_link('image', href: "#{wiki.wiki_base_path}/image.jpg") - click_on "image" - end - - step 'I should see the image from wiki repo' do - expect(current_path).to match('wikis/image.jpg') - expect(page).not_to have_xpath('/html') # Page should render the image which means there is no html involved - Gollum::Wiki.any_instance.unstub(:file) - Gollum::File.any_instance.unstub(:mime_type) - end - - step 'Image should be shown on the page' do - expect(page).to have_xpath("//img[@data-src=\"image.jpg\"]") - end - - step 'I click on image link' do - expect(page).to have_link('image', href: "#{wiki.wiki_base_path}/image.jpg") - click_on "image" - end - - step 'I should see the new wiki page form' do - expect(current_path).to match('wikis/image.jpg') - expect(page).to have_content('New Wiki Page') - expect(page).to have_content('Create page') - end - - step 'I create a New page with paths' do - click_on 'New page' - fill_in 'Page slug', with: 'one/two/three-test' - page.within '#modal-new-wiki' do - click_on 'Create page' - end - fill_in "wiki_content", with: 'wiki content' - page.within '.wiki-form' do - click_on "Create page" - end - expect(current_path).to include 'one/two/three-test' - end - - step 'I should see non-escaped link in the pages list' do - expect(page).to have_xpath("//a[@href='/#{project.full_path}/wikis/one/two/three-test']") - end - - step 'I edit the Wiki page with a path' do - expect(find('.wiki-pages')).to have_content('Three') - click_on 'Three' - expect(find('.nav-text')).to have_content('Three') - click_on 'Edit' - end - - step 'I should see a non-escaped path' do - expect(current_path).to include 'one/two/three-test' - end - - step 'I should see the Editing page' do - expect(page).to have_content('Edit Page') - end - - step 'I view the page history of a Wiki page that has a path' do - click_on 'Three' - click_on 'Page history' - end - - step 'I click on Page History' do - click_on 'Page history' - end - - step 'I should see the page history' do - page.within(:css, ".nav-text") do - expect(page).to have_content('History') - end - end - - step 'I search for Wiki content' do - fill_in "Search", with: "wiki_content" - click_button "Search" - end - - step 'I should see a link with a version ID' do - find('a[href*="?version_id"]') - end - - step 'I should see a "Content can\'t be blank" error message' do - expect(page).to have_content('The form contains the following error:') - expect(page).to have_content('Content can\'t be blank') - end - - def wiki - @project_wiki = ProjectWiki.new(project, current_user) - end -end |