Skip to content
Snippets Groups Projects
Commit bd6305d8 authored by Douwe Maan's avatar Douwe Maan
Browse files

Fix specs

parent 2dfb6615
No related branches found
No related tags found
1 merge request!1930Numerous UI improvements
Pipeline #
%ul.center-top-menu.no-top.no-bottom
%ul.center-top-menu.no-top.no-bottom.commit-ci-menu
= nav_link(path: 'commit#show') do
= link_to namespace_project_commit_path(@project.namespace, @project, @commit.id) do
Changes
Loading
Loading
Loading
Loading
@@ -17,7 +17,7 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps
 
step 'I remove label \'bug\'' do
page.within "#label_#{bug_label.id}" do
click_link 'Remove'
click_link 'Delete'
end
end
 
Loading
Loading
@@ -45,21 +45,21 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps
step 'I submit new label \'support\'' do
visit new_admin_label_path
fill_in 'Title', with: 'support'
fill_in 'Background Color', with: '#F95610'
fill_in 'Background color', with: '#F95610'
click_button 'Save'
end
 
step 'I submit new label \'bug\'' do
visit new_admin_label_path
fill_in 'Title', with: 'bug'
fill_in 'Background Color', with: '#F95610'
fill_in 'Background color', with: '#F95610'
click_button 'Save'
end
 
step 'I submit new label with invalid color' do
visit new_admin_label_path
fill_in 'Title', with: 'support'
fill_in 'Background Color', with: '#12'
fill_in 'Background color', with: '#12'
click_button 'Save'
end
 
Loading
Loading
@@ -101,7 +101,7 @@ class Spinach::Features::AdminIssuesLabels < Spinach::FeatureSteps
 
step 'I change label \'bug\' to \'fix\'' do
fill_in 'Title', with: 'fix'
fill_in 'Background Color', with: '#F15610'
fill_in 'Background color', with: '#F15610'
click_button 'Save'
end
 
Loading
Loading
Loading
Loading
@@ -113,7 +113,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end
 
step 'I click status link' do
find('.center-top-menu').click_link "Builds"
find('.commit-ci-menu').click_link "Builds"
end
 
step 'I see builds list' do
Loading
Loading
Loading
Loading
@@ -39,9 +39,9 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
select "fix", from: "merge_request_source_branch"
select "master", from: "merge_request_target_branch"
 
click_button "Compare branches"
click_button "Compare branches and continue"
 
expect(page).to have_content "New merge request"
expect(page).to have_content "New Merge Request"
fill_in "merge_request_title", with: "Merge Request On Forked Project"
end
 
Loading
Loading
@@ -112,7 +112,6 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end
 
step 'I fill out an invalid "Merge Request On Forked Project" merge request' do
select "Select branch", from: "merge_request_target_branch"
expect(find(:select, "merge_request_source_project_id", {}).value).to eq @forked_project.id.to_s
expect(find(:select, "merge_request_target_project_id", {}).value).to eq @project.id.to_s
expect(find(:select, "merge_request_source_branch", {}).value).to eq ""
Loading
Loading
Loading
Loading
@@ -65,20 +65,20 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
step 'I see current user as the first user' do
expect(page).to have_selector('.user-result', visible: true, count: 4)
users = page.all('.user-name')
expect(users[0].text).to eq 'Any'
expect(users[0].text).to eq 'Any Assignee'
expect(users[1].text).to eq 'Unassigned'
expect(users[2].text).to eq current_user.name
end
 
step 'I submit new issue "500 error on profile"' do
fill_in "issue_title", with: "500 error on profile"
click_button "Submit new issue"
click_button "Submit issue"
end
 
step 'I submit new issue "500 error on profile" with label \'bug\'' do
fill_in "issue_title", with: "500 error on profile"
select 'bug', from: "Labels"
click_button "Submit new issue"
click_button "Submit issue"
end
 
step 'I click link "500 error on profile"' do
Loading
Loading
Loading
Loading
@@ -9,7 +9,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
 
step 'I remove label \'bug\'' do
page.within "#label_#{bug_label.id}" do
click_link 'Remove'
click_link 'Delete'
end
end
 
Loading
Loading
Loading
Loading
@@ -63,7 +63,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps
end
 
step 'I click link to remove milestone' do
click_link 'Remove'
click_link 'Delete'
end
 
step 'I should see no milestones' do
Loading
Loading
Loading
Loading
@@ -86,7 +86,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
select "feature", from: "merge_request_target_branch"
click_button "Compare branches"
fill_in "merge_request_title", with: "Wiki Feature"
click_button "Submit new merge request"
click_button "Submit merge request"
end
 
step 'project "Shop" have "Bug NS-04" open merge request' do
Loading
Loading
Loading
Loading
@@ -87,7 +87,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
 
step 'I click link "Diff"' do
click_link 'Preview changes'
click_link 'Preview Changes'
end
 
step 'I click on "Commit Changes"' do
Loading
Loading
@@ -142,7 +142,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
 
step 'I can see new file page' do
expect(page).to have_content "Create New File"
expect(page).to have_content "New File"
expect(page).to have_content "Commit message"
end
 
Loading
Loading
@@ -192,7 +192,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
 
step 'I see Browse dir link' do
expect(page).to have_link 'Browse Dir »'
expect(page).to have_link 'Browse Directory »'
expect(page).not_to have_link 'Browse Code »'
end
 
Loading
Loading
@@ -204,13 +204,13 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
 
step 'I see Browse file link' do
expect(page).to have_link 'Browse File »'
expect(page).not_to have_link 'Browse Code »'
expect(page).not_to have_link 'Browse Files »'
end
 
step 'I see Browse code link' do
expect(page).to have_link 'Browse Code »'
expect(page).to have_link 'Browse Files »'
expect(page).not_to have_link 'Browse File »'
expect(page).not_to have_link 'Browse Dir »'
expect(page).not_to have_link 'Browse Directory »'
end
 
step 'I click on Permalink' do
Loading
Loading
Loading
Loading
@@ -238,7 +238,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
 
step 'I see new wiki page named test' do
expect(current_path).to eq namespace_project_wiki_path(@project.namespace, @project, "test")
expect(page).to have_content "Editing"
expect(page).to have_content "Edit Page test"
end
 
When 'I go back to wiki page home' do
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
include SharedPaths
 
step 'I click on the Cancel button' do
page.within(:css, ".form-actions") do
page.within(:css, ".wiki-form .form-actions") do
click_on "Cancel"
end
end
Loading
Loading
@@ -24,7 +24,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
expect(page).to have_content "link test"
 
click_link "link test"
expect(page).to have_content "Editing"
expect(page).to have_content "Edit Page"
end
 
step 'I have an existing Wiki page' do
Loading
Loading
@@ -68,7 +68,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
end
 
step 'I click on the "Delete this page" button' do
click_on "Delete this page"
click_on "Delete"
end
 
step 'The page should be deleted' do
Loading
Loading
@@ -120,13 +120,13 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
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('Editing - image.jpg')
expect(page).to have_content('Edit Page image.jpg')
end
 
step 'I create a New page with paths' do
click_on 'New Page'
fill_in 'Page slug', with: 'one/two/three'
click_on 'Build'
click_on 'Create Page'
fill_in "wiki_content", with: 'wiki content'
click_on "Create page"
expect(current_path).to include 'one/two/three'
Loading
Loading
@@ -135,7 +135,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
step 'I create a New page with an invalid name' do
click_on 'New Page'
fill_in 'Page slug', with: 'invalid name'
click_on 'Build'
click_on 'Create Page'
end
 
step 'I should see an error message' do
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