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
fc312c49
Commit
fc312c49
authored
Sep 02, 2019
by
Walmyr Lima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add BoardList superclass
And refactor other resources to inherit from the superclass.
parent
7215a40a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
104 additions
and
108 deletions
+104
-108
qa/qa/ee.rb
qa/qa/ee.rb
+6
-2
qa/qa/ee/resource/board_list/base_board_list.rb
qa/qa/ee/resource/board_list/base_board_list.rb
+46
-0
qa/qa/ee/resource/board_list/label_board_list.rb
qa/qa/ee/resource/board_list/label_board_list.rb
+25
-0
qa/qa/ee/resource/board_list/milestone_board_list.rb
qa/qa/ee/resource/board_list/milestone_board_list.rb
+25
-0
qa/qa/ee/resource/label_board_list.rb
qa/qa/ee/resource/label_board_list.rb
+0
-52
qa/qa/ee/resource/milestone_board_list.rb
qa/qa/ee/resource/milestone_board_list.rb
+0
-52
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/issue_boards_spec.rb
...es/ee/browser_ui/2_plan/issue_boards/issue_boards_spec.rb
+2
-2
No files found.
qa/qa/ee.rb
View file @
fc312c49
...
...
@@ -134,12 +134,16 @@ module QA
module
Resource
autoload
:Board
,
'qa/ee/resource/board'
autoload
:LabelBoardList
,
'qa/ee/resource/label_board_list'
autoload
:MilestoneBoardList
,
'qa/ee/resource/milestone_board_list'
autoload
:License
,
'qa/ee/resource/license'
autoload
:Epic
,
'qa/ee/resource/epic'
autoload
:ProjectMilestone
,
'qa/ee/resource/project_milestone'
module
BoardList
autoload
:BaseBoardList
,
'qa/ee/resource/board_list/base_board_list'
autoload
:LabelBoardList
,
'qa/ee/resource/board_list/label_board_list'
autoload
:MilestoneBoardList
,
'qa/ee/resource/board_list/milestone_board_list'
end
module
Geo
autoload
:Node
,
'qa/ee/resource/geo/node'
end
...
...
qa/qa/ee/resource/board_list/base_board_list.rb
0 → 100644
View file @
fc312c49
# frozen_string_literal: true
module
QA
module
EE
module
Resource
module
BoardList
class
BaseBoardList
<
QA
::
Resource
::
Base
attribute
:id
attribute
:project
do
QA
::
Resource
::
Project
.
fabricate_via_api!
do
|
resource
|
resource
.
name
=
'project-with-board-list'
end
end
attribute
:board
do
QA
::
EE
::
Resource
::
Board
.
fabricate_via_api!
do
|
b
|
b
.
project
=
project
b
.
name
=
'Downstream'
end
end
def
resource_web_url
(
resource
)
super
rescue
ResourceURLMissingError
# this particular resource does not expose a web_url property
end
def
api_get_path
"/projects/
#{
board
.
project
.
id
}
/boards/
#{
board
.
id
}
/lists/
#{
id
}
"
end
def
api_post_path
"/projects/
#{
board
.
project
.
id
}
/boards/
#{
board
.
id
}
/lists"
end
def
api_post_body
{
board_id:
board
.
id
}
end
end
end
end
end
end
qa/qa/ee/resource/board_list/label_board_list.rb
0 → 100644
View file @
fc312c49
# frozen_string_literal: true
module
QA
module
EE
module
Resource
module
BoardList
class
LabelBoardList
<
BaseBoardList
attribute
:label
do
QA
::
Resource
::
Label
.
fabricate_via_api!
do
|
l
|
l
.
project
=
board
.
project
l
.
title
=
'Doing'
end
end
def
api_post_body
{
board_id:
board
.
id
,
label_id:
label
.
id
}
end
end
end
end
end
end
qa/qa/ee/resource/board_list/milestone_board_list.rb
0 → 100644
View file @
fc312c49
# frozen_string_literal: true
module
QA
module
EE
module
Resource
module
BoardList
class
MilestoneBoardList
<
BaseBoardList
attribute
:project_milestone
do
QA
::
EE
::
Resource
::
ProjectMilestone
.
fabricate_via_api!
do
|
m
|
m
.
project
=
board
.
project
m
.
title
=
'1.0'
end
end
def
api_post_body
{
board_id:
board
.
id
,
milestone_id:
project_milestone
.
id
}
end
end
end
end
end
end
qa/qa/ee/resource/label_board_list.rb
deleted
100644 → 0
View file @
7215a40a
# frozen_string_literal: true
module
QA
module
EE
module
Resource
class
LabelBoardList
<
QA
::
Resource
::
Base
attribute
:id
attribute
:project
do
QA
::
Resource
::
Project
.
fabricate_via_api!
do
|
resource
|
resource
.
name
=
'project-with-label-board-list'
end
end
attribute
:board
do
QA
::
EE
::
Resource
::
Board
.
fabricate_via_api!
do
|
b
|
b
.
project
=
project
b
.
name
=
'Downstream'
end
end
attribute
:label
do
QA
::
Resource
::
Label
.
fabricate_via_api!
do
|
l
|
l
.
project
=
board
.
project
l
.
title
=
'Doing'
end
end
def
resource_web_url
(
resource
)
super
rescue
ResourceURLMissingError
# this particular resource does not expose a web_url property
end
def
api_get_path
"/projects/
#{
board
.
project
.
id
}
/boards/
#{
board
.
id
}
/lists/
#{
id
}
"
end
def
api_post_path
"/projects/
#{
board
.
project
.
id
}
/boards/
#{
board
.
id
}
/lists"
end
def
api_post_body
{
board_id:
board
.
id
,
label_id:
label
.
id
}
end
end
end
end
end
qa/qa/ee/resource/milestone_board_list.rb
deleted
100644 → 0
View file @
7215a40a
# frozen_string_literal: true
module
QA
module
EE
module
Resource
class
MilestoneBoardList
<
QA
::
Resource
::
Base
attribute
:id
attribute
:project
do
QA
::
Resource
::
Project
.
fabricate_via_api!
do
|
resource
|
resource
.
name
=
'project-with-milestone-board-list'
end
end
attribute
:board
do
QA
::
EE
::
Resource
::
Board
.
fabricate_via_api!
do
|
b
|
b
.
project
=
project
b
.
name
=
'Product development'
end
end
attribute
:project_milestone
do
QA
::
EE
::
Resource
::
ProjectMilestone
.
fabricate_via_api!
do
|
m
|
m
.
project
=
board
.
project
m
.
title
=
'1.0'
end
end
def
resource_web_url
(
resource
)
super
rescue
ResourceURLMissingError
# this particular resource does not expose a web_url property
end
def
api_get_path
"/projects/
#{
board
.
project
.
id
}
/boards/
#{
board
.
id
}
/lists/
#{
id
}
"
end
def
api_post_path
"/projects/
#{
board
.
project
.
id
}
/boards/
#{
board
.
id
}
/lists"
end
def
api_post_body
{
board_id:
board
.
id
,
milestone_id:
project_milestone
.
id
}
end
end
end
end
end
qa/qa/specs/features/ee/browser_ui/2_plan/issue_boards/issue_boards_spec.rb
View file @
fc312c49
...
...
@@ -14,7 +14,7 @@ module QA
let
(
:label
)
{
'Doing'
}
let
(
:label_board_list
)
do
EE
::
Resource
::
LabelBoardList
.
fabricate_via_api!
EE
::
Resource
::
BoardList
::
LabelBoardList
.
fabricate_via_api!
end
before
do
...
...
@@ -40,7 +40,7 @@ module QA
context
'Milestone issue board'
do
let
(
:milestone_board_list
)
do
EE
::
Resource
::
MilestoneBoardList
.
fabricate_via_api!
EE
::
Resource
::
BoardList
::
MilestoneBoardList
.
fabricate_via_api!
end
before
do
...
...
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