Skip to content
Snippets Groups Projects
Commit 69bbc413 authored by Robert Speicher's avatar Robert Speicher
Browse files

Update all `should`-style syntax to `expect` in features

parent b07cf118
No related branches found
No related tags found
No related merge requests found
Showing
with 155 additions and 155 deletions
Loading
Loading
@@ -8,7 +8,7 @@ class Spinach::Features::AdminApplications < Spinach::FeatureSteps
end
 
step 'I should see application form' do
page.should have_content "New application"
expect(page).to have_content "New application"
end
 
step 'I fill application form out and submit' do
Loading
Loading
@@ -18,9 +18,9 @@ class Spinach::Features::AdminApplications < Spinach::FeatureSteps
end
 
step 'I see application' do
page.should have_content "Application: test"
page.should have_content "Application Id"
page.should have_content "Secret"
expect(page).to have_content "Application: test"
expect(page).to have_content "Application Id"
expect(page).to have_content "Secret"
end
 
step 'I click edit' do
Loading
Loading
@@ -28,19 +28,19 @@ class Spinach::Features::AdminApplications < Spinach::FeatureSteps
end
 
step 'I see edit application form' do
page.should have_content "Edit application"
expect(page).to have_content "Edit application"
end
 
step 'I change name of application and submit' do
page.should have_content "Edit application"
expect(page).to have_content "Edit application"
fill_in :doorkeeper_application_name, with: 'test_changed'
click_on "Submit"
end
 
step 'I see that application was changed' do
page.should have_content "test_changed"
page.should have_content "Application Id"
page.should have_content "Secret"
expect(page).to have_content "test_changed"
expect(page).to have_content "Application Id"
expect(page).to have_content "Secret"
end
 
step 'I click to remove application' do
Loading
Loading
@@ -50,6 +50,6 @@ class Spinach::Features::AdminApplications < Spinach::FeatureSteps
end
 
step "I see that application is removed" do
page.find(".oauth-applications").should_not have_content "test_changed"
expect(page.find(".oauth-applications")).not_to have_content "test_changed"
end
end
Loading
Loading
@@ -8,7 +8,7 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
end
 
step 'I should be all broadcast messages' do
page.should have_content "Migration to new server"
expect(page).to have_content "Migration to new server"
end
 
step 'submit form with new broadcast message' do
Loading
Loading
@@ -18,11 +18,11 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
end
 
step 'I should be redirected to admin messages page' do
current_path.should == admin_broadcast_messages_path
expect(current_path).to eq admin_broadcast_messages_path
end
 
step 'I should see newly created broadcast message' do
page.should have_content 'Application update from 4:00 CST to 5:00 CST'
expect(page).to have_content 'Application update from 4:00 CST to 5:00 CST'
end
 
step 'submit form with new customized broadcast message' do
Loading
Loading
@@ -35,7 +35,7 @@ class Spinach::Features::AdminBroadcastMessages < Spinach::FeatureSteps
end
 
step 'I should see a customized broadcast message' do
page.should have_content 'Application update from 4:00 CST to 5:00 CST'
page.should have_selector %(div[style="background-color:#f2dede;color:#b94a48"])
expect(page).to have_content 'Application update from 4:00 CST to 5:00 CST'
expect(page).to have_selector %(div[style="background-color:#f2dede;color:#b94a48"])
end
end
Loading
Loading
@@ -10,7 +10,7 @@ class Spinach::Features::AdminDeployKeys < Spinach::FeatureSteps
 
step 'I should see all public deploy keys' do
DeployKey.are_public.each do |p|
page.should have_content p.title
expect(page).to have_content p.title
end
end
 
Loading
Loading
@@ -33,11 +33,11 @@ class Spinach::Features::AdminDeployKeys < Spinach::FeatureSteps
end
 
step 'I should be on admin deploy keys page' do
current_path.should == admin_deploy_keys_path
expect(current_path).to eq admin_deploy_keys_path
end
 
step 'I should see newly created deploy key' do
page.should have_content(deploy_key.title)
expect(page).to have_content(deploy_key.title)
end
 
def deploy_key
Loading
Loading
Loading
Loading
@@ -28,12 +28,12 @@ class Spinach::Features::AdminGroups < Spinach::FeatureSteps
end
 
step 'I should see newly created group' do
page.should have_content "Group: gitlab"
page.should have_content "Group description"
expect(page).to have_content "Group: gitlab"
expect(page).to have_content "Group description"
end
 
step 'I should be redirected to group page' do
current_path.should == admin_group_path(Group.find_by(path: 'gitlab'))
expect(current_path).to eq admin_group_path(Group.find_by(path: 'gitlab'))
end
 
When 'I select user "John Doe" from user list as "Reporter"' do
Loading
Loading
@@ -46,14 +46,14 @@ class Spinach::Features::AdminGroups < Spinach::FeatureSteps
 
step 'I should see "John Doe" in team list in every project as "Reporter"' do
within ".group-users-list" do
page.should have_content "John Doe"
page.should have_content "Reporter"
expect(page).to have_content "John Doe"
expect(page).to have_content "Reporter"
end
end
 
step 'I should be all groups' do
Group.all.each do |group|
page.should have_content group.name
expect(page).to have_content group.name
end
end
 
Loading
Loading
@@ -69,7 +69,7 @@ class Spinach::Features::AdminGroups < Spinach::FeatureSteps
 
step 'I should not see "John Doe" in team list' do
within ".group-users-list" do
page.should_not have_content "John Doe"
expect(page).not_to have_content "John Doe"
end
end
 
Loading
Loading
Loading
Loading
@@ -4,8 +4,8 @@ class Spinach::Features::AdminLogs < Spinach::FeatureSteps
include SharedAdmin
 
step 'I should see tabs with available logs' do
page.should have_content 'production.log'
page.should have_content 'githost.log'
page.should have_content 'application.log'
expect(page).to have_content 'production.log'
expect(page).to have_content 'githost.log'
expect(page).to have_content 'application.log'
end
end
Loading
Loading
@@ -5,7 +5,7 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
 
step 'I should see all projects' do
Project.all.each do |p|
page.should have_content p.name_with_namespace
expect(page).to have_content p.name_with_namespace
end
end
 
Loading
Loading
@@ -15,9 +15,9 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
 
step 'I should see project details' do
project = Project.first
current_path.should == admin_namespace_project_path(project.namespace, project)
page.should have_content(project.name_with_namespace)
page.should have_content(project.creator.name)
expect(current_path).to eq admin_namespace_project_path(project.namespace, project)
expect(page).to have_content(project.name_with_namespace)
expect(page).to have_content(project.creator.name)
end
 
step 'I visit admin project page' do
Loading
Loading
@@ -34,8 +34,8 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
end
 
step 'I should see project transfered' do
page.should have_content 'Web / ' + project.name
page.should have_content 'Namespace: Web'
expect(page).to have_content 'Web / ' + project.name
expect(page).to have_content 'Namespace: Web'
end
 
def project
Loading
Loading
Loading
Loading
@@ -11,9 +11,9 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps
end
 
step 'I should see application settings saved' do
current_application_settings.gravatar_enabled.should be_false
current_application_settings.home_page_url.should == 'https://about.gitlab.com/'
page.should have_content 'Application settings saved successfully'
expect(current_application_settings.gravatar_enabled).to be_false
expect(current_application_settings.home_page_url).to eq 'https://about.gitlab.com/'
expect(page).to have_content 'Application settings saved successfully'
end
 
step 'I click on "Service Templates"' do
Loading
Loading
@@ -41,18 +41,18 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps
end
 
step 'I should see service template settings saved' do
page.should have_content 'Application settings saved successfully'
expect(page).to have_content 'Application settings saved successfully'
end
 
step 'I should see all checkboxes checked' do
all('input[type=checkbox]').each do |checkbox|
checkbox.should be_checked
expect(checkbox).to be_checked
end
end
 
step 'I should see Slack settings saved' do
find_field('Webhook').value.should eq 'http://localhost'
find_field('Username').value.should eq 'test_user'
find_field('Channel').value.should eq '#test_channel'
expect(find_field('Webhook').value).to eq 'http://localhost'
expect(find_field('Username').value).to eq 'test_user'
expect(find_field('Channel').value).to eq '#test_channel'
end
end
Loading
Loading
@@ -5,7 +5,7 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
 
step 'I should see all users' do
User.all.each do |user|
page.should have_content user.name
expect(page).to have_content user.name
end
end
 
Loading
Loading
@@ -24,12 +24,12 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
 
step 'See username error message' do
within "#error_explanation" do
page.should have_content "Username"
expect(page).to have_content "Username"
end
end
 
step 'Not changed form action url' do
page.should have_selector %(form[action="/admin/users/#{@user.username}"])
expect(page).to have_selector %(form[action="/admin/users/#{@user.username}"])
end
 
step 'I submit modified user' do
Loading
Loading
@@ -38,7 +38,7 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
end
 
step 'I see user attributes changed' do
page.should have_content 'Can create groups: Yes'
expect(page).to have_content 'Can create groups: Yes'
end
 
step 'click edit on my user' do
Loading
Loading
@@ -53,7 +53,7 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
end
 
step 'I see the secondary email' do
page.should have_content "Secondary email: #{@user_with_secondary_email.emails.last.email}"
expect(page).to have_content "Secondary email: #{@user_with_secondary_email.emails.last.email}"
end
 
step 'I click remove secondary email' do
Loading
Loading
@@ -61,7 +61,7 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
end
 
step 'I should not see secondary email anymore' do
page.should_not have_content "Secondary email:"
expect(page).not_to have_content "Secondary email:"
end
 
step 'user "Mike" with groups and projects' do
Loading
Loading
@@ -79,8 +79,8 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
end
 
step 'I should see user "Mike" details' do
page.should have_content 'Account'
page.should have_content 'Personal projects limit'
expect(page).to have_content 'Account'
expect(page).to have_content 'Personal projects limit'
end
 
step 'user "Pete" with ssh keys' do
Loading
Loading
@@ -94,8 +94,8 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
end
 
step 'I should see key list' do
page.should have_content 'ssh-rsa Key2'
page.should have_content 'ssh-rsa Key1'
expect(page).to have_content 'ssh-rsa Key2'
expect(page).to have_content 'ssh-rsa Key1'
end
 
step 'I click on the key title' do
Loading
Loading
@@ -103,8 +103,8 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
end
 
step 'I should see key details' do
page.should have_content 'ssh-rsa Key2'
page.should have_content 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQSTWXhJAX/He+nG78MiRRRn7m0Pb0XbcgTxE0etArgoFoh9WtvDf36HG6tOSg/0UUNcp0dICsNAmhBKdncp6cIyPaXJTURPRAGvhI0/VDk4bi27bRnccGbJ/hDaUxZMLhhrzY0r22mjVf8PF6dvv5QUIQVm1/LeaWYsHHvLgiIjwrXirUZPnFrZw6VLREoBKG8uWvfSXw1L5eapmstqfsME8099oi+vWLR8MgEysZQmD28M73fgW4zek6LDQzKQyJx9nB+hJkKUDvcuziZjGmRFlNgSA2mguERwL1OXonD8WYUrBDGKroIvBT39zS5d9tQDnidEJZ9Y8gv5ViYP7x Key2'
expect(page).to have_content 'ssh-rsa Key2'
expect(page).to have_content 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQSTWXhJAX/He+nG78MiRRRn7m0Pb0XbcgTxE0etArgoFoh9WtvDf36HG6tOSg/0UUNcp0dICsNAmhBKdncp6cIyPaXJTURPRAGvhI0/VDk4bi27bRnccGbJ/hDaUxZMLhhrzY0r22mjVf8PF6dvv5QUIQVm1/LeaWYsHHvLgiIjwrXirUZPnFrZw6VLREoBKG8uWvfSXw1L5eapmstqfsME8099oi+vWLR8MgEysZQmD28M73fgW4zek6LDQzKQyJx9nB+hJkKUDvcuziZjGmRFlNgSA2mguERwL1OXonD8WYUrBDGKroIvBT39zS5d9tQDnidEJZ9Y8gv5ViYP7x Key2'
end
 
step 'I click on remove key' do
Loading
Loading
@@ -112,6 +112,6 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
end
 
step 'I should see the key removed' do
page.should_not have_content 'ssh-rsa Key2'
expect(page).not_to have_content 'ssh-rsa Key2'
end
end
Loading
Loading
@@ -9,14 +9,14 @@ class Spinach::Features::DashboardArchivedProjects < Spinach::FeatureSteps
end
 
step 'I should see "Shop" project link' do
page.should have_link "Shop"
expect(page).to have_link "Shop"
end
 
step 'I should not see "Forum" project link' do
page.should_not have_link "Forum"
expect(page).not_to have_link "Forum"
end
 
step 'I should see "Forum" project link' do
page.should have_link "Forum"
expect(page).to have_link "Forum"
end
end
Loading
Loading
@@ -4,16 +4,16 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
include SharedProject
 
step 'I should see "New Project" link' do
page.should have_link "New project"
expect(page).to have_link "New project"
end
 
step 'I should see "Shop" project link' do
page.should have_link "Shop"
expect(page).to have_link "Shop"
end
 
step 'I should see last push widget' do
page.should have_content "You pushed to fix"
page.should have_link "Create Merge Request"
expect(page).to have_content "You pushed to fix"
expect(page).to have_link "Create Merge Request"
end
 
step 'I click "Create Merge Request" link' do
Loading
Loading
@@ -21,10 +21,10 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
end
 
step 'I see prefilled new Merge Request page' do
current_path.should == new_namespace_project_merge_request_path(@project.namespace, @project)
find("#merge_request_target_project_id").value.should == @project.id.to_s
find("input#merge_request_source_branch").value.should == "fix"
find("input#merge_request_target_branch").value.should == "master"
expect(current_path).to eq new_namespace_project_merge_request_path(@project.namespace, @project)
expect(find("#merge_request_target_project_id").value).to eq @project.id.to_s
expect(find("input#merge_request_source_branch").value).to eq "fix"
expect(find("input#merge_request_target_branch").value).to eq "master"
end
 
step 'user with name "John Doe" joined project "Shop"' do
Loading
Loading
@@ -38,7 +38,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
end
 
step 'I should see "John Doe joined project Shop" event' do
page.should have_content "John Doe joined project #{project.name_with_namespace}"
expect(page).to have_content "John Doe joined project #{project.name_with_namespace}"
end
 
step 'user with name "John Doe" left project "Shop"' do
Loading
Loading
@@ -51,7 +51,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
end
 
step 'I should see "John Doe left project Shop" event' do
page.should have_content "John Doe left project #{project.name_with_namespace}"
expect(page).to have_content "John Doe left project #{project.name_with_namespace}"
end
 
step 'I have group with projects' do
Loading
Loading
@@ -64,13 +64,13 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
 
step 'I should see projects list' do
@user.authorized_projects.all.each do |project|
page.should have_link project.name_with_namespace
expect(page).to have_link project.name_with_namespace
end
end
 
step 'I should see groups list' do
Group.all.each do |group|
page.should have_link group.name
expect(page).to have_link group.name
end
end
 
Loading
Loading
@@ -80,6 +80,6 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
end
 
step 'I should see 1 project at group list' do
find('span.last_activity/span').should have_content('1')
expect(find('span.last_activity/span')).to have_content('1')
end
end
Loading
Loading
@@ -4,27 +4,27 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps
include SharedProject
 
step 'I should see push event' do
page.should have_selector('span.pushed')
expect(page).to have_selector('span.pushed')
end
 
step 'I should not see push event' do
page.should_not have_selector('span.pushed')
expect(page).not_to have_selector('span.pushed')
end
 
step 'I should see new member event' do
page.should have_selector('span.joined')
expect(page).to have_selector('span.joined')
end
 
step 'I should not see new member event' do
page.should_not have_selector('span.joined')
expect(page).not_to have_selector('span.joined')
end
 
step 'I should see merge request event' do
page.should have_selector('span.accepted')
expect(page).to have_selector('span.accepted')
end
 
step 'I should not see merge request event' do
page.should_not have_selector('span.accepted')
expect(page).not_to have_selector('span.accepted')
end
 
step 'this project has push event' do
Loading
Loading
Loading
Loading
@@ -17,29 +17,29 @@ class Spinach::Features::DashboardGroup < Spinach::FeatureSteps
end
 
step 'I should not see the "Leave" button for group "Owned"' do
find(:css, 'li', text: "Owner").should_not have_selector(:css, 'i.fa.fa-sign-out')
expect(find(:css, 'li', text: "Owner")).not_to have_selector(:css, 'i.fa.fa-sign-out')
# poltergeist always confirms popups.
end
 
step 'I should not see the "Leave" button for groupr "Guest"' do
find(:css, 'li', text: "Guest").should_not have_selector(:css, 'i.fa.fa-sign-out')
expect(find(:css, 'li', text: "Guest")).not_to have_selector(:css, 'i.fa.fa-sign-out')
# poltergeist always confirms popups.
end
 
step 'I should see group "Owned" in group list' do
page.should have_content("Owned")
expect(page).to have_content("Owned")
end
 
step 'I should not see group "Owned" in group list' do
page.should_not have_content("Owned")
expect(page).not_to have_content("Owned")
end
 
step 'I should see group "Guest" in group list' do
page.should have_content("Guest")
expect(page).to have_content("Guest")
end
 
step 'I should not see group "Guest" in group list' do
page.should_not have_content("Guest")
expect(page).not_to have_content("Guest")
end
 
step 'I click new group link' do
Loading
Loading
@@ -53,15 +53,15 @@ class Spinach::Features::DashboardGroup < Spinach::FeatureSteps
end
 
step 'I should be redirected to group "Samurai" page' do
current_path.should == group_path(Group.find_by(name: 'Samurai'))
expect(current_path).to eq group_path(Group.find_by(name: 'Samurai'))
end
 
step 'I should see newly created group "Samurai"' do
page.should have_content "Samurai"
page.should have_content "Tokugawa Shogunate"
expect(page).to have_content "Samurai"
expect(page).to have_content "Tokugawa Shogunate"
end
 
step 'I should see the "Can not leave message"' do
page.should have_content "You can not leave Owned group because you're the last owner"
expect(page).to have_content "You can not leave Owned group because you're the last owner"
end
end
Loading
Loading
@@ -12,7 +12,7 @@ class Spinach::Features::DashboardHelp < Spinach::FeatureSteps
end
 
step 'I should see "Rake Tasks" page markdown rendered' do
page.should have_content "Gather information about GitLab and the system it runs on"
expect(page).to have_content "Gather information about GitLab and the system it runs on"
end
 
step 'Header "Rebuild project satellites" should have correct ids and links' do
Loading
Loading
Loading
Loading
@@ -46,11 +46,11 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
end
 
def should_see(issue)
page.should have_content(issue.title[0..10])
expect(page).to have_content(issue.title[0..10])
end
 
def should_not_see(issue)
page.should_not have_content(issue.title[0..10])
expect(page).not_to have_content(issue.title[0..10])
end
 
def assigned_issue
Loading
Loading
Loading
Loading
@@ -50,11 +50,11 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
end
 
def should_see(merge_request)
page.should have_content(merge_request.title[0..10])
expect(page).to have_content(merge_request.title[0..10])
end
 
def should_not_see(merge_request)
page.should_not have_content(merge_request.title[0..10])
expect(page).not_to have_content(merge_request.title[0..10])
end
 
def assigned_merge_request
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
end
 
step 'I see "New project" page' do
page.should have_content("Project path")
expect(page).to have_content("Project path")
end
 
step 'I click on "Import project from GitHub"' do
Loading
Loading
@@ -19,11 +19,11 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps
 
step 'I see instructions on how to import from GitHub' do
github_modal = first('.modal-body')
github_modal.should be_visible
github_modal.should have_content "To enable importing projects from GitHub"
expect(github_modal).to be_visible
expect(github_modal).to have_content "To enable importing projects from GitHub"
 
all('.modal-body').each do |element|
element.should_not be_visible unless element == github_modal
expect(element).not_to be_visible unless element == github_modal
end
end
end
Loading
Loading
@@ -9,7 +9,7 @@ class Spinach::Features::DashboardStarredProjects < Spinach::FeatureSteps
 
step 'I should not see project "Shop"' do
within 'aside' do
page.should_not have_content('Shop')
expect(page).not_to have_content('Shop')
end
end
end
Loading
Loading
@@ -39,19 +39,19 @@ class Spinach::Features::ExploreGroups < Spinach::FeatureSteps
end
 
step 'I should not see project "Enterprise" items' do
page.should_not have_content "Enterprise"
expect(page).not_to have_content "Enterprise"
end
 
step 'I should see project "Internal" items' do
page.should have_content "Internal"
expect(page).to have_content "Internal"
end
 
step 'I should not see project "Internal" items' do
page.should_not have_content "Internal"
expect(page).not_to have_content "Internal"
end
 
step 'I should see project "Community" items' do
page.should have_content "Community"
expect(page).to have_content "Community"
end
 
step 'I change filter to Everyone\'s' do
Loading
Loading
@@ -59,11 +59,11 @@ class Spinach::Features::ExploreGroups < Spinach::FeatureSteps
end
 
step 'I should see group member "John Doe"' do
page.should have_content "John Doe"
expect(page).to have_content "John Doe"
end
 
step 'I should not see member roles' do
body.should_not match(%r{owner|developer|reporter|guest}i)
expect(body).not_to match(%r{owner|developer|reporter|guest}i)
end
 
protected
Loading
Loading
Loading
Loading
@@ -4,56 +4,56 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
include SharedProject
 
step 'I should see project "Empty Public Project"' do
page.should have_content "Empty Public Project"
expect(page).to have_content "Empty Public Project"
end
 
step 'I should see public project details' do
page.should have_content '32 branches'
page.should have_content '16 tags'
expect(page).to have_content '32 branches'
expect(page).to have_content '16 tags'
end
 
step 'I should see project readme' do
page.should have_content 'README.md'
expect(page).to have_content 'README.md'
end
 
step 'I should see empty public project details' do
page.should have_content 'Git global setup'
expect(page).to have_content 'Git global setup'
end
 
step 'I should see empty public project details with http clone info' do
project = Project.find_by(name: 'Empty Public Project')
all(:css, '.git-empty .clone').each do |element|
element.text.should include(project.http_url_to_repo)
expect(element.text).to include(project.http_url_to_repo)
end
end
 
step 'I should see empty public project details with ssh clone info' do
project = Project.find_by(name: 'Empty Public Project')
all(:css, '.git-empty .clone').each do |element|
element.text.should include(project.url_to_repo)
expect(element.text).to include(project.url_to_repo)
end
end
 
step 'I should see project "Community" home page' do
within '.navbar-gitlab .title' do
page.should have_content 'Community'
expect(page).to have_content 'Community'
end
end
 
step 'I should see project "Internal" home page' do
within '.navbar-gitlab .title' do
page.should have_content 'Internal'
expect(page).to have_content 'Internal'
end
end
 
step 'I should see an http link to the repository' do
project = Project.find_by(name: 'Community')
page.should have_field('project_clone', with: project.http_url_to_repo)
expect(page).to have_field('project_clone', with: project.http_url_to_repo)
end
 
step 'I should see an ssh link to the repository' do
project = Project.find_by(name: 'Community')
page.should have_field('project_clone', with: project.url_to_repo)
expect(page).to have_field('project_clone', with: project.url_to_repo)
end
 
step 'I visit "Community" issues page' do
Loading
Loading
@@ -70,9 +70,9 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
 
 
step 'I should see list of issues for "Community" project' do
page.should have_content "Bug"
page.should have_content public_project.name
page.should have_content "New feature"
expect(page).to have_content "Bug"
expect(page).to have_content public_project.name
expect(page).to have_content "New feature"
end
 
step 'I visit "Internal" issues page' do
Loading
Loading
@@ -89,9 +89,9 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
 
 
step 'I should see list of issues for "Internal" project' do
page.should have_content "Internal Bug"
page.should have_content internal_project.name
page.should have_content "New internal feature"
expect(page).to have_content "Internal Bug"
expect(page).to have_content internal_project.name
expect(page).to have_content "New internal feature"
end
 
step 'I visit "Community" merge requests page' do
Loading
Loading
@@ -107,8 +107,8 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
end
 
step 'I should see list of merge requests for "Community" project' do
page.should have_content public_project.name
page.should have_content public_merge_request.source_project.name
expect(page).to have_content public_project.name
expect(page).to have_content public_merge_request.source_project.name
end
 
step 'I visit "Internal" merge requests page' do
Loading
Loading
@@ -124,8 +124,8 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
end
 
step 'I should see list of merge requests for "Internal" project' do
page.should have_content internal_project.name
page.should have_content internal_merge_request.source_project.name
expect(page).to have_content internal_project.name
expect(page).to have_content internal_merge_request.source_project.name
end
 
def internal_project
Loading
Loading
Loading
Loading
@@ -26,8 +26,8 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
 
step 'I should see "Mike" in team list as "Reporter"' do
within '.well-list' do
page.should have_content('Mike')
page.should have_content('Reporter')
expect(page).to have_content('Mike')
expect(page).to have_content('Reporter')
end
end
 
Loading
Loading
@@ -42,31 +42,31 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
 
step 'I should see "sjobs@apple.com" in team list as invited "Reporter"' do
within '.well-list' do
page.should have_content('sjobs@apple.com')
page.should have_content('invited')
page.should have_content('Reporter')
expect(page).to have_content('sjobs@apple.com')
expect(page).to have_content('invited')
expect(page).to have_content('Reporter')
end
end
 
step 'I should see group "Owned" projects list' do
Group.find_by(name: "Owned").projects.each do |project|
page.should have_link project.name
expect(page).to have_link project.name
end
end
 
step 'I should see projects activity feed' do
page.should have_content 'closed issue'
expect(page).to have_content 'closed issue'
end
 
step 'I should see issues from group "Owned" assigned to me' do
assigned_to_me(:issues).each do |issue|
page.should have_content issue.title
expect(page).to have_content issue.title
end
end
 
step 'I should see merge requests from group "Owned" assigned to me' do
assigned_to_me(:merge_requests).each do |issue|
page.should have_content issue.title[0..80]
expect(page).to have_content issue.title[0..80]
end
end
 
Loading
Loading
@@ -82,22 +82,22 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
 
step 'I should see user "John Doe" in team list' do
projects_with_access = find(".panel .well-list")
projects_with_access.should have_content("John Doe")
expect(projects_with_access).to have_content("John Doe")
end
 
step 'I should not see user "John Doe" in team list' do
projects_with_access = find(".panel .well-list")
projects_with_access.should_not have_content("John Doe")
expect(projects_with_access).not_to have_content("John Doe")
end
 
step 'I should see user "Mary Jane" in team list' do
projects_with_access = find(".panel .well-list")
projects_with_access.should have_content("Mary Jane")
expect(projects_with_access).to have_content("Mary Jane")
end
 
step 'I should not see user "Mary Jane" in team list' do
projects_with_access = find(".panel .well-list")
projects_with_access.should_not have_content("Mary Jane")
expect(projects_with_access).not_to have_content("Mary Jane")
end
 
step 'project from group "Owned" has issues assigned to me' do
Loading
Loading
@@ -123,7 +123,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
 
step 'I should see new group "Owned" name' do
within ".navbar-gitlab" do
page.should have_content "new-name"
expect(page).to have_content "new-name"
end
end
 
Loading
Loading
@@ -134,12 +134,12 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
 
step 'I should see new group "Owned" avatar' do
Group.find_by(name: "Owned").avatar.should be_instance_of AvatarUploader
Group.find_by(name: "Owned").avatar.url.should == "/uploads/group/avatar/#{ Group.find_by(name:"Owned").id }/gitlab_logo.png"
expect(Group.find_by(name: "Owned").avatar).to be_instance_of AvatarUploader
expect(Group.find_by(name: "Owned").avatar.url).to eq "/uploads/group/avatar/#{ Group.find_by(name:"Owned").id }/gitlab_logo.png"
end
 
step 'I should see the "Remove avatar" button' do
page.should have_link("Remove avatar")
expect(page).to have_link("Remove avatar")
end
 
step 'I have group "Owned" avatar' do
Loading
Loading
@@ -154,11 +154,11 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
 
step 'I should not see group "Owned" avatar' do
Group.find_by(name: "Owned").avatar?.should be_false
expect(Group.find_by(name: "Owned").avatar?).to be_false
end
 
step 'I should not see the "Remove avatar" button' do
page.should_not have_link("Remove avatar")
expect(page).not_to have_link("Remove avatar")
end
 
step 'I click on the "Remove User From Group" button for "John Doe"' do
Loading
Loading
@@ -172,12 +172,12 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
 
step 'I should not see the "Remove User From Group" button for "John Doe"' do
find(:css, 'li', text: "John Doe").should_not have_selector(:css, 'a.btn-remove')
expect(find(:css, 'li', text: "John Doe")).not_to have_selector(:css, 'a.btn-remove')
# poltergeist always confirms popups.
end
 
step 'I should not see the "Remove User From Group" button for "Mary Jane"' do
find(:css, 'li', text: "Mary Jane").should_not have_selector(:css, 'a.btn-remove')
expect(find(:css, 'li', text: "Mary Jane")).not_to have_selector(:css, 'a.btn-remove')
# poltergeist always confirms popups.
end
 
Loading
Loading
@@ -193,7 +193,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
 
step 'I should see group milestones index page has no milestones' do
page.should have_content('No milestones to show')
expect(page).to have_content('No milestones to show')
end
 
step 'Group has projects with milestones' do
Loading
Loading
@@ -201,10 +201,10 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
 
step 'I should see group milestones index page with milestones' do
page.should have_content('Version 7.2')
page.should have_content('GL-113')
page.should have_link('2 Issues', href: issues_group_path("owned", milestone_title: "Version 7.2"))
page.should have_link('3 Merge Requests', href: merge_requests_group_path("owned", milestone_title: "GL-113"))
expect(page).to have_content('Version 7.2')
expect(page).to have_content('GL-113')
expect(page).to have_link('2 Issues', href: issues_group_path("owned", milestone_title: "Version 7.2"))
expect(page).to have_link('3 Merge Requests', href: merge_requests_group_path("owned", milestone_title: "GL-113"))
end
 
step 'I click on one group milestone' do
Loading
Loading
@@ -212,14 +212,14 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
 
step 'I should see group milestone with descriptions and expiry date' do
page.should have_content('expires at Aug 20, 2114')
expect(page).to have_content('expires at Aug 20, 2114')
end
 
step 'I should see group milestone with all issues and MRs assigned to that milestone' do
page.should have_content('Milestone GL-113')
page.should have_content('Progress: 0 closed – 4 open')
page.should have_link(@issue1.title, href: namespace_project_issue_path(@project1.namespace, @project1, @issue1))
page.should have_link(@mr3.title, href: namespace_project_merge_request_path(@project3.namespace, @project3, @mr3))
expect(page).to have_content('Milestone GL-113')
expect(page).to have_content('Progress: 0 closed – 4 open')
expect(page).to have_link(@issue1.title, href: namespace_project_issue_path(@project1.namespace, @project1, @issue1))
expect(page).to have_link(@mr3.title, href: namespace_project_merge_request_path(@project3.namespace, @project3, @mr3))
end
 
protected
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment