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
Jérome Perrin
gitlab-ce
Commits
61bdc80d
Commit
61bdc80d
authored
Aug 12, 2016
by
Phil Hughes
Committed by
Alfredo Sumaran
Aug 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated failing tests
parent
59955fbb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
7 deletions
+27
-7
app/assets/javascripts/issuable.js
app/assets/javascripts/issuable.js
+4
-7
features/steps/dashboard/dashboard.rb
features/steps/dashboard/dashboard.rb
+1
-0
features/steps/dashboard/event_filters.rb
features/steps/dashboard/event_filters.rb
+10
-0
features/steps/project/source/browse_files.rb
features/steps/project/source/browse_files.rb
+1
-0
features/support/wait_for_ajax.rb
features/support/wait_for_ajax.rb
+11
-0
No files found.
app/assets/javascripts/issuable.js
View file @
61bdc80d
...
...
@@ -5,13 +5,10 @@
this
.
Issuable
=
{
init
:
function
()
{
if
(
!
issuable_created
)
{
issuable_created
=
true
;
Issuable
.
initTemplates
();
Issuable
.
initSearch
();
Issuable
.
initChecks
();
return
Issuable
.
initLabelFilterRemove
();
}
Issuable
.
initTemplates
();
Issuable
.
initSearch
();
Issuable
.
initChecks
();
return
Issuable
.
initLabelFilterRemove
();
},
initTemplates
:
function
()
{
return
Issuable
.
labelRow
=
_
.
template
(
'
<% _.each(labels, function(label){ %> <span class="label-row btn-group" role="group" aria-label="<%- label.title %>" style="color: <%- label.text_color %>;"> <a href="#" class="btn btn-transparent has-tooltip" style="background-color: <%- label.color %>;" title="<%- label.description %>" data-container="body"> <%- label.title %> </a> <button type="button" class="btn btn-transparent label-remove js-label-filter-remove" style="background-color: <%- label.color %>;" data-label="<%- label.title %>"> <i class="fa fa-times"></i> </button> </span> <% }); %>
'
);
...
...
features/steps/dashboard/dashboard.rb
View file @
61bdc80d
...
...
@@ -26,6 +26,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
end
step
'I see prefilled new Merge Request page'
do
expect
(
page
).
to
have_selector
(
'.merge-request-form'
)
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"
...
...
features/steps/dashboard/event_filters.rb
View file @
61bdc80d
class
Spinach::Features::EventFilters
<
Spinach
::
FeatureSteps
include
WaitForAjax
include
SharedAuthentication
include
SharedPaths
include
SharedProject
step
'I should see push event'
do
wait_for_ajax
sleep
1
expect
(
page
).
to
have_selector
(
'span.pushed'
)
end
step
'I should not see push event'
do
wait_for_ajax
save_and_open_screenshot
sleep
1
save_and_open_screenshot
expect
(
page
).
not_to
have_selector
(
'span.pushed'
)
save_and_open_screenshot
end
step
'I should see new member event'
do
wait_for_ajax
sleep
1
expect
(
page
).
to
have_selector
(
'span.joined'
)
end
step
'I should not see new member event'
do
wait_for_ajax
sleep
1
expect
(
page
).
not_to
have_selector
(
'span.joined'
)
end
step
'I should see merge request event'
do
wait_for_ajax
sleep
1
expect
(
page
).
to
have_selector
(
'span.accepted'
)
end
step
'I should not see merge request event'
do
wait_for_ajax
sleep
1
expect
(
page
).
not_to
have_selector
(
'span.accepted'
)
end
...
...
features/steps/project/source/browse_files.rb
View file @
61bdc80d
...
...
@@ -132,6 +132,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
step
'I click on "New file" link in repo'
do
find
(
'.add-to-tree'
).
click
click_link
'New file'
expect
(
page
).
to
have_selector
(
'.file-editor'
)
end
step
'I click on "Upload file" link in repo'
do
...
...
features/support/wait_for_ajax.rb
0 → 100644
View file @
61bdc80d
module
WaitForAjax
def
wait_for_ajax
Timeout
.
timeout
(
Capybara
.
default_max_wait_time
)
do
loop
until
finished_all_ajax_requests?
end
end
def
finished_all_ajax_requests?
page
.
evaluate_script
(
'jQuery.active'
).
zero?
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