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
be3facd9
Commit
be3facd9
authored
Oct 11, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a feature spec failing only on MySQL
parent
a11077e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
spec/features/dashboard/groups_list_spec.rb
spec/features/dashboard/groups_list_spec.rb
+10
-10
No files found.
spec/features/dashboard/groups_list_spec.rb
View file @
be3facd9
require
'spec_helper'
require
'spec_helper'
feature
'Dashboard Groups page'
,
:js
do
feature
'Dashboard Groups page'
,
:js
do
let
!
(
:user
)
{
create
:user
}
let
(
:user
)
{
create
:user
}
let
!
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
!
(
:nested_group
)
{
create
(
:group
,
:nested
)
}
let
(
:nested_group
)
{
create
(
:group
,
:nested
)
}
let
!
(
:another_group
)
{
create
(
:group
)
}
let
(
:another_group
)
{
create
(
:group
)
}
it
'shows groups user is member of'
do
it
'shows groups user is member of'
do
group
.
add_owner
(
user
)
group
.
add_owner
(
user
)
nested_group
.
add_owner
(
user
)
nested_group
.
add_owner
(
user
)
expect
(
another_group
).
to
be_persisted
sign_in
(
user
)
sign_in
(
user
)
visit
dashboard_groups_path
visit
dashboard_groups_path
...
@@ -22,6 +23,7 @@ feature 'Dashboard Groups page', :js do
...
@@ -22,6 +23,7 @@ feature 'Dashboard Groups page', :js do
before
do
before
do
group
.
add_owner
(
user
)
group
.
add_owner
(
user
)
nested_group
.
add_owner
(
user
)
nested_group
.
add_owner
(
user
)
expect
(
another_group
).
to
be_persisted
sign_in
(
user
)
sign_in
(
user
)
...
@@ -51,7 +53,7 @@ feature 'Dashboard Groups page', :js do
...
@@ -51,7 +53,7 @@ feature 'Dashboard Groups page', :js do
end
end
end
end
describe
'group with subgroups'
do
describe
'group with subgroups'
,
:nested_groups
do
let!
(
:subgroup
)
{
create
(
:group
,
:public
,
parent:
group
)
}
let!
(
:subgroup
)
{
create
(
:group
,
:public
,
parent:
group
)
}
before
do
before
do
...
@@ -90,7 +92,8 @@ feature 'Dashboard Groups page', :js do
...
@@ -90,7 +92,8 @@ feature 'Dashboard Groups page', :js do
end
end
describe
'when using pagination'
do
describe
'when using pagination'
do
let
(
:group2
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
,
created_at:
5
.
days
.
ago
)
}
let
(
:group2
)
{
create
(
:group
,
created_at:
2
.
days
.
ago
)
}
before
do
before
do
group
.
add_owner
(
user
)
group
.
add_owner
(
user
)
...
@@ -102,12 +105,9 @@ feature 'Dashboard Groups page', :js do
...
@@ -102,12 +105,9 @@ feature 'Dashboard Groups page', :js do
visit
dashboard_groups_path
visit
dashboard_groups_path
end
end
it
'shows pagination'
do
it
'loads results for next page'
do
expect
(
page
).
to
have_selector
(
'.gl-pagination'
)
expect
(
page
).
to
have_selector
(
'.gl-pagination .page'
,
count:
2
)
expect
(
page
).
to
have_selector
(
'.gl-pagination .page'
,
count:
2
)
end
it
'loads results for next page'
do
# Check first page
# Check first page
expect
(
page
).
to
have_content
(
group2
.
full_name
)
expect
(
page
).
to
have_content
(
group2
.
full_name
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group2
.
id
}
"
)
expect
(
page
).
to
have_selector
(
"#group-
#{
group2
.
id
}
"
)
...
...
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