BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
5854ab2f
Commit
5854ab2f
authored
Jun 16, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert variants of trigger('click') -> click
parent
bece18aa
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
82 additions
and
82 deletions
+82
-82
dashboard.rb
features/steps/dashboard/dashboard.rb
+1
-1
todos.rb
features/steps/dashboard/todos.rb
+3
-3
notifications.rb
features/steps/profile/notifications.rb
+1
-1
merge_requests.rb
features/steps/project/merge_requests.rb
+6
-6
search.rb
features/steps/search.rb
+4
-4
diff_note.rb
features/steps/shared/diff_note.rb
+3
-3
sidebar_spec.rb
spec/features/boards/sidebar_spec.rb
+2
-2
active_tab_spec.rb
spec/features/dashboard/active_tab_spec.rb
+1
-1
group_spec.rb
spec/features/dashboard/group_spec.rb
+1
-1
groups_list_spec.rb
spec/features/dashboard/groups_list_spec.rb
+3
-3
issues_spec.rb
spec/features/dashboard/issues_spec.rb
+1
-1
merge_requests_spec.rb
spec/features/dashboard/merge_requests_spec.rb
+1
-1
new_menu_spec.rb
spec/features/explore/new_menu_spec.rb
+5
-5
recent_searches_spec.rb
spec/features/issues/filtered_search/recent_searches_spec.rb
+2
-2
issue_sidebar_spec.rb
spec/features/issues/issue_sidebar_spec.rb
+1
-1
issues_spec.rb
spec/features/issues_spec.rb
+1
-1
conflicts_spec.rb
spec/features/merge_requests/conflicts_spec.rb
+1
-1
diff_notes_avatars_spec.rb
spec/features/merge_requests/diff_notes_avatars_spec.rb
+1
-1
diff_notes_resolve_spec.rb
spec/features/merge_requests/diff_notes_resolve_spec.rb
+1
-1
mini_pipeline_graph_spec.rb
spec/features/merge_requests/mini_pipeline_graph_spec.rb
+1
-1
user_posts_diff_notes_spec.rb
spec/features/merge_requests/user_posts_diff_notes_spec.rb
+2
-2
versions_spec.rb
spec/features/merge_requests/versions_spec.rb
+2
-2
preferences_spec.rb
spec/features/profiles/preferences_spec.rb
+1
-1
branches_spec.rb
spec/features/projects/branches_spec.rb
+2
-2
group_links_spec.rb
spec/features/projects/group_links_spec.rb
+1
-1
jobs_spec.rb
spec/features/projects/jobs_spec.rb
+1
-1
pipeline_spec.rb
spec/features/projects/pipelines/pipeline_spec.rb
+6
-6
pipelines_spec.rb
spec/features/projects/pipelines/pipelines_spec.rb
+6
-6
jira_service_spec.rb
spec/features/projects/services/jira_service_spec.rb
+1
-1
markdown_preview_spec.rb
spec/features/projects/wiki/markdown_preview_spec.rb
+3
-3
user_creates_wiki_page_spec.rb
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
+1
-1
protected_branches_spec.rb
spec/features/protected_branches_spec.rb
+1
-1
search_spec.rb
spec/features/search_spec.rb
+4
-4
master_creates_tag_spec.rb
spec/features/tags/master_creates_tag_spec.rb
+1
-1
todos_spec.rb
spec/features/todos/todos_spec.rb
+3
-3
user_callout_spec.rb
spec/features/user_callout_spec.rb
+1
-1
discussion_comments_shared_example.rb
spec/support/features/discussion_comments_shared_example.rb
+2
-2
access_control_ce_shared_examples.rb
...t/protected_branches/access_control_ce_shared_examples.rb
+1
-1
access_control_ce_shared_examples.rb
...pport/protected_tags/access_control_ce_shared_examples.rb
+1
-1
quick_actions_helpers.rb
spec/support/quick_actions_helpers.rb
+1
-1
time_tracking_shared_examples.rb
spec/support/time_tracking_shared_examples.rb
+1
-1
No files found.
features/steps/dashboard/dashboard.rb
View file @
5854ab2f
...
...
@@ -22,7 +22,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
end
step
'I click "Create merge request" link'
do
find_link
(
"Create merge request"
,
visible:
false
).
trigger
(
'click'
)
find_link
(
"Create merge request"
,
visible:
false
).
click
end
step
'I see prefilled new Merge Request page'
do
...
...
features/steps/dashboard/todos.rb
View file @
5854ab2f
...
...
@@ -55,7 +55,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
merge_request_reference
=
merge_request
.
to_reference
(
full:
true
)
issue_reference
=
issue
.
to_reference
(
full:
true
)
find
(
'.js-todos-mark-all'
).
trigger
(
'click'
)
find
(
'.js-todos-mark-all'
).
click
page
.
within
(
'.todos-count'
)
{
expect
(
page
).
to
have_content
'0'
}
expect
(
page
).
to
have_content
'To do 0'
...
...
@@ -69,7 +69,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
end
step
'I should see the todo marked as done'
do
find
(
'.todos-done a'
).
trigger
(
'click'
)
find
(
'.todos-done a'
).
click
expect
(
page
).
to
have_link
project
.
name_with_namespace
should_see_todo
(
1
,
"John Doe assigned you merge request
#{
merge_request
.
to_reference
(
full:
true
)
}
"
,
merge_request
.
title
,
state: :done_irreversible
)
...
...
@@ -79,7 +79,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
merge_request_reference
=
merge_request
.
to_reference
(
full:
true
)
issue_reference
=
issue
.
to_reference
(
full:
true
)
find
(
'.todos-done a'
).
trigger
(
'click'
)
find
(
'.todos-done a'
).
click
expect
(
page
).
to
have_link
project
.
name_with_namespace
should_see_todo
(
1
,
"John Doe assigned you merge request
#{
merge_request_reference
}
"
,
merge_request
.
title
,
state: :done_irreversible
)
...
...
features/steps/profile/notifications.rb
View file @
5854ab2f
...
...
@@ -11,7 +11,7 @@ class Spinach::Features::ProfileNotifications < Spinach::FeatureSteps
end
step
'I select Mention setting from dropdown'
do
first
(
:link
,
"On mention"
).
trigger
(
'click'
)
first
(
:link
,
"On mention"
).
click
end
step
'I should see Notification saved message'
do
...
...
features/steps/project/merge_requests.rb
View file @
5854ab2f
...
...
@@ -34,7 +34,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step
'I click link "Merged"'
do
find
(
'#state-merged'
).
trigger
(
'click'
)
find
(
'#state-merged'
).
click
end
step
'I click link "Closed"'
do
...
...
@@ -336,7 +336,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step
'I click on the Discussion tab'
do
page
.
within
'.merge-request-tabs'
do
find
(
'.notes-tab'
).
trigger
(
'click'
)
find
(
'.notes-tab'
).
click
end
# Waits for load
...
...
@@ -420,7 +420,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step
'I click link "Reopen"'
do
first
(
:css
,
'.reopen-mr-link'
).
trigger
(
'click'
)
first
(
:css
,
'.reopen-mr-link'
).
click
end
step
'I should see reopened merge request "Bug NS-04"'
do
...
...
@@ -432,13 +432,13 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step
'I click link "Hide inline discussion" of the third file'
do
page
.
within
'.files>div:nth-child(3)'
do
find
(
'.js-toggle-diff-comments'
).
trigger
(
'click'
)
find
(
'.js-toggle-diff-comments'
).
click
end
end
step
'I click link "Show inline discussion" of the third file'
do
page
.
within
'.files>div:nth-child(3)'
do
find
(
'.js-toggle-diff-comments'
).
trigger
(
'click'
)
find
(
'.js-toggle-diff-comments'
).
click
end
end
...
...
@@ -510,7 +510,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step
'I click Side-by-side Diff tab'
do
find
(
'a'
,
text:
'Side-by-side'
).
trigger
(
'click'
)
find
(
'a'
,
text:
'Side-by-side'
).
click
# Waits for load
expect
(
page
).
to
have_css
(
'.parallel'
)
...
...
features/steps/search.rb
View file @
5854ab2f
...
...
@@ -10,12 +10,12 @@ class Spinach::Features::Search < Spinach::FeatureSteps
step
'I search for "Foo"'
do
fill_in
"dashboard_search"
,
with:
"Foo"
find
(
'.btn-search'
).
trigger
(
'click'
)
find
(
'.btn-search'
).
click
end
step
'I search for "rspec"'
do
fill_in
"dashboard_search"
,
with:
"rspec"
find
(
'.btn-search'
).
trigger
(
'click'
)
find
(
'.btn-search'
).
click
end
step
'I search for "rspec" on project page'
do
...
...
@@ -25,7 +25,7 @@ class Spinach::Features::Search < Spinach::FeatureSteps
step
'I search for "Wiki content"'
do
fill_in
"dashboard_search"
,
with:
"content"
find
(
'.btn-search'
).
trigger
(
'click'
)
find
(
'.btn-search'
).
click
end
step
'I click "Issues" link'
do
...
...
@@ -35,7 +35,7 @@ class Spinach::Features::Search < Spinach::FeatureSteps
end
step
'I click project "Shop" link'
do
find
(
'.js-search-project-dropdown'
).
trigger
(
'click'
)
find
(
'.js-search-project-dropdown'
).
click
page
.
within
'.project-filter'
do
click_link
project
.
name_with_namespace
end
...
...
features/steps/shared/diff_note.rb
View file @
5854ab2f
...
...
@@ -215,7 +215,7 @@ module SharedDiffNote
end
step
'I click side-by-side diff button'
do
find
(
'#parallel-diff-btn'
).
trigger
(
'click'
)
find
(
'#parallel-diff-btn'
).
click
end
step
'I see side-by-side diff button'
do
...
...
@@ -228,11 +228,11 @@ module SharedDiffNote
def
click_diff_line
(
code
)
find
(
".line_holder[id='
#{
code
}
'] td:nth-of-type(1)"
).
trigger
'mouseover'
find
(
".line_holder[id='
#{
code
}
'] button"
).
trigger
'click'
find
(
".line_holder[id='
#{
code
}
'] button"
).
click
end
def
click_parallel_diff_line
(
code
,
line_type
)
find
(
".line_content.parallel.
#{
line_type
}
[data-line-code='
#{
code
}
']"
).
trigger
'mouseover'
find
(
".line_holder.parallel button[data-line-code='
#{
code
}
']"
).
trigger
'click'
find
(
".line_holder.parallel button[data-line-code='
#{
code
}
']"
).
click
end
end
spec/features/boards/sidebar_spec.rb
View file @
5854ab2f
...
...
@@ -51,7 +51,7 @@ describe 'Issue Boards', feature: true, js: true do
expect
(
page
).
to
have_selector
(
'.issue-boards-sidebar'
)
find
(
'.gutter-toggle'
).
trigger
(
'click'
)
find
(
'.gutter-toggle'
).
click
expect
(
page
).
not_to
have_selector
(
'.issue-boards-sidebar'
)
end
...
...
@@ -155,7 +155,7 @@ describe 'Issue Boards', feature: true, js: true do
end
page
.
within
(
find
(
'.board:nth-child(2)'
))
do
find
(
'.card:nth-child(2)'
).
trigger
(
'click'
)
find
(
'.card:nth-child(2)'
).
click
end
page
.
within
(
'.assignee'
)
do
...
...
spec/features/dashboard/active_tab_spec.rb
View file @
5854ab2f
...
...
@@ -7,7 +7,7 @@ RSpec.describe 'Dashboard Active Tab', js: true, feature: true do
shared_examples
'page has active tab'
do
|
title
|
it
"
#{
title
}
tab"
do
find
(
'.global-dropdown-toggle'
).
trigger
(
'click'
)
find
(
'.global-dropdown-toggle'
).
click
expect
(
page
).
to
have_selector
(
'.global-dropdown-menu li.active'
,
count:
1
)
expect
(
find
(
'.global-dropdown-menu li.active'
)).
to
have_content
(
title
)
end
...
...
spec/features/dashboard/group_spec.rb
View file @
5854ab2f
...
...
@@ -7,7 +7,7 @@ RSpec.describe 'Dashboard Group', feature: true do
it
'creates new group'
,
js:
true
do
visit
dashboard_groups_path
find
(
'.btn-new'
).
trigger
(
'click'
)
find
(
'.btn-new'
).
click
new_path
=
'Samurai'
new_description
=
'Tokugawa Shogunate'
...
...
spec/features/dashboard/groups_list_spec.rb
View file @
5854ab2f
...
...
@@ -74,14 +74,14 @@ describe 'Dashboard Groups page', js: true, feature: true do
expect
(
page
).
not_to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
)
# Collapse
find
(
"#group-
#{
group
.
id
}
"
).
trigger
(
'click'
)
find
(
"#group-
#{
group
.
id
}
"
).
click
expect
(
page
).
not_to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-down"
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
,
count:
1
)
expect
(
page
).
not_to
have_selector
(
"#group-
#{
group
.
id
}
#group-
#{
subgroup
.
id
}
"
)
# Expand
find
(
"#group-
#{
group
.
id
}
"
).
trigger
(
'click'
)
find
(
"#group-
#{
group
.
id
}
"
).
click
expect
(
page
).
to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-down"
,
count:
1
)
expect
(
page
).
not_to
have_selector
(
"#group-
#{
group
.
id
}
.fa-caret-right"
)
...
...
@@ -115,7 +115,7 @@ describe 'Dashboard Groups page', js: true, feature: true do
expect
(
page
).
not_to
have_selector
(
"#group-
#{
group
.
id
}
"
)
# Go to next page
find
(
".gl-pagination .page:not(.active) a"
).
trigger
(
'click'
)
find
(
".gl-pagination .page:not(.active) a"
).
click
wait_for_requests
...
...
spec/features/dashboard/issues_spec.rb
View file @
5854ab2f
...
...
@@ -65,7 +65,7 @@ RSpec.describe 'Dashboard Issues', feature: true do
describe
'new issue dropdown'
do
it
'shows projects only with issues feature enabled'
,
js:
true
do
find
(
'.new-project-item-select-button'
).
trigger
(
'click'
)
find
(
'.new-project-item-select-button'
).
click
page
.
within
(
'.select2-results'
)
do
expect
(
page
).
to
have_content
(
project
.
name_with_namespace
)
...
...
spec/features/dashboard/merge_requests_spec.rb
View file @
5854ab2f
...
...
@@ -17,7 +17,7 @@ describe 'Dashboard Merge Requests' do
end
it
'shows projects only with merge requests feature enabled'
,
js:
true
do
find
(
'.new-project-item-select-button'
).
trigger
(
'click'
)
find
(
'.new-project-item-select-button'
).
click
page
.
within
(
'.select2-results'
)
do
expect
(
page
).
to
have_content
(
project
.
name_with_namespace
)
...
...
spec/features/explore/new_menu_spec.rb
View file @
5854ab2f
...
...
@@ -69,9 +69,9 @@ feature 'Top Plus Menu', feature: true, js: true do
visit
namespace_project_path
(
project
.
namespace
,
project
)
page
.
within
'.header-content'
do
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
find
(
'.header-new-dropdown-toggle'
).
click
expect
(
page
).
to
have_selector
(
'.header-new.dropdown.open'
,
count:
1
)
find
(
'.header-new-project-snippet a'
).
trigger
(
'click'
)
find
(
'.header-new-project-snippet a'
).
click
end
expect
(
page
).
to
have_content
(
'New Snippet'
)
...
...
@@ -91,9 +91,9 @@ feature 'Top Plus Menu', feature: true, js: true do
visit
group_path
(
group
)
page
.
within
'.header-content'
do
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
find
(
'.header-new-dropdown-toggle'
).
click
expect
(
page
).
to
have_selector
(
'.header-new.dropdown.open'
,
count:
1
)
find
(
'.header-new-group-project a'
).
trigger
(
'click'
)
find
(
'.header-new-group-project a'
).
click
end
expect
(
page
).
to
have_content
(
'Project path'
)
...
...
@@ -160,7 +160,7 @@ feature 'Top Plus Menu', feature: true, js: true do
def
click_topmenuitem
(
item_name
)
page
.
within
'.header-content'
do
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
find
(
'.header-new-dropdown-toggle'
).
click
expect
(
page
).
to
have_selector
(
'.header-new.dropdown.open'
,
count:
1
)
click_link
item_name
end
...
...
spec/features/issues/filtered_search/recent_searches_spec.rb
View file @
5854ab2f
...
...
@@ -80,7 +80,7 @@ describe 'Recent searches', js: true, feature: true do
set_recent_searches
(
project_1_local_storage_key
,
'["foo", "bar"]'
)
visit
namespace_project_issues_path
(
project_1
.
namespace
,
project_1
)
all
(
'.filtered-search-history-dropdown-item'
,
visible:
false
)[
0
].
trigger
(
'click'
)
all
(
'.filtered-search-history-dropdown-item'
,
visible:
false
)[
0
].
click
wait_for_filtered_search
(
'foo'
)
expect
(
find
(
'.filtered-search'
).
value
.
strip
).
to
eq
(
'foo'
)
...
...
@@ -94,7 +94,7 @@ describe 'Recent searches', js: true, feature: true do
expect
(
items_before
.
count
).
to
eq
(
1
)
find
(
'.filtered-search-history-clear-button'
,
visible:
false
).
trigger
(
'click'
)
find
(
'.filtered-search-history-clear-button'
,
visible:
false
).
click
items_after
=
all
(
'.filtered-search-history-dropdown-item'
,
visible:
false
)
expect
(
items_after
.
count
).
to
eq
(
0
)
...
...
spec/features/issues/issue_sidebar_spec.rb
View file @
5854ab2f
...
...
@@ -184,7 +184,7 @@ feature 'Issue Sidebar', feature: true do
end
def
open_issue_sidebar
find
(
'aside.right-sidebar.right-sidebar-collapsed .js-sidebar-toggle'
).
trigger
(
'click'
)
find
(
'aside.right-sidebar.right-sidebar-collapsed .js-sidebar-toggle'
).
click
find
(
'aside.right-sidebar.right-sidebar-expanded'
)
end
end
spec/features/issues_spec.rb
View file @
5854ab2f
...
...
@@ -378,7 +378,7 @@ describe 'Issues', feature: true do
it
'changes incoming email address token'
,
js:
true
do
find
(
'.issue-email-modal-btn'
).
click
previous_token
=
find
(
'input#issue_email'
).
value
find
(
'.incoming-email-token-reset'
).
trigger
(
'click'
)
find
(
'.incoming-email-token-reset'
).
click
wait_for_requests
...
...
spec/features/merge_requests/conflicts_spec.rb
View file @
5854ab2f
...
...
@@ -18,7 +18,7 @@ feature 'Merge request conflict resolution', js: true, feature: true do
within
find
(
'.files-wrapper .diff-file'
,
text:
'files/ruby/regex.rb'
)
do
all
(
'button'
,
text:
'Use ours'
).
each
do
|
button
|
button
.
trigger
(
'click'
)
button
.
click
end
end
...
...
spec/features/merge_requests/diff_notes_avatars_spec.rb
View file @
5854ab2f
...
...
@@ -150,7 +150,7 @@ feature 'Diff note avatars', feature: true, js: true do
page
.
within
'.js-discussion-note-form'
do
find
(
'.js-note-text'
).
native
.
send_keys
(
'Test'
)
find
(
'.js-comment-button'
).
trigger
'click'
find
(
'.js-comment-button'
).
click
wait_for_requests
end
...
...
spec/features/merge_requests/diff_notes_resolve_spec.rb
View file @
5854ab2f
...
...
@@ -275,7 +275,7 @@ feature 'Diff notes resolve', feature: true, js: true do
end
page
.
within
'.line-resolve-all-container'
do
page
.
find
(
'.discussion-next-btn'
).
trigger
(
'click'
)
page
.
find
(
'.discussion-next-btn'
).
click
end
expect
(
page
.
evaluate_script
(
"$('body').scrollTop()"
)).
to
be
>
0
...
...
spec/features/merge_requests/mini_pipeline_graph_spec.rb
View file @
5854ab2f
...
...
@@ -90,7 +90,7 @@ feature 'Mini Pipeline Graph', :js, :feature do
end
it
'should close when toggle is clicked again'
do
toggle
.
trigger
(
'click'
)
toggle
.
click
expect
(
toggle
.
find
(
:xpath
,
'..'
)).
not_to
have_selector
(
'.mini-pipeline-graph-dropdown-menu'
)
end
...
...
spec/features/merge_requests/user_posts_diff_notes_spec.rb
View file @
5854ab2f
...
...
@@ -221,7 +221,7 @@ feature 'Merge requests > User posts diff notes', :js do
def
should_allow_dismissing_a_comment
(
line_holder
,
diff_side
=
nil
)
write_comment_on_line
(
line_holder
,
diff_side
)
find
(
'.js-close-discussion-note-form'
).
trigger
(
'click'
)
find
(
'.js-close-discussion-note-form'
).
click
assert_comment_dismissal
(
line_holder
)
end
...
...
@@ -259,7 +259,7 @@ feature 'Merge requests > User posts diff notes', :js do
expect
(
line
[
:num
]).
to
have_css
comment_button_class
line
[
:num
].
find
(
comment_button_class
).
trigger
'click'
line
[
:num
].
find
(
comment_button_class
).
click
end
def
write_comment_on_line
(
line_holder
,
diff_side
)
...
...
spec/features/merge_requests/versions_spec.rb
View file @
5854ab2f
...
...
@@ -68,7 +68,7 @@ feature 'Merge Request versions', js: true, feature: true do
page
.
within
(
diff_file_selector
)
do
find
(
".line_holder[id='
#{
line_code
}
'] td:nth-of-type(1)"
).
trigger
'mouseover'
find
(
".line_holder[id='
#{
line_code
}
'] button"
).
trigger
'click'
find
(
".line_holder[id='
#{
line_code
}
'] button"
).
click
page
.
within
(
"form[data-line-code='
#{
line_code
}
']"
)
do
fill_in
"note[note]"
,
with:
"Typo, please fix"
...
...
@@ -139,7 +139,7 @@ feature 'Merge Request versions', js: true, feature: true do
page
.
within
(
diff_file_selector
)
do
find
(
".line_holder[id='
#{
line_code
}
'] td:nth-of-type(1)"
).
trigger
'mouseover'
find
(
".line_holder[id='
#{
line_code
}
'] button"
).
trigger
'click'
find
(
".line_holder[id='
#{
line_code
}
'] button"
).
click
page
.
within
(
"form[data-line-code='
#{
line_code
}
']"
)
do
fill_in
"note[note]"
,
with:
"Typo, please fix"
...
...
spec/features/profiles/preferences_spec.rb
View file @
5854ab2f
...
...
@@ -44,7 +44,7 @@ describe 'Profile > Preferences', feature: true do
expect
(
page
.
current_path
).
to
eq
starred_dashboard_projects_path
end
find
(
'.shortcuts-activity'
).
trigger
(
'click'
)
find
(
'.shortcuts-activity'
).
click
expect
(
page
).
not_to
have_content
(
"You don't have starred projects yet"
)
expect
(
page
.
current_path
).
to
eq
dashboard_projects_path
...
...
spec/features/projects/branches_spec.rb
View file @
5854ab2f
...
...
@@ -55,7 +55,7 @@ describe 'Branches', feature: true do
expect
(
page
).
to
have_content
(
'fix'
)
expect
(
find
(
'.all-branches'
)).
to
have_selector
(
'li'
,
count:
1
)
find
(
'.js-branch-fix .btn-remove'
).
trigger
(
:click
)
find
(
'.js-branch-fix .btn-remove'
).
click
expect
(
page
).
not_to
have_content
(
'fix'
)
expect
(
find
(
'.all-branches'
)).
to
have_selector
(
'li'
,
count:
0
)
...
...
@@ -109,7 +109,7 @@ describe 'Branches', feature: true do
expect
(
page
).
to
have_content
(
'fix'
)
expect
(
find
(
'.all-branches'
)).
to
have_selector
(
'li'
,
count:
1
)
page
.
find
(
'[data-target="#modal-delete-branch"]'
).
trigger
(
:click
)
page
.
find
(
'[data-target="#modal-delete-branch"]'
).
click
expect
(
page
).
to
have_css
(
'.js-delete-branch[disabled]'
)
fill_in
'delete_branch_input'
,
with:
'fix'
...
...
spec/features/projects/group_links_spec.rb
View file @
5854ab2f
...
...
@@ -21,7 +21,7 @@ feature 'Project group links', :feature, :js do
select2
group
.
id
,
from:
'#link_group_id'
fill_in
'expires_at_groups'
,
with:
(
Time
.
current
+
4.5
.
days
).
strftime
(
'%Y-%m-%d'
)
page
.
find
(
'body'
).
click
find
(
'.btn-create'
).
trigger
(
'click'
)
find
(
'.btn-create'
).
click
end
it
'shows the expiration time with a warning class'
do
...
...
spec/features/projects/jobs_spec.rb
View file @
5854ab2f
...
...
@@ -375,7 +375,7 @@ feature 'Jobs', :feature do
job
.
run!
visit
namespace_project_job_path
(
project
.
namespace
,
project
,
job
)
find
(
'.js-cancel-job'
).
click
()
find
(
'.js-retry-button'
).
trigger
(
'click'
)
find
(
'.js-retry-button'
).
click
end
it
'shows the right status and buttons'
,
:js
do
...
...
spec/features/projects/pipelines/pipeline_spec.rb
View file @
5854ab2f
...
...
@@ -75,7 +75,7 @@ describe 'Pipeline', :feature, :js do
end
it
'should be possible to cancel the running build'
do
find
(
'#ci-badge-deploy .ci-action-icon-container'
).
trigger
(
'click'
)
find
(
'#ci-badge-deploy .ci-action-icon-container'
).
click
expect
(
page
).
not_to
have_content
(
'Cancel running'
)
end
...
...
@@ -94,7 +94,7 @@ describe 'Pipeline', :feature, :js do
end
it
'should be possible to retry the success job'
do
find
(
'#ci-badge-build .ci-action-icon-container'
).
trigger
(
'click'
)
find
(
'#ci-badge-build .ci-action-icon-container'
).
click
expect
(
page
).
not_to
have_content
(
'Retry job'
)
end
...
...
@@ -113,7 +113,7 @@ describe 'Pipeline', :feature, :js do
end
it
'should be possible to retry the failed build'
do
find
(
'#ci-badge-test .ci-action-icon-container'
).
trigger
(
'click'
)
find
(
'#ci-badge-test .ci-action-icon-container'
).
click
expect
(
page
).
not_to
have_content
(
'Retry job'
)
end
...
...
@@ -132,7 +132,7 @@ describe 'Pipeline', :feature, :js do
end
it
'should be possible to play the manual job'
do
find
(
'#ci-badge-manual-build .ci-action-icon-container'
).
trigger
(
'click'
)
find
(
'#ci-badge-manual-build .ci-action-icon-container'
).
click
expect
(
page
).
not_to
have_content
(
'Play job'
)
end
...
...
@@ -167,7 +167,7 @@ describe 'Pipeline', :feature, :js do
context
'when retrying'
do
before
do
find
(
'.js-retry-button'
).
trigger
(
'click'
)
find
(
'.js-retry-button'
).
click
end
it
{
expect
(
page
).
not_to
have_content
(
'Retry'
)
}
...
...
@@ -233,7 +233,7 @@ describe 'Pipeline', :feature, :js do
context
'when retrying'
do
before
do
find
(
'.js-retry-button'
).
trigger
(
'click'
)
find
(
'.js-retry-button'
).
click
end
it
{
expect
(
page
).
not_to
have_content
(
'Retry'
)
}
...
...
spec/features/projects/pipelines/pipelines_spec.rb
View file @
5854ab2f
...
...
@@ -222,7 +222,7 @@ describe 'Pipelines', :feature, :js do
context
'when canceling'
do
before
do
find
(
'.js-pipelines-cancel-button'
).
trigger
(
'click'
)
find
(
'.js-pipelines-cancel-button'
).
click
end
it
'indicates that pipeline was canceled'
do
...
...
@@ -335,14 +335,14 @@ describe 'Pipelines', :feature, :js do
context
'when clicking a stage badge'
do
it
'should open a dropdown'
do
find
(
'.js-builds-dropdown-button'
).
trigger
(
'click'
)
find
(
'.js-builds-dropdown-button'
).
click
expect
(
page
).
to
have_link
build
.
name
end
it
'should be possible to cancel pending build'
do
find
(
'.js-builds-dropdown-button'
).
trigger
(
'click'
)
find
(
'a.js-ci-action-icon'
).
trigger
(
'click'
)
find
(
'.js-builds-dropdown-button'
).
click
find
(
'a.js-ci-action-icon'
).
click
expect
(
page
).
to
have_content
(
'canceled'
)
expect
(
build
.
reload
).
to
be_canceled
...
...
@@ -351,11 +351,11 @@ describe 'Pipelines', :feature, :js do
context
'dropdown jobs list'
do
it
'should keep the dropdown open when the user ctr/cmd + clicks in the job name'
do
find
(
'.js-builds-dropdown-button'
).
trigger
(
'click'
)
find
(
'.js-builds-dropdown-button'
).
click
execute_script
(
'var e = $.Event("keydown", { keyCode: 64 }); $("body").trigger(e);'
)
find
(
'.mini-pipeline-graph-dropdown-item'
).
trigger
(
'click'
)
find
(
'.mini-pipeline-graph-dropdown-item'
).
click
expect
(
page
).
to
have_selector
(
'.js-ci-action-icon'
)
end
...
...
spec/features/projects/services/jira_service_spec.rb
View file @
5854ab2f
...
...
@@ -68,7 +68,7 @@ feature 'Setup Jira service', :feature, :js do
expect
(
find
(
'.flash-container-page'
)).
to
have_content
'Test failed.'
expect
(
find
(
'.flash-container-page'
)).
to
have_content
'Save anyway'
find
(
'.flash-alert .flash-action'
).
trigger
(
'click'
)
find
(
'.flash-alert .flash-action'
).
click
wait_for_requests
expect
(
page
).
to
have_content
(
'JIRA activated.'
)
...
...
spec/features/projects/wiki/markdown_preview_spec.rb
View file @
5854ab2f
...
...
@@ -19,13 +19,13 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t
login_as
(
user
)
visit
namespace_project_path
(
project
.
namespace
,
project
)
find
(
'.shortcuts-wiki'
).
trigger
(
'click'
)
find
(
'.shortcuts-wiki'
).
click
end
context
"while creating a new wiki page"
do
context
"when there are no spaces or hyphens in the page name"
do
it
"rewrites relative links as expected"
do
find
(
'.add-new-wiki'
).
trigger
(
'click'
)
find
(
'.add-new-wiki'
).
click
page
.
within
'#modal-new-wiki'
do
fill_in
:new_wiki_path
,
with:
'a/b/c/d'
click_button
'Create page'
...
...
@@ -92,7 +92,7 @@ feature 'Projects > Wiki > User previews markdown changes', feature: true, js: t
context
"while editing a wiki page"
do
def
create_wiki_page
(
path
)
find
(
'.add-new-wiki'
).
trigger
(
'click'
)
find
(
'.add-new-wiki'
).
click
page
.
within
'#modal-new-wiki'
do
fill_in
:new_wiki_path
,
with:
path
...
...
spec/features/projects/wiki/user_creates_wiki_page_spec.rb
View file @
5854ab2f
...
...
@@ -8,7 +8,7 @@ feature 'Projects > Wiki > User creates wiki page', js: true, feature: true do
login_as
(
user
)
visit
namespace_project_path
(
project
.
namespace
,
project
)
find
(
'.shortcuts-wiki'
).
trigger
(
'click'
)
find
(
'.shortcuts-wiki'
).
click
end
context
'in the user namespace'
do
...
...
spec/features/protected_branches_spec.rb
View file @
5854ab2f
...
...
@@ -9,7 +9,7 @@ feature 'Protected Branches', feature: true, js: true do
end
def
set_protected_branch_name
(
branch_name
)
find
(
".js-protected-branch-select"
).
trigger
(
'click'
)
find
(
".js-protected-branch-select"
).
click
find
(
".dropdown-input-field"
).
set
(
branch_name
)
click_on
(
"Create wildcard
#{
branch_name
}
"
)
end
...
...
spec/features/search_spec.rb
View file @
5854ab2f
...
...
@@ -27,7 +27,7 @@ describe "Search", feature: true do
end
it
'shows group name after filtering'
do
find
(
'.js-search-group-dropdown'
).
trigger
(
'click'
)
find
(
'.js-search-group-dropdown'
).
click
wait_for_requests
page
.
within
'.search-holder'
do
...
...
@@ -38,7 +38,7 @@ describe "Search", feature: true do
end
it
'filters by group projects after filtering by group'
do
find
(
'.js-search-group-dropdown'
).
trigger
(
'click'
)
find
(
'.js-search-group-dropdown'
).
click
wait_for_requests
page
.
within
'.search-holder'
do
...
...
@@ -48,7 +48,7 @@ describe "Search", feature: true do
expect
(
find
(
'.js-search-group-dropdown'
)).
to
have_content
(
group
.
name
)
page
.
within
(
'.project-filter'
)
do
find
(
'.js-search-project-dropdown'
).
trigger
(
'click'
)
find
(
'.js-search-project-dropdown'
).
click
wait_for_requests
expect
(
page
).
to
have_link
(
group_project
.
name_with_namespace
)
...
...
@@ -57,7 +57,7 @@ describe "Search", feature: true do
it
'shows project name after filtering'
do
page
.
within
(
'.project-filter'
)
do
find
(
'.js-search-project-dropdown'
).
trigger
(
'click'
)
find
(
'.js-search-project-dropdown'
).
click
wait_for_requests
click_link
project
.
name_with_namespace
...
...
spec/features/tags/master_creates_tag_spec.rb
View file @
5854ab2f
...
...
@@ -59,7 +59,7 @@ feature 'Master creates tag', feature: true do
expect
(
ref_input
.
value
).
to
eq
'master'
expect
(
find
(
'.dropdown-toggle-text'
)).
to
have_content
'master'
find
(
'.js-branch-select'
).
trigger
(
'click'
)
find
(
'.js-branch-select'
).
click
expect
(
find
(
'.dropdown-menu'
)).
to
have_content
'empty-branch'
end
...
...
spec/features/todos/todos_spec.rb
View file @
5854ab2f
...
...
@@ -251,7 +251,7 @@ describe 'Dashboard Todos', feature: true do
describe
'mark all as done'
,
js:
true
do
before
do
visit
dashboard_todos_path
find
(
'.js-todos-mark-all'
).
trigger
(
'click'
)
find
(
'.js-todos-mark-all'
).
click
end
it
'shows "All done" message!'
do
...
...
@@ -308,9 +308,9 @@ describe 'Dashboard Todos', feature: true do
end
def
mark_all_and_undo
find
(
'.js-todos-mark-all'
).
trigger
(
'click'
)
find
(
'.js-todos-mark-all'
).
click
wait_for_requests
find
(
'.js-todos-undo-all'
).
trigger
(
'click'
)
find
(
'.js-todos-undo-all'
).
click
wait_for_requests
end
end
...
...
spec/features/user_callout_spec.rb
View file @
5854ab2f
...
...
@@ -20,7 +20,7 @@ describe 'User Callouts', js: true do
visit
dashboard_projects_path
within
(
'.user-callout'
)
do
find
(
'.close'
).
trigger
(
'click'
)
find
(
'.close'
).
click
end
visit
dashboard_projects_path
...
...
spec/support/features/discussion_comments_shared_example.rb
View file @
5854ab2f
...
...
@@ -74,12 +74,12 @@ shared_examples 'discussion comments' do |resource_name|
end
it
'clicking the ul padding or divider should not change the text'
do
find
(
menu_selector
).
trigger
'click'
find
(
menu_selector
).
click
expect
(
page
).
to
have_selector
menu_selector
expect
(
find
(
dropdown_selector
)).
to
have_content
'Comment'
find
(
"
#{
menu_selector
}
.divider"
).
trigger
'click'
find
(
"
#{
menu_selector
}
.divider"
).
click
expect
(
page
).
to
have_selector
menu_selector
expect
(
find
(
dropdown_selector
)).
to
have_content
'Comment'
...
...
spec/support/protected_branches/access_control_ce_shared_examples.rb
View file @
5854ab2f
...
...
@@ -9,7 +9,7 @@ RSpec.shared_examples "protected branches > access control > CE" do
allowed_to_push_button
=
find
(
".js-allowed-to-push"
)
unless
allowed_to_push_button
.
text
==
access_type_name
allowed_to_push_button
.
trigger
(
'click'
)
allowed_to_push_button
.
click
within
(
".dropdown.open .dropdown-menu"
)
{
click_on
access_type_name
}
end
end
...
...
spec/support/protected_tags/access_control_ce_shared_examples.rb
View file @
5854ab2f
...
...
@@ -9,7 +9,7 @@ RSpec.shared_examples "protected tags > access control > CE" do
allowed_to_create_button
=
find
(
".js-allowed-to-create"
)
unless
allowed_to_create_button
.
text
==
access_type_name
allowed_to_create_button
.
trigger
(
'click'
)
allowed_to_create_button
.
click
find
(
'.create_access_levels-container .dropdown-menu li'
,
match: :first
)
within
(
'.create_access_levels-container .dropdown-menu'
)
{
click_on
access_type_name
}
end
...
...
spec/support/quick_actions_helpers.rb
View file @
5854ab2f
...
...
@@ -3,7 +3,7 @@ module QuickActionsHelpers
Sidekiq
::
Testing
.
fake!
do
page
.
within
(
'.js-main-target-form'
)
do
fill_in
'note[note]'
,
with:
text
find
(
'.js-comment-submit-button'
).
trigger
(
'click'
)
find
(
'.js-comment-submit-button'
).
click
end
end
end
...
...
spec/support/time_tracking_shared_examples.rb
View file @
5854ab2f
...
...
@@ -80,6 +80,6 @@ end
def
submit_time
(
quick_action
)
fill_in
'note[note]'
,
with:
quick_action
find
(
'.js-comment-submit-button'
).
trigger
(
'click'
)
find
(
'.js-comment-submit-button'
).
click
wait_for_requests
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