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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d897bcd7
Commit
d897bcd7
authored
May 29, 2020
by
Desiree Chevalier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate EE issue board e2e spec components
Separates EE specific methods for issue board components in e2e specs
parent
094529ff
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
164 additions
and
140 deletions
+164
-140
qa/qa.rb
qa/qa.rb
+4
-0
qa/qa/ee/page/component/issue_board/show.rb
qa/qa/ee/page/component/issue_board/show.rb
+12
-130
qa/qa/page/component/issue_board/show.rb
qa/qa/page/component/issue_board/show.rb
+138
-0
qa/qa/specs/features/browser_ui/2_plan/issue_boards/focus_mode_spec.rb
...eatures/browser_ui/2_plan/issue_boards/focus_mode_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/configurable_issue_board_spec.rb
...r_ui/2_plan/issue_boards/configurable_issue_board_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/configure_issue_board_by_label_spec.rb
..._plan/issue_boards/configure_issue_board_by_label_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/create_group_issue_board_spec.rb
...r_ui/2_plan/issue_boards/create_group_issue_board_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/group_issue_boards_spec.rb
...browser_ui/2_plan/issue_boards/group_issue_boards_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/project_issue_boards_spec.rb
...owser_ui/2_plan/issue_boards/project_issue_boards_spec.rb
+3
-3
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/read_only_board_configuration_spec.rb
...2_plan/issue_boards/read_only_board_configuration_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/sum_of_issues_weights_spec.rb
...wser_ui/2_plan/issue_boards/sum_of_issues_weights_spec.rb
+1
-1
No files found.
qa/qa.rb
View file @
d897bcd7
...
...
@@ -439,6 +439,10 @@ module QA
autoload
:Common
,
'qa/page/component/issuable/common'
end
module
IssueBoard
autoload
:Show
,
'qa/page/component/issue_board/show'
end
module
WebIDE
autoload
:Alert
,
'qa/page/component/web_ide/alert'
...
...
qa/qa/ee/page/component/issue_board/show.rb
View file @
d897bcd7
...
...
@@ -5,46 +5,12 @@ module QA
module
Page
module
Component
module
IssueBoard
class
Show
<
QA
::
Page
::
Base
view
'app/assets/javascripts/boards/components/board_card.vue'
do
element
:board_card
end
view
'app/assets/javascripts/boards/components/board_form.vue'
do
element
:board_name_field
end
view
'app/assets/javascripts/boards/components/board_list.vue'
do
element
:board_list_cards_area
end
view
'app/assets/javascripts/boards/components/boards_selector.vue'
do
element
:boards_dropdown
element
:boards_dropdown_content
element
:create_new_board_button
end
view
'app/assets/javascripts/vue_shared/components/deprecated_modal.vue'
do
element
:save_changes_button
end
view
'app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue'
do
element
:labels_dropdown_content
end
view
'app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_title.vue'
do
element
:labels_edit_button
end
view
'app/views/shared/boards/_show.html.haml'
do
element
:boards_list
end
view
'app/views/shared/boards/components/_board.html.haml'
do
element
:board_list
element
:board_list_header
end
module
Show
extend
QA
::
Page
::
PageConcern
def
self
.
prepended
(
base
)
super
base
.
class_eval
do
view
'ee/app/assets/javascripts/boards/components/board_scope.vue'
do
element
:board_scope_modal
end
...
...
@@ -52,100 +18,16 @@ module QA
view
'ee/app/assets/javascripts/boards/config_toggle.js'
do
element
:boards_config_button
end
view
'app/assets/javascripts/boards/toggle_focus.js'
do
element
:focus_mode_button
end
# The `focused_board` method does not use `find_element` with an element defined
# with the attribute `data-qa-selector` since such element is not unique when the
# `is-focused` class is not set, and it was not possible to find a better solution.
def
focused_board
find
(
'.issue-boards-content.js-focus-mode-board.is-focused'
)
end
def
board_scope_modal
find_element
(
:board_scope_modal
)
end
def
boards_dropdown
find_element
(
:boards_dropdown
)
end
def
boards_dropdown_content
find_element
(
:boards_dropdown_content
)
end
def
boards_list_cards_area_with_index
(
index
)
wait_boards_list_finish_loading
do
within_element_by_index
(
:board_list
,
index
)
do
find_element
(
:board_list_cards_area
)
end
end
end
def
boards_list_header_with_index
(
index
)
wait_boards_list_finish_loading
do
within_element_by_index
(
:board_list
,
index
)
do
find_element
(
:board_list_header
)
end
end
end
def
card_of_list_with_index
(
index
)
wait_boards_list_finish_loading
do
within_element_by_index
(
:board_list
,
index
)
do
find_element
(
:board_card
)
end
end
end
def
click_boards_config_button
click_element
(
:boards_config_button
)
end
def
click_boards_dropdown_button
# The dropdown button comes from the `GlDropdown` component of `@gitlab/ui`,
# so it wasn't possible to add a `data-qa-selector` to it.
find_element
(
:boards_dropdown
).
find
(
'button'
).
click
end
def
click_focus_mode_button
click_element
(
:focus_mode_button
)
end
def
configure_by_label
(
label
)
click_boards_config_button
click_element
(
:labels_edit_button
)
find_element
(
:labels_dropdown_content
).
find
(
'li'
,
text:
label
).
click
click_element
(
:save_changes_button
)
wait_boards_list_finish_loading
end
def
create_new_board
(
board_name
)
click_boards_dropdown_button
click_element
(
:create_new_board_button
)
set_name
(
board_name
)
end
def
has_modal_board_name_field?
has_element?
(
:board_name_field
,
wait:
1
)
end
def
set_name
(
name
)
find_element
(
:board_name_field
).
set
(
name
)
click_element
(
:save_changes_button
)
end
private
def
wait_boards_list_finish_loading
within_element
(
:boards_list
)
do
wait_until
(
reload:
false
,
max_duration:
5
,
sleep_interval:
1
)
do
finished_loading?
&&
(
block_given?
?
yield
:
true
)
end
end
end
end
end
end
...
...
qa/qa/page/component/issue_board/show.rb
0 → 100644
View file @
d897bcd7
# frozen_string_literal: true
module
QA
module
Page
module
Component
module
IssueBoard
class
Show
<
QA
::
Page
::
Base
view
'app/assets/javascripts/boards/components/board_card.vue'
do
element
:board_card
end
view
'app/assets/javascripts/boards/components/board_form.vue'
do
element
:board_name_field
end
view
'app/assets/javascripts/boards/components/board_list.vue'
do
element
:board_list_cards_area
end
view
'app/assets/javascripts/boards/components/boards_selector.vue'
do
element
:boards_dropdown
element
:boards_dropdown_content
element
:create_new_board_button
end
view
'app/assets/javascripts/vue_shared/components/deprecated_modal.vue'
do
element
:save_changes_button
end
view
'app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue'
do
element
:labels_dropdown_content
end
view
'app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_title.vue'
do
element
:labels_edit_button
end
view
'app/views/shared/boards/_show.html.haml'
do
element
:boards_list
end
view
'app/views/shared/boards/components/_board.html.haml'
do
element
:board_list
element
:board_list_header
end
view
'app/assets/javascripts/boards/toggle_focus.js'
do
element
:focus_mode_button
end
# The `focused_board` method does not use `find_element` with an element defined
# with the attribute `data-qa-selector` since such element is not unique when the
# `is-focused` class is not set, and it was not possible to find a better solution.
def
focused_board
find
(
'.issue-boards-content.js-focus-mode-board.is-focused'
)
end
def
boards_dropdown
find_element
(
:boards_dropdown
)
end
def
boards_dropdown_content
find_element
(
:boards_dropdown_content
)
end
def
boards_list_cards_area_with_index
(
index
)
wait_boards_list_finish_loading
do
within_element_by_index
(
:board_list
,
index
)
do
find_element
(
:board_list_cards_area
)
end
end
end
def
boards_list_header_with_index
(
index
)
wait_boards_list_finish_loading
do
within_element_by_index
(
:board_list
,
index
)
do
find_element
(
:board_list_header
)
end
end
end
def
card_of_list_with_index
(
index
)
wait_boards_list_finish_loading
do
within_element_by_index
(
:board_list
,
index
)
do
find_element
(
:board_card
)
end
end
end
def
click_boards_dropdown_button
# The dropdown button comes from the `GlDropdown` component of `@gitlab/ui`,
# so it wasn't possible to add a `data-qa-selector` to it.
find_element
(
:boards_dropdown
).
find
(
'button'
).
click
end
def
click_focus_mode_button
click_element
(
:focus_mode_button
)
end
def
configure_by_label
(
label
)
click_boards_config_button
click_element
(
:labels_edit_button
)
find_element
(
:labels_dropdown_content
).
find
(
'li'
,
text:
label
).
click
click_element
(
:save_changes_button
)
wait_boards_list_finish_loading
end
def
create_new_board
(
board_name
)
click_boards_dropdown_button
click_element
(
:create_new_board_button
)
set_name
(
board_name
)
end
def
has_modal_board_name_field?
has_element?
(
:board_name_field
,
wait:
1
)
end
def
set_name
(
name
)
find_element
(
:board_name_field
).
set
(
name
)
click_element
(
:save_changes_button
)
end
private
def
wait_boards_list_finish_loading
within_element
(
:boards_list
)
do
wait_until
(
reload:
false
,
max_duration:
5
,
sleep_interval:
1
)
do
finished_loading?
&&
(
block_given?
?
yield
:
true
)
end
end
end
end
end
end
end
end
QA
::
Page
::
Component
::
IssueBoard
::
Show
.
prepend_if_ee
(
'QA::EE::Page::Component::IssueBoard::Show'
)
qa/qa/specs/features/browser_ui/2_plan/issue_boards/focus_mode_spec.rb
View file @
d897bcd7
...
...
@@ -17,7 +17,7 @@ module QA
project
.
visit!
Page
::
Project
::
Menu
.
perform
(
&
:go_to_boards
)
EE
::
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
show
.
click_focus_mode_button
expect
(
show
.
focused_board
).
to
be_visible
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/configurable_issue_board_spec.rb
View file @
d897bcd7
...
...
@@ -16,7 +16,7 @@ module QA
it
'renames the issue board'
do
new_board_name
=
'UX'
EE
::
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
show
.
click_boards_config_button
show
.
set_name
(
new_board_name
)
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/configure_issue_board_by_label_spec.rb
View file @
d897bcd7
...
...
@@ -24,7 +24,7 @@ module QA
end
it
'shows only issues that match the configured label'
do
EE
::
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
show
.
configure_by_label
(
doing
)
expect
(
show
).
not_to
have_content
(
issue_2
)
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/create_group_issue_board_spec.rb
View file @
d897bcd7
...
...
@@ -18,7 +18,7 @@ module QA
end
it
'creates a group issue board via the GUI'
do
EE
::
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
new_board
=
"Board-
#{
SecureRandom
.
hex
(
4
)
}
"
show
.
create_new_board
(
new_board
)
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/group_issue_boards_spec.rb
View file @
d897bcd7
...
...
@@ -28,7 +28,7 @@ module QA
end
it
'shows multiple group boards in the boards dropdown menu'
do
EE
::
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
show
.
click_boards_dropdown_button
expect
(
show
.
boards_dropdown_content
).
to
have_content
(
board_1
)
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/project_issue_boards_spec.rb
View file @
d897bcd7
...
...
@@ -27,7 +27,7 @@ module QA
end
it
'shows the just created board with a "Doing" (label) list, and an issue on it'
do
EE
::
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
expect
(
show
.
boards_dropdown
).
to
have_content
(
label_board_list
.
board
.
name
)
expect
(
show
.
boards_list_header_with_index
(
1
)).
to
have_content
(
label
)
expect
(
show
.
card_of_list_with_index
(
1
)).
to
have_content
(
issue_title
)
...
...
@@ -51,7 +51,7 @@ module QA
end
it
'shows the just created board with a "1.0" (milestone) list, and an issue on it'
do
EE
::
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
expect
(
show
.
boards_dropdown
).
to
have_content
(
milestone_board_list
.
board
.
name
)
expect
(
show
.
boards_list_header_with_index
(
1
)).
to
have_content
(
'1.0'
)
expect
(
show
.
card_of_list_with_index
(
1
)).
to
have_content
(
issue_title
)
...
...
@@ -84,7 +84,7 @@ module QA
end
it
'shows the just created board with an assignee list, and an issue on it'
do
EE
::
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
expect
(
show
.
boards_dropdown
).
to
have_content
(
@assignee_board_list
.
board
.
name
)
expect
(
show
.
boards_list_header_with_index
(
1
)).
to
have_content
(
@user
.
name
)
expect
(
show
.
card_of_list_with_index
(
1
)).
to
have_content
(
issue_title
)
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/read_only_board_configuration_spec.rb
View file @
d897bcd7
...
...
@@ -25,7 +25,7 @@ module QA
end
it
'shows board configuration to user without edit permission'
do
EE
::
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
show
.
click_boards_config_button
expect
(
show
.
board_scope_modal
).
to
be_visible
...
...
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/sum_of_issues_weights_spec.rb
View file @
d897bcd7
...
...
@@ -31,7 +31,7 @@ module QA
end
it
'shows the sum of issues weights in the board list\'s header'
do
EE
::
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
Page
::
Component
::
IssueBoard
::
Show
.
perform
do
|
show
|
expect
(
show
.
boards_list_header_with_index
(
1
)).
to
have_content
(
weight_for_issue_1
+
weight_for_issue_2
)
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