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
d4c04d8e
Commit
d4c04d8e
authored
Oct 07, 2018
by
Ramya Authappan
Committed by
Grzegorz Bizon
Oct 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Epics e2e tests Automation
parent
c2584ae4
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
270 additions
and
13 deletions
+270
-13
app/assets/javascripts/notes/components/comment_form.vue
app/assets/javascripts/notes/components/comment_form.vue
+1
-1
ee/app/assets/javascripts/epics/epic_show/components/epic_header.vue
...ts/javascripts/epics/epic_show/components/epic_header.vue
+1
-1
ee/app/assets/javascripts/epics/new_epic/components/new_epic.vue
...assets/javascripts/epics/new_epic/components/new_epic.vue
+3
-3
ee/app/assets/javascripts/related_issues/components/add_issuable_form.vue
...vascripts/related_issues/components/add_issuable_form.vue
+2
-2
ee/app/assets/javascripts/related_issues/components/issue_item.vue
...sets/javascripts/related_issues/components/issue_item.vue
+2
-1
ee/app/assets/javascripts/related_issues/components/related_issues_block.vue
...cripts/related_issues/components/related_issues_block.vue
+1
-1
ee/spec/javascripts/epics/epic_show/components/epic_header_spec.js
...avascripts/epics/epic_show/components/epic_header_spec.js
+4
-4
qa/qa/ee.rb
qa/qa/ee.rb
+12
-0
qa/qa/ee/factory/resource/epic.rb
qa/qa/ee/factory/resource/epic.rb
+30
-0
qa/qa/ee/page/group/epic/edit.rb
qa/qa/ee/page/group/epic/edit.rb
+33
-0
qa/qa/ee/page/group/epic/index.rb
qa/qa/ee/page/group/epic/index.rb
+31
-0
qa/qa/ee/page/group/epic/show.rb
qa/qa/ee/page/group/epic/show.rb
+62
-0
qa/qa/factory/product.rb
qa/qa/factory/product.rb
+2
-0
qa/qa/page/menu/side.rb
qa/qa/page/menu/side.rb
+6
-0
qa/qa/specs/features/browser_ui/2_plan/epic/create_edit_delete_epic_spec.rb
...es/browser_ui/2_plan/epic/create_edit_delete_epic_spec.rb
+80
-0
No files found.
app/assets/javascripts/notes/components/comment_form.vue
View file @
d4c04d8e
...
...
@@ -380,7 +380,7 @@ js-gfm-input js-autosize markdown-area js-vue-textarea qa-comment-input"
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
>
<button
:disabled=
"isSubmitButtonDisabled"
class=
"btn btn-
create
comment-btn js-comment-button js-comment-submit-button
class=
"btn btn-
success
comment-btn js-comment-button js-comment-submit-button
qa-comment-button"
type=
"submit"
@
click.prevent=
"handleSave()"
>
...
...
ee/app/assets/javascripts/epics/epic_show/components/epic_header.vue
View file @
d4c04d8e
...
...
@@ -54,7 +54,7 @@
return
this
.
isEpicOpen
?
__
(
'
Open
'
)
:
__
(
'
Closed
'
);
},
actionButtonClass
()
{
return
`btn btn-grouped js-btn-epic-action
${
this
.
isEpicOpen
?
'
btn-close
'
:
'
btn-open
'
}
`
;
return
`btn btn-grouped js-btn-epic-action
qa-close-reopen-epic-button
${
this
.
isEpicOpen
?
'
btn-close
'
:
'
btn-open
'
}
`
;
},
actionButtonText
()
{
return
this
.
isEpicOpen
?
__
(
'
Close epic
'
)
:
__
(
'
Reopen epic
'
);
...
...
ee/app/assets/javascripts/epics/new_epic/components/new_epic.vue
View file @
d4c04d8e
...
...
@@ -61,7 +61,7 @@
<
template
>
<div
class=
"dropdown new-epic-dropdown"
>
<button
class=
"btn btn-success"
class=
"btn btn-success
qa-new-epic-button
"
type=
"button"
data-toggle=
"dropdown"
@
click=
"focusInput"
...
...
@@ -77,13 +77,13 @@
v-model=
"title"
:placeholder=
"s__('Title')"
type=
"text"
class=
"form-control"
class=
"form-control
qa-epic-title
"
/>
<loading-button
:disabled=
"isCreatingDisabled"
:loading=
"creating"
:label=
"buttonLabel"
container-class=
"btn btn-success btn-inverted prepend-top-10"
container-class=
"btn btn-success btn-inverted prepend-top-10
qa-create-epic-button
"
@
click.stop=
"createEpic"
/>
</div>
...
...
ee/app/assets/javascripts/related_issues/components/add_issuable_form.vue
View file @
d4c04d8e
...
...
@@ -140,7 +140,7 @@ export default {
:value=
"inputValue"
:placeholder=
"inputPlaceholder"
type=
"text"
class=
"js-add-issuable-form-input add-issuable-form-input"
class=
"js-add-issuable-form-input add-issuable-form-input
qa-add-issue-input
"
@
input=
"onInput"
@
focus=
"onFocus"
@
blur=
"onBlur"
/>
...
...
@@ -152,7 +152,7 @@ export default {
ref=
"addButton"
:disabled=
"isSubmitButtonDisabled"
type=
"submit"
class=
"js-add-issuable-form-add-button btn btn-success float-left"
>
class=
"js-add-issuable-form-add-button btn btn-success float-left
qa-add-issue-button
"
>
Add
<gl-loading-icon
v-if=
"isSubmitting"
...
...
ee/app/assets/javascripts/related_issues/components/issue_item.vue
View file @
d4c04d8e
...
...
@@ -54,7 +54,8 @@ export default {
v-tooltip
:disabled=
"removeDisabled"
type=
"button"
class=
"btn btn-default js-issue-item-remove-button flex-align-self-center flex-right"
class=
"btn btn-default js-issue-item-remove-button flex-align-self-center flex-right
qa-remove-issue-button"
title=
"Remove"
aria-label=
"Remove"
@
click=
"onRemoveRequest"
...
...
ee/app/assets/javascripts/related_issues/components/related_issues_block.vue
View file @
d4c04d8e
...
...
@@ -179,7 +179,7 @@ fa fa-question-circle"
ref=
"issueCountBadgeAddButton"
type=
"button"
class=
"js-issue-count-badge-add-button
issue-count-badge-add-button btn btn-sm btn-default"
issue-count-badge-add-button btn btn-sm btn-default
qa-add-issues-button
"
aria-label=
"Add an issue"
data-placement=
"top"
@
click=
"toggleAddRelatedIssuesForm"
...
...
ee/spec/javascripts/epics/epic_show/components/epic_header_spec.js
View file @
d4c04d8e
...
...
@@ -80,14 +80,14 @@ describe('epicHeader', () => {
});
describe
(
'
actionButtonClass
'
,
()
=>
{
it
(
'
returns classes `btn btn-grouped js-btn-epic-action` & `btn-close` when `isEpicOpen` prop is true
'
,
()
=>
{
it
(
'
returns classes `btn btn-grouped js-btn-epic-action
qa-close-reopen-epic-button
` & `btn-close` when `isEpicOpen` prop is true
'
,
()
=>
{
vm
.
isEpicOpen
=
true
;
expect
(
vm
.
actionButtonClass
).
toContain
(
'
btn btn-grouped js-btn-epic-action btn-close
'
);
expect
(
vm
.
actionButtonClass
).
toContain
(
'
btn btn-grouped js-btn-epic-action
qa-close-reopen-epic-button
btn-close
'
);
});
it
(
'
returns classes `btn btn-grouped js-btn-epic-action` & `btn-open` when `isEpicOpen` prop is false
'
,
()
=>
{
it
(
'
returns classes `btn btn-grouped js-btn-epic-action
qa-close-reopen-epic-button
` & `btn-open` when `isEpicOpen` prop is false
'
,
()
=>
{
vm
.
isEpicOpen
=
false
;
expect
(
vm
.
actionButtonClass
).
toContain
(
'
btn btn-grouped js-btn-epic-action btn-open
'
);
expect
(
vm
.
actionButtonClass
).
toContain
(
'
btn btn-grouped js-btn-epic-action
qa-close-reopen-epic-button
btn-open
'
);
});
});
...
...
qa/qa/ee.rb
View file @
d4c04d8e
...
...
@@ -56,6 +56,14 @@ module QA
module
MergeRequest
autoload
:Show
,
'qa/ee/page/merge_request/show'
end
module
Group
module
Epic
autoload
:Index
,
'qa/ee/page/group/epic/index'
autoload
:Show
,
'qa/ee/page/group/epic/show'
autoload
:Edit
,
'qa/ee/page/group/epic/edit'
end
end
end
module
Factory
...
...
@@ -64,6 +72,10 @@ module QA
module
Geo
autoload
:Node
,
'qa/ee/factory/geo/node'
end
module
Resource
autoload
:Epic
,
'qa/ee/factory/resource/epic'
end
end
module
Scenario
...
...
qa/qa/ee/factory/resource/epic.rb
0 → 100644
View file @
d4c04d8e
# frozen_string_literal: true
module
QA
module
EE
module
Factory
module
Resource
class
Epic
<
QA
::
Factory
::
Base
attr_accessor
:title
dependency
QA
::
Factory
::
Resource
::
Group
,
as: :group
def
fabricate!
group
.
visit!
QA
::
Page
::
Menu
::
Side
.
act
{
click_epics
}
Page
::
Group
::
Epic
::
Index
.
perform
do
|
page
|
page
.
click_new_epic
page
.
set_title
(
@title
)
page
.
create_new_epic
page
.
wait
(
time:
1
)
do
page
.
has_text?
(
@title
)
end
end
end
end
end
end
end
end
qa/qa/ee/page/group/epic/edit.rb
0 → 100644
View file @
d4c04d8e
# frozen_string_literal: true
module
QA
module
EE
module
Page
module
Group
module
Epic
class
Edit
<
QA
::
Page
::
Base
include
QA
::
Page
::
Component
::
Issuable
::
Common
def
set_title
(
title
)
fill_element
:title_input
,
title
end
def
set_description
(
description
)
fill_element
:description_textarea
,
description
end
def
save_changes
click_element
:save_button
end
def
delete_epic
page
.
accept_alert
(
"Epic will be removed! Are you sure?"
)
do
click_element
:delete_button
end
end
end
end
end
end
end
end
qa/qa/ee/page/group/epic/index.rb
0 → 100644
View file @
d4c04d8e
# frozen_string_literal: true
module
QA
module
EE
module
Page
module
Group
module
Epic
class
Index
<
QA
::
Page
::
Base
view
'ee/app/assets/javascripts/epics/new_epic/components/new_epic.vue'
do
element
:new_epic_button
element
:epic_title
element
:create_epic_button
end
def
click_new_epic
click_element
:new_epic_button
end
def
set_title
(
title
)
fill_element
:epic_title
,
title
end
def
create_new_epic
click_element
:create_epic_button
end
end
end
end
end
end
end
qa/qa/ee/page/group/epic/show.rb
0 → 100644
View file @
d4c04d8e
# frozen_string_literal: true
module
QA
module
EE
module
Page
module
Group
module
Epic
class
Show
<
QA
::
Page
::
Base
include
QA
::
Page
::
Component
::
Issuable
::
Common
view
'ee/app/assets/javascripts/related_issues/components/related_issues_block.vue'
do
element
:add_issues_button
end
view
'ee/app/assets/javascripts/related_issues/components/add_issuable_form.vue'
do
element
:add_issue_input
element
:add_issue_button
end
view
'ee/app/assets/javascripts/related_issues/components/issue_item.vue'
do
element
:remove_issue_button
end
view
'ee/app/assets/javascripts/epics/epic_show/components/epic_header.vue'
do
element
:close_reopen_epic_button
end
def
add_issue_to_epic
(
issue_url
)
click_element
:add_issues_button
fill_element
:add_issue_input
,
issue_url
click_element
:add_issue_button
click_element
:add_issue_button
end
def
add_comment_to_epic
(
comment
)
fill_element
:comment_input
,
comment
click_element
:comment_button
end
def
remove_issue_from_epic
click_element
:remove_issue_button
end
def
go_to_edit_page
click_element
:edit_button
end
def
delete_epic
page
.
accept_alert
(
"Epic will be removed! Are you sure?"
)
do
click_element
:delete_epic_button
end
end
def
close_reopen_epic
click_element
:close_reopen_epic_button
end
end
end
end
end
end
end
qa/qa/factory/product.rb
View file @
d4c04d8e
...
...
@@ -3,6 +3,8 @@ require 'capybara/dsl'
module
QA
module
Factory
class
Product
attr_reader
:location
include
Capybara
::
DSL
Attribute
=
Struct
.
new
(
:name
,
:block
)
...
...
qa/qa/page/menu/side.rb
View file @
d4c04d8e
...
...
@@ -90,6 +90,12 @@ module QA
end
end
def
click_epics
within_sidebar
do
click_link
(
'Epics'
)
end
end
private
def
hover_settings
...
...
qa/qa/specs/features/browser_ui/2_plan/epic/create_edit_delete_epic_spec.rb
0 → 100644
View file @
d4c04d8e
# frozen_string_literal: true
module
QA
context
:plan
do
describe
'Epics Creation'
do
let!
(
:issue
)
do
Factory
::
Resource
::
Issue
.
fabricate!
do
|
issue
|
issue
.
title
=
'Issue for epics tests'
end
end
before
(
:all
)
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
end
it
'user creates, edits, deletes epic'
do
epic
=
EE
::
Factory
::
Resource
::
Epic
.
fabricate!
do
|
epic
|
epic
.
title
=
"My First Epic"
end
expect
(
page
).
to
have_content
(
/My First Epic/
)
# Edit Epics
EE
::
Page
::
Group
::
Epic
::
Show
.
act
{
go_to_edit_page
}
EE
::
Page
::
Group
::
Epic
::
Edit
.
perform
do
|
edit_page
|
edit_page
.
set_description
(
"My Edited Epic Description"
)
edit_page
.
set_title
(
"My Edited Epic"
)
edit_page
.
save_changes
expect
(
edit_page
).
to
have_content
(
/My Edited Epic/
)
end
# Add/Remove Issues to/from Epics
EE
::
Page
::
Group
::
Epic
::
Show
.
perform
do
|
show_page
|
show_page
.
add_issue_to_epic
(
issue
.
location
)
show_page
.
remove_issue_from_epic
expect
(
show_page
).
to
have_content
(
/removed issue/
)
end
# Comment on Epics
EE
::
Page
::
Group
::
Epic
::
Show
.
act
{
add_comment_to_epic
(
"My Epic Comments"
)
}
expect
(
page
).
to
have_content
(
/My Epic Comments/
)
# Add Issue to Epic using quick actions
issue
.
visit!
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show_page
|
show_page
.
comment
(
"/epic
#{
epic
.
location
}
"
)
show_page
.
comment
(
"/remove_epic"
)
expect
(
show_page
).
to
have_content
(
/removed from epic/
)
end
epic
.
visit!
expect
(
page
).
to
have_content
(
"added issue"
,
count:
2
)
expect
(
page
).
to
have_content
(
"removed issue"
,
count:
2
)
# Close Epic
EE
::
Page
::
Group
::
Epic
::
Show
.
act
{
close_reopen_epic
}
expect
(
page
).
to
have_content
(
/Closed/
)
# Reopen Epic
EE
::
Page
::
Group
::
Epic
::
Show
.
act
{
close_reopen_epic
}
expect
(
page
).
to
have_content
(
/Open/
)
# Delete Epics
EE
::
Page
::
Group
::
Epic
::
Show
.
act
{
go_to_edit_page
}
EE
::
Page
::
Group
::
Epic
::
Edit
.
perform
do
|
edit_page
|
edit_page
.
delete_epic
expect
(
edit_page
).
to
have_content
(
/The epic was successfully deleted/
)
end
end
end
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