Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
047a7600
Commit
047a7600
authored
Jan 11, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove chosen from tests
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
4434f93a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
30 deletions
+9
-30
features/steps/project/project_forked_merge_requests.rb
features/steps/project/project_forked_merge_requests.rb
+4
-4
features/steps/project/project_network_graph.rb
features/steps/project/project_network_graph.rb
+4
-4
features/support/env.rb
features/support/env.rb
+1
-1
spec/support/chosen_helper.rb
spec/support/chosen_helper.rb
+0
-21
No files found.
features/steps/project/project_forked_merge_requests.rb
View file @
047a7600
...
...
@@ -42,14 +42,14 @@ class ProjectForkedMergeRequests < Spinach::FeatureSteps
end
step
'I fill out a "Merge Request On Forked Project" merge request'
do
chosen
@forked_project
.
id
,
from:
"#merge_request_source_project_id"
chosen
@project
.
id
,
from:
"#merge_request_target_project_id"
select2
@forked_project
.
id
,
from:
"#merge_request_source_project_id"
select2
@project
.
id
,
from:
"#merge_request_target_project_id"
find
(
:select
,
"merge_request_source_project_id"
,
{}).
value
.
should
==
@forked_project
.
id
.
to_s
find
(
:select
,
"merge_request_target_project_id"
,
{}).
value
.
should
==
@project
.
id
.
to_s
chosen
"master"
,
from:
"#merge_request_source_branch"
chosen
"stable"
,
from:
"#merge_request_target_branch"
select2
"master"
,
from:
"#merge_request_source_branch"
select2
"stable"
,
from:
"#merge_request_target_branch"
find
(
:select
,
"merge_request_source_branch"
,
{}).
value
.
should
==
'master'
find
(
:select
,
"merge_request_target_branch"
,
{}).
value
.
should
==
'stable'
...
...
features/steps/project/project_network_graph.rb
View file @
047a7600
...
...
@@ -15,11 +15,11 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
end
And
'page should select "master" in select box'
do
page
.
should
have_selector
'.
chosen-single spa
n'
,
text:
"master"
page
.
should
have_selector
'.
select2-chose
n'
,
text:
"master"
end
And
'page should select "v2.1.0" in select box'
do
page
.
should
have_selector
'.
chosen-single spa
n'
,
text:
"v2.1.0"
page
.
should
have_selector
'.
select2-chose
n'
,
text:
"v2.1.0"
end
And
'page should have "master" on graph'
do
...
...
@@ -56,11 +56,11 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
end
And
'page should select "stable" in select box'
do
page
.
should
have_selector
'.
chosen-single spa
n'
,
text:
"stable"
page
.
should
have_selector
'.
select2-chose
n'
,
text:
"stable"
end
And
'page should select "v2.1.0" in select box'
do
page
.
should
have_selector
'.
chosen-single spa
n'
,
text:
"v2.1.0"
page
.
should
have_selector
'.
select2-chose
n'
,
text:
"v2.1.0"
end
And
'page should have "stable" on graph'
do
...
...
features/support/env.rb
View file @
047a7600
...
...
@@ -15,7 +15,7 @@ require 'spinach/capybara'
require
'sidekiq/testing/inline'
%w(valid_commit big_commits select2_helper
chosen_helper
test_env)
.
each
do
|
f
|
%w(valid_commit big_commits select2_helper test_env)
.
each
do
|
f
|
require
Rails
.
root
.
join
(
'spec'
,
'support'
,
f
)
end
...
...
spec/support/chosen_helper.rb
deleted
100644 → 0
View file @
4434f93a
# Chosen programmatic helper
# It allows you to select value from chosen select
#
# Params
# value - real value of selected item
# opts - options containing css selector
#
# Usage:
#
# chosen(2, from: '#user_ids')
#
module
ChosenHelper
def
chosen
(
value
,
options
=
{})
raise
"Must pass a hash containing 'from'"
if
not
options
.
is_a?
(
Hash
)
or
not
options
.
has_key?
(
:from
)
selector
=
options
[
:from
]
page
.
execute_script
(
"$('
#{
selector
}
').val('
#{
value
}
').trigger('chosen:updated');"
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment