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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
654f7fe8
Commit
654f7fe8
authored
Jan 26, 2019
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wait for requests in specs before interacting with select2
parent
49c12f9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
spec/features/projects/settings/user_changes_default_branch_spec.rb
...res/projects/settings/user_changes_default_branch_spec.rb
+0
-3
spec/support/helpers/select2_helper.rb
spec/support/helpers/select2_helper.rb
+4
-0
No files found.
spec/features/projects/settings/user_changes_default_branch_spec.rb
View file @
654f7fe8
...
...
@@ -15,9 +15,6 @@ describe 'Projects > Settings > User changes default branch' do
let
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
user
.
namespace
)
}
it
'allows to change the default branch'
,
:js
do
# Otherwise, running JS may overwrite our change to project_default_branch
wait_for_requests
select2
(
'fix'
,
from:
'#project_default_branch'
)
page
.
within
'#default-branch-settings'
do
...
...
spec/support/helpers/select2_helper.rb
View file @
654f7fe8
...
...
@@ -11,9 +11,13 @@
#
module
Select2Helper
include
WaitForRequests
def
select2
(
value
,
options
=
{})
raise
ArgumentError
,
'options must be a Hash'
unless
options
.
is_a?
(
Hash
)
wait_for_requests
unless
options
[
:async
]
selector
=
options
.
fetch
(
:from
)
first
(
selector
,
visible:
false
)
...
...
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