Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-03-09 16:34:39 +0300
committerPhil Hughes <me@iamphill.com>2016-03-10 16:54:54 +0300
commit8d7e0f0ba93be42119f1c497f280353a13065c85 (patch)
tree84a516487fd10e95bf125c2b0a13cda212757383 /features/steps
parenta9ea06ed2967e67d102c83e2bd6c9653778e64bc (diff)
Fixed failing tests
Diffstat (limited to 'features/steps')
-rw-r--r--features/steps/dashboard/issues.rb17
-rw-r--r--features/steps/dashboard/merge_requests.rb17
-rw-r--r--features/steps/project/issues/filter_labels.rb5
-rw-r--r--features/steps/project/issues/issues.rb11
4 files changed, 36 insertions, 14 deletions
diff --git a/features/steps/dashboard/issues.rb b/features/steps/dashboard/issues.rb
index cbe54e2dc79..d723300f485 100644
--- a/features/steps/dashboard/issues.rb
+++ b/features/steps/dashboard/issues.rb
@@ -36,13 +36,22 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
end
step 'I click "Authored by me" link' do
- select2(current_user.id, from: "#author_id")
- select2(nil, from: "#assignee_id")
+ execute_script('$("#assignee_id").val("")')
+ execute_script('$(".js-user-search").first().click()')
+ sleep 1
+ execute_script("$('.dropdown-content li:contains(\"#{current_user.to_reference}\") a').click()")
+ sleep 1
end
step 'I click "All" link' do
- select2(nil, from: "#author_id")
- select2(nil, from: "#assignee_id")
+ execute_script('$(".js-user-search").first().click()')
+ sleep 1
+ execute_script('$(".js-user-search").first().parent().find("li a").first().click()')
+ sleep 1
+ execute_script('$(".js-user-search").eq(1).click()')
+ sleep 1
+ execute_script('$(".js-user-search").eq(1).parent().find("li a").first().click()')
+ sleep 1
end
def should_see(issue)
diff --git a/features/steps/dashboard/merge_requests.rb b/features/steps/dashboard/merge_requests.rb
index 28c8c6b6015..7fc0e444e86 100644
--- a/features/steps/dashboard/merge_requests.rb
+++ b/features/steps/dashboard/merge_requests.rb
@@ -40,13 +40,22 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
end
step 'I click "Authored by me" link' do
- select2(current_user.id, from: "#author_id")
- select2(nil, from: "#assignee_id")
+ execute_script('$("#assignee_id").val("")')
+ execute_script('$(".js-user-search").first().click()')
+ sleep 0.5
+ execute_script("$('.dropdown-content li:contains(\"#{current_user.to_reference}\") a').click()")
+ sleep 2
end
step 'I click "All" link' do
- select2(nil, from: "#author_id")
- select2(nil, from: "#assignee_id")
+ execute_script('$(".js-user-search").first().click()')
+ sleep 0.5
+ execute_script('$(".js-user-search").first().parent().find("li a").first().click()')
+ sleep 2
+ execute_script('$(".js-user-search").eq(1).click()')
+ sleep 0.5
+ execute_script('$(".js-user-search").eq(1).parent().find("li a").first().click()')
+ sleep 2
end
def should_see(merge_request)
diff --git a/features/steps/project/issues/filter_labels.rb b/features/steps/project/issues/filter_labels.rb
index 50bb32429b9..6d50501a722 100644
--- a/features/steps/project/issues/filter_labels.rb
+++ b/features/steps/project/issues/filter_labels.rb
@@ -29,7 +29,10 @@ class Spinach::Features::ProjectIssuesFilterLabels < Spinach::FeatureSteps
end
step 'I click link "bug"' do
- select2('bug', from: "#label_name")
+ page.find('.js-label-select').click
+ sleep 0.5
+ execute_script("$('.dropdown-menu-labels li:contains(\"bug\") a').click()")
+ sleep 2
end
step 'I click link "feature"' do
diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb
index d9842ccf95e..383ab4e14da 100644
--- a/features/steps/project/issues/issues.rb
+++ b/features/steps/project/issues/issues.rb
@@ -27,7 +27,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
step 'I click link "Closed"' do
- click_link "Closed"
+ find('.issues-state-filters a', text: "Closed").click
end
step 'I click button "Unsubscribe"' do
@@ -63,14 +63,15 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
end
step 'I click "author" dropdown' do
- first('#s2id_author_id').click
+ page.find('.js-author-search').click
+ sleep 1
end
step 'I see current user as the first user' do
- expect(page).to have_selector('.user-result', visible: true, count: 3)
- users = page.all('.user-name')
+ expect(page).to have_selector('.dropdown-content', visible: true)
+ users = page.all('.dropdown-menu-author .dropdown-content li a')
expect(users[0].text).to eq 'Any Author'
- expect(users[1].text).to eq current_user.name
+ expect(users[1].text).to eq "#{current_user.name} #{current_user.to_reference}"
end
step 'I submit new issue "500 error on profile"' do