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
70b7cf35
Commit
70b7cf35
authored
Sep 03, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[QA] Ensure groups filtering does not happen before the groups list is loaded
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
97ee68b1
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
22 deletions
+62
-22
app/assets/javascripts/groups/components/groups.vue
app/assets/javascripts/groups/components/groups.vue
+1
-1
app/views/shared/groups/_empty_state.html.haml
app/views/shared/groups/_empty_state.html.haml
+1
-1
qa/qa.rb
qa/qa.rb
+1
-0
qa/qa/factory/resource/group.rb
qa/qa/factory/resource/group.rb
+16
-10
qa/qa/page/component/groups_filter.rb
qa/qa/page/component/groups_filter.rb
+35
-0
qa/qa/page/dashboard/groups.rb
qa/qa/page/dashboard/groups.rb
+1
-8
qa/qa/page/dashboard/projects.rb
qa/qa/page/dashboard/projects.rb
+3
-0
qa/qa/page/group/show.rb
qa/qa/page/group/show.rb
+4
-2
No files found.
app/assets/javascripts/groups/components/groups.vue
View file @
70b7cf35
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"groups-list-tree-container"
>
<div
class=
"groups-list-tree-container
qa-groups-list-tree-container
"
>
<div
<div
v-if=
"searchEmpty"
v-if=
"searchEmpty"
class=
"has-no-search-results"
class=
"has-no-search-results"
...
...
app/views/shared/groups/_empty_state.html.haml
View file @
70b7cf35
.groups-empty-state
.groups-empty-state
.qa-groups-empty-state
=
custom_icon
(
"icon_empty_groups"
)
=
custom_icon
(
"icon_empty_groups"
)
.text-content
.text-content
...
...
qa/qa.rb
View file @
70b7cf35
...
@@ -250,6 +250,7 @@ module QA
...
@@ -250,6 +250,7 @@ module QA
module
Component
module
Component
autoload
:ClonePanel
,
'qa/page/component/clone_panel'
autoload
:ClonePanel
,
'qa/page/component/clone_panel'
autoload
:Dropzone
,
'qa/page/component/dropzone'
autoload
:Dropzone
,
'qa/page/component/dropzone'
autoload
:GroupsFilter
,
'qa/page/component/groups_filter'
autoload
:Select2
,
'qa/page/component/select2'
autoload
:Select2
,
'qa/page/component/select2'
end
end
end
end
...
...
qa/qa/factory/resource/group.rb
View file @
70b7cf35
...
@@ -2,7 +2,7 @@ module QA
...
@@ -2,7 +2,7 @@ module QA
module
Factory
module
Factory
module
Resource
module
Resource
class
Group
<
Factory
::
Base
class
Group
<
Factory
::
Base
attr_
write
r
:path
,
:description
attr_
accesso
r
:path
,
:description
dependency
Factory
::
Resource
::
Sandbox
,
as: :sandbox
dependency
Factory
::
Resource
::
Sandbox
,
as: :sandbox
...
@@ -14,17 +14,23 @@ module QA
...
@@ -14,17 +14,23 @@ module QA
def
fabricate!
def
fabricate!
sandbox
.
visit!
sandbox
.
visit!
Page
::
Group
::
Show
.
perform
do
|
page
|
Page
::
Group
::
Show
.
perform
do
|
group_show
|
if
page
.
has_subgroup?
(
@
path
)
if
group_show
.
has_subgroup?
(
path
)
page
.
go_to_subgroup
(
@
path
)
group_show
.
go_to_subgroup
(
path
)
else
else
page
.
go_to_new_subgroup
group_show
.
go_to_new_subgroup
Page
::
Group
::
New
.
perform
do
|
group
|
Page
::
Group
::
New
.
perform
do
|
group_new
|
group
.
set_path
(
@path
)
group_new
.
set_path
(
path
)
group
.
set_description
(
@description
)
group_new
.
set_description
(
description
)
group
.
set_visibility
(
'Public'
)
group_new
.
set_visibility
(
'Public'
)
group
.
create
group_new
.
create
end
# Ensure that the group was actually created
group_show
.
wait
(
time:
1
)
do
group_show
.
has_text?
(
path
)
&&
group_show
.
has_new_project_or_subgroup_dropdown?
end
end
end
end
end
end
...
...
qa/qa/page/component/groups_filter.rb
0 → 100644
View file @
70b7cf35
# frozen_string_literal: true
module
QA
module
Page
module
Component
module
GroupsFilter
def
self
.
included
(
base
)
base
.
view
'app/views/shared/groups/_search_form.html.haml'
do
element
:groups_filter
,
'search_field_tag :filter'
element
:groups_filter_placeholder
,
'Filter by name...'
end
base
.
view
'app/views/shared/groups/_empty_state.html.haml'
do
element
:groups_empty_state
end
base
.
view
'app/assets/javascripts/groups/components/groups.vue'
do
element
:groups_list_tree_container
end
end
private
def
filter_by_name
(
name
)
wait
(
reload:
false
)
do
page
.
has_css?
(
element_selector_css
(
:groups_empty_state
))
||
page
.
has_css?
(
element_selector_css
(
:groups_list_tree_container
))
end
fill_in
'Filter by name...'
,
with:
name
end
end
end
end
end
qa/qa/page/dashboard/groups.rb
View file @
70b7cf35
...
@@ -2,19 +2,12 @@ module QA
...
@@ -2,19 +2,12 @@ module QA
module
Page
module
Page
module
Dashboard
module
Dashboard
class
Groups
<
Page
::
Base
class
Groups
<
Page
::
Base
view
'app/views/shared/groups/_search_form.html.haml'
do
include
Page
::
Component
::
GroupsFilter
element
:groups_filter
,
'search_field_tag :filter'
element
:groups_filter_placeholder
,
'Filter by name...'
end
view
'app/views/dashboard/_groups_head.html.haml'
do
view
'app/views/dashboard/_groups_head.html.haml'
do
element
:new_group_button
,
'link_to _("New group")'
element
:new_group_button
,
'link_to _("New group")'
end
end
def
filter_by_name
(
name
)
fill_in
'Filter by name...'
,
with:
name
end
def
has_group?
(
name
)
def
has_group?
(
name
)
filter_by_name
(
name
)
filter_by_name
(
name
)
...
...
qa/qa/page/dashboard/projects.rb
View file @
70b7cf35
...
@@ -3,6 +3,7 @@ module QA
...
@@ -3,6 +3,7 @@ module QA
module
Dashboard
module
Dashboard
class
Projects
<
Page
::
Base
class
Projects
<
Page
::
Base
view
'app/views/dashboard/projects/index.html.haml'
view
'app/views/dashboard/projects/index.html.haml'
view
'app/views/shared/projects/_search_form.html.haml'
do
view
'app/views/shared/projects/_search_form.html.haml'
do
element
:form_filter_by_name
,
/form_tag.+id: 'project-filter-form'/
element
:form_filter_by_name
,
/form_tag.+id: 'project-filter-form'/
end
end
...
@@ -13,6 +14,8 @@ module QA
...
@@ -13,6 +14,8 @@ module QA
find_link
(
text:
name
).
click
find_link
(
text:
name
).
click
end
end
private
def
filter_by_name
(
name
)
def
filter_by_name
(
name
)
page
.
within
(
'form#project-filter-form'
)
do
page
.
within
(
'form#project-filter-form'
)
do
fill_in
:name
,
with:
name
fill_in
:name
,
with:
name
...
...
qa/qa/page/group/show.rb
View file @
70b7cf35
...
@@ -2,6 +2,8 @@ module QA
...
@@ -2,6 +2,8 @@ module QA
module
Page
module
Page
module
Group
module
Group
class
Show
<
Page
::
Base
class
Show
<
Page
::
Base
include
Page
::
Component
::
GroupsFilter
view
'app/views/groups/show.html.haml'
do
view
'app/views/groups/show.html.haml'
do
element
:new_project_or_subgroup_dropdown
,
'.new-project-subgroup'
element
:new_project_or_subgroup_dropdown
,
'.new-project-subgroup'
element
:new_project_or_subgroup_dropdown_toggle
,
'.dropdown-toggle'
element
:new_project_or_subgroup_dropdown_toggle
,
'.dropdown-toggle'
...
@@ -21,8 +23,8 @@ module QA
...
@@ -21,8 +23,8 @@ module QA
click_link
name
click_link
name
end
end
def
filter_by_name
(
name
)
def
has_new_project_or_subgroup_dropdown?
fill_in
'Filter by name...'
,
with:
name
page
.
has_css?
(
element_selector_css
(
:new_project_or_subgroup_dropdown
))
end
end
def
has_subgroup?
(
name
)
def
has_subgroup?
(
name
)
...
...
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