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
f1c9258b
Commit
f1c9258b
authored
Aug 19, 2020
by
Eugenia Grieff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace let with let_it_be
- Reduce DB queries by using let_it_be helper
parent
3cb408f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
30 deletions
+30
-30
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+30
-30
No files found.
spec/features/boards/boards_spec.rb
View file @
f1c9258b
...
...
@@ -6,11 +6,11 @@ RSpec.describe 'Issue Boards', :js do
include
DragTo
include
MobileHelpers
let
(
:group
)
{
create
(
:group
,
:nested
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
!
(
:user2
)
{
create
(
:user
)
}
let
_it_be
(
:group
)
{
create
(
:group
,
:nested
)
}
let
_it_be
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
let
_it_be
(
:board
)
{
create
(
:board
,
project:
project
)
}
let
_it_be
(
:user
)
{
create
(
:user
)
}
let
_it_be
(
:user2
)
{
create
(
:user
)
}
before
do
project
.
add_maintainer
(
user
)
...
...
@@ -62,30 +62,30 @@ RSpec.describe 'Issue Boards', :js do
end
context
'with lists'
do
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let
(
:planning
)
{
create
(
:label
,
project:
project
,
name:
'Planning'
,
description:
'Test'
)
}
let
(
:development
)
{
create
(
:label
,
project:
project
,
name:
'Development'
)
}
let
(
:testing
)
{
create
(
:label
,
project:
project
,
name:
'Testing'
)
}
let
(
:bug
)
{
create
(
:label
,
project:
project
,
name:
'Bug'
)
}
let
!
(
:backlog
)
{
create
(
:label
,
project:
project
,
name:
'Backlog'
)
}
let
!
(
:closed
)
{
create
(
:label
,
project:
project
,
name:
'Closed'
)
}
let
!
(
:accepting
)
{
create
(
:label
,
project:
project
,
name:
'Accepting Merge Requests'
)
}
let
!
(
:a_plus
)
{
create
(
:label
,
project:
project
,
name:
'A+'
)
}
let
!
(
:list1
)
{
create
(
:list
,
board:
board
,
label:
planning
,
position:
0
)
}
let
!
(
:list2
)
{
create
(
:list
,
board:
board
,
label:
development
,
position:
1
)
}
let
!
(
:confidential_issue
)
{
create
(
:labeled_issue
,
:confidential
,
project:
project
,
author:
user
,
labels:
[
planning
],
relative_position:
9
)
}
let
!
(
:issue1
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'aaa'
,
description:
'111'
,
assignees:
[
user
],
labels:
[
planning
],
relative_position:
8
)
}
let
!
(
:issue2
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'bbb'
,
description:
'222'
,
author:
user2
,
labels:
[
planning
],
relative_position:
7
)
}
let
!
(
:issue3
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'ccc'
,
description:
'333'
,
labels:
[
planning
],
relative_position:
6
)
}
let
!
(
:issue4
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'ddd'
,
description:
'444'
,
labels:
[
planning
],
relative_position:
5
)
}
let
!
(
:issue5
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'eee'
,
description:
'555'
,
labels:
[
planning
],
milestone:
milestone
,
relative_position:
4
)
}
let
!
(
:issue6
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'fff'
,
description:
'666'
,
labels:
[
planning
,
development
],
relative_position:
3
)
}
let
!
(
:issue7
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'ggg'
,
description:
'777'
,
labels:
[
development
],
relative_position:
2
)
}
let
!
(
:issue8
)
{
create
(
:closed_issue
,
project:
project
,
title:
'hhh'
,
description:
'888'
)
}
let
!
(
:issue9
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'iii'
,
description:
'999'
,
labels:
[
planning
,
testing
,
bug
,
accepting
],
relative_position:
1
)
}
let
!
(
:issue10
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'issue +'
,
description:
'A+ great issue'
,
labels:
[
a_plus
])
}
let
_it_be
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let
_it_be
(
:planning
)
{
create
(
:label
,
project:
project
,
name:
'Planning'
,
description:
'Test'
)
}
let
_it_be
(
:development
)
{
create
(
:label
,
project:
project
,
name:
'Development'
)
}
let
_it_be
(
:testing
)
{
create
(
:label
,
project:
project
,
name:
'Testing'
)
}
let
_it_be
(
:bug
)
{
create
(
:label
,
project:
project
,
name:
'Bug'
)
}
let
_it_be
(
:backlog
)
{
create
(
:label
,
project:
project
,
name:
'Backlog'
)
}
let
_it_be
(
:closed
)
{
create
(
:label
,
project:
project
,
name:
'Closed'
)
}
let
_it_be
(
:accepting
)
{
create
(
:label
,
project:
project
,
name:
'Accepting Merge Requests'
)
}
let
_it_be
(
:a_plus
)
{
create
(
:label
,
project:
project
,
name:
'A+'
)
}
let
_it_be
(
:list1
)
{
create
(
:list
,
board:
board
,
label:
planning
,
position:
0
)
}
let
_it_be
(
:list2
)
{
create
(
:list
,
board:
board
,
label:
development
,
position:
1
)
}
let
_it_be
(
:confidential_issue
)
{
create
(
:labeled_issue
,
:confidential
,
project:
project
,
author:
user
,
labels:
[
planning
],
relative_position:
9
)
}
let
_it_be
(
:issue1
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'aaa'
,
description:
'111'
,
assignees:
[
user
],
labels:
[
planning
],
relative_position:
8
)
}
let
_it_be
(
:issue2
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'bbb'
,
description:
'222'
,
author:
user2
,
labels:
[
planning
],
relative_position:
7
)
}
let
_it_be
(
:issue3
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'ccc'
,
description:
'333'
,
labels:
[
planning
],
relative_position:
6
)
}
let
_it_be
(
:issue4
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'ddd'
,
description:
'444'
,
labels:
[
planning
],
relative_position:
5
)
}
let
_it_be
(
:issue5
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'eee'
,
description:
'555'
,
labels:
[
planning
],
milestone:
milestone
,
relative_position:
4
)
}
let
_it_be
(
:issue6
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'fff'
,
description:
'666'
,
labels:
[
planning
,
development
],
relative_position:
3
)
}
let
_it_be
(
:issue7
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'ggg'
,
description:
'777'
,
labels:
[
development
],
relative_position:
2
)
}
let
_it_be
(
:issue8
)
{
create
(
:closed_issue
,
project:
project
,
title:
'hhh'
,
description:
'888'
)
}
let
_it_be
(
:issue9
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'iii'
,
description:
'999'
,
labels:
[
planning
,
testing
,
bug
,
accepting
],
relative_position:
1
)
}
let
_it_be
(
:issue10
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'issue +'
,
description:
'A+ great issue'
,
labels:
[
a_plus
])
}
before
do
visit
project_board_path
(
project
,
board
)
...
...
@@ -636,7 +636,7 @@ RSpec.describe 'Issue Boards', :js do
end
context
'as guest user'
do
let
(
:user_guest
)
{
create
(
:user
)
}
let
_it_be
(
:user_guest
)
{
create
(
:user
)
}
before
do
project
.
add_guest
(
user_guest
)
...
...
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