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
071b39a2
Commit
071b39a2
authored
Oct 17, 2018
by
GitLab Release Tools Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
parents
667c7f91
4919d779
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
274 additions
and
32 deletions
+274
-32
app/assets/javascripts/environments/components/empty_state.vue
...ssets/javascripts/environments/components/empty_state.vue
+15
-14
app/views/layouts/nav/sidebar/_project.html.haml
app/views/layouts/nav/sidebar/_project.html.haml
+2
-2
app/views/projects/labels/index.html.haml
app/views/projects/labels/index.html.haml
+1
-1
app/views/shared/issuable/_label_dropdown.html.haml
app/views/shared/issuable/_label_dropdown.html.haml
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-1
app/views/shared/labels/_form.html.haml
app/views/shared/labels/_form.html.haml
+4
-4
changelogs/unreleased/gt-update-environments-empty-state.yml
changelogs/unreleased/gt-update-environments-empty-state.yml
+5
-0
doc/administration/git_protocol.md
doc/administration/git_protocol.md
+97
-0
doc/administration/index.md
doc/administration/index.md
+1
-0
locale/gitlab.pot
locale/gitlab.pot
+1
-1
qa/qa.rb
qa/qa.rb
+6
-0
qa/qa/factory/resource/label.rb
qa/qa/factory/resource/label.rb
+39
-0
qa/qa/factory/resource/merge_request.rb
qa/qa/factory/resource/merge_request.rb
+4
-0
qa/qa/page/label/index.rb
qa/qa/page/label/index.rb
+15
-0
qa/qa/page/label/new.rb
qa/qa/page/label/new.rb
+30
-0
qa/qa/page/merge_request/new.rb
qa/qa/page/merge_request/new.rb
+10
-0
qa/qa/page/merge_request/show.rb
qa/qa/page/merge_request/show.rb
+11
-0
qa/qa/page/project/menu.rb
qa/qa/page/project/menu.rb
+13
-0
qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb
...er_ui/3_create/merge_request/create_merge_request_spec.rb
+13
-3
spec/features/projects/environments/environments_spec.rb
spec/features/projects/environments/environments_spec.rb
+1
-1
spec/javascripts/environments/emtpy_state_spec.js
spec/javascripts/environments/emtpy_state_spec.js
+2
-2
spec/javascripts/environments/environments_app_spec.js
spec/javascripts/environments/environments_app_spec.js
+2
-2
No files found.
app/assets/javascripts/environments/components/empty_state.vue
View file @
071b39a2
...
@@ -18,27 +18,28 @@ export default {
...
@@ -18,27 +18,28 @@ export default {
};
};
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"
blank-state-row
"
>
<div
class=
"
empty-state
"
>
<div
class=
"
blank-state-center
"
>
<div
class=
"
text-content
"
>
<h
2
class=
"blank-state-title js-blank-state-title"
>
<h
4
class=
"blank-state-title js-blank-state-title"
>
{{
s__
(
"
Environments|You don't have any environments right now
.
"
)
}}
{{
s__
(
"
Environments|You don't have any environments right now
"
)
}}
</h
2
>
</h
4
>
<p
class=
"blank-state-text"
>
<p
class=
"blank-state-text"
>
{{
s__
(
`Environments|Environments are places where
{{
s__
(
`Environments|Environments are places where
code gets deployed, such as staging or production.`
)
}}
code gets deployed, such as staging or production.`
)
}}
<br
/>
<a
:href=
"helpPath"
>
<a
:href=
"helpPath"
>
{{
s__
(
"
Environments|Read more about environments
"
)
}}
{{
s__
(
"
Environments|Read more about environments
"
)
}}
</a>
</a>
</p>
</p>
<a
<div
class=
"text-center"
>
v-if=
"canCreateEnvironment"
<a
:href=
"newPath"
v-if=
"canCreateEnvironment"
class=
"btn btn-success js-new-environment-button"
:href=
"newPath"
>
class=
"btn btn-success js-new-environment-button"
{{
s__
(
"
Environments|New environment
"
)
}}
>
</a>
{{
s__
(
"
Environments|New environment
"
)
}}
</a>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
app/views/layouts/nav/sidebar/_project.html.haml
View file @
071b39a2
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
-
if
project_nav_tab?
:issues
-
if
project_nav_tab?
:issues
=
nav_link
(
controller:
@project
.
issues_enabled?
?
[
:issues
,
:labels
,
:milestones
,
:boards
]
:
:issues
)
do
=
nav_link
(
controller:
@project
.
issues_enabled?
?
[
:issues
,
:labels
,
:milestones
,
:boards
]
:
:issues
)
do
=
link_to
project_issues_path
(
@project
),
class:
'shortcuts-issues'
do
=
link_to
project_issues_path
(
@project
),
class:
'shortcuts-issues
qa-issues-item
'
do
.nav-icon-container
.nav-icon-container
=
sprite_icon
(
'issues'
)
=
sprite_icon
(
'issues'
)
%span
.nav-item-name
%span
.nav-item-name
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
=
boards_link_text
=
boards_link_text
=
nav_link
(
controller: :labels
)
do
=
nav_link
(
controller: :labels
)
do
=
link_to
project_labels_path
(
@project
),
title:
_
(
'Labels'
)
do
=
link_to
project_labels_path
(
@project
),
title:
_
(
'Labels'
)
,
class:
'qa-labels-link'
do
%span
%span
=
_
(
'Labels'
)
=
_
(
'Labels'
)
...
...
app/views/projects/labels/index.html.haml
View file @
071b39a2
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
-
if
can_admin_label
-
if
can_admin_label
-
content_for
(
:header_content
)
do
-
content_for
(
:header_content
)
do
.nav-controls
.nav-controls
=
link_to
_
(
'New label'
),
new_project_label_path
(
@project
),
class:
"btn btn-success"
=
link_to
_
(
'New label'
),
new_project_label_path
(
@project
),
class:
"btn btn-success
qa-label-create-new
"
-
if
labels_or_filters
-
if
labels_or_filters
#promote-label-modal
#promote-label-modal
...
...
app/views/shared/issuable/_label_dropdown.html.haml
View file @
071b39a2
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
=
hidden_field_tag
data_options
[
:field_name
],
use_id
?
label
.
try
(
:id
)
:
label
.
try
(
:title
),
id:
nil
=
hidden_field_tag
data_options
[
:field_name
],
use_id
?
label
.
try
(
:id
)
:
label
.
try
(
:title
),
id:
nil
.dropdown
.dropdown
%button
.dropdown-menu-toggle.js-label-select.js-multiselect
{
class:
classes
.
join
(
' '
),
type:
"button"
,
data:
dropdown_data
}
%button
.dropdown-menu-toggle.js-label-select.js-multiselect
.qa-issuable-label
{
class:
classes
.
join
(
' '
),
type:
"button"
,
data:
dropdown_data
}
-
apply_is_default_styles
=
(
selected
.
nil?
||
selected
.
empty?
)
&&
!
no_default_styles
-
apply_is_default_styles
=
(
selected
.
nil?
||
selected
.
empty?
)
&&
!
no_default_styles
%span
.dropdown-toggle-text
{
class:
(
"is-default"
if
apply_is_default_styles
)
}
%span
.dropdown-toggle-text
{
class:
(
"is-default"
if
apply_is_default_styles
)
}
=
multi_label_name
(
selected
,
label_name
)
=
multi_label_name
(
selected
,
label_name
)
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
071b39a2
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
=
icon
(
'spinner spin'
,
class:
'hidden block-loading'
,
'aria-hidden'
:
'true'
)
=
icon
(
'spinner spin'
,
class:
'hidden block-loading'
,
'aria-hidden'
:
'true'
)
-
if
can_edit_issuable
-
if
can_edit_issuable
=
link_to
_
(
'Edit'
),
'#'
,
class:
'js-sidebar-dropdown-toggle edit-link float-right'
=
link_to
_
(
'Edit'
),
'#'
,
class:
'js-sidebar-dropdown-toggle edit-link float-right'
.value.issuable-show-labels.dont-hide.hide-collapsed
{
class:
(
"has-labels"
if
selected_labels
.
any?
)
}
.value.issuable-show-labels.dont-hide.hide-collapsed
.qa-labels-block
{
class:
(
"has-labels"
if
selected_labels
.
any?
)
}
-
if
selected_labels
.
any?
-
if
selected_labels
.
any?
-
selected_labels
.
each
do
|
label
|
-
selected_labels
.
each
do
|
label
|
=
link_to_label
(
label
,
subject:
issuable
.
project
,
type:
issuable
.
to_ability_name
)
=
link_to_label
(
label
,
subject:
issuable
.
project
,
type:
issuable
.
to_ability_name
)
...
...
app/views/shared/labels/_form.html.haml
View file @
071b39a2
...
@@ -4,18 +4,18 @@
...
@@ -4,18 +4,18 @@
.form-group.row
.form-group.row
=
f
.
label
:title
,
class:
'col-form-label col-sm-2'
=
f
.
label
:title
,
class:
'col-form-label col-sm-2'
.col-sm-10
.col-sm-10
=
f
.
text_field
:title
,
class:
"form-control"
,
required:
true
,
autofocus:
true
=
f
.
text_field
:title
,
class:
"form-control
qa-label-title
"
,
required:
true
,
autofocus:
true
.form-group.row
.form-group.row
=
f
.
label
:description
,
class:
'col-form-label col-sm-2'
=
f
.
label
:description
,
class:
'col-form-label col-sm-2'
.col-sm-10
.col-sm-10
=
f
.
text_field
:description
,
class:
"form-control js-quick-submit"
=
f
.
text_field
:description
,
class:
"form-control js-quick-submit
qa-label-description
"
.form-group.row
.form-group.row
=
f
.
label
:color
,
"Background color"
,
class:
'col-form-label col-sm-2'
=
f
.
label
:color
,
"Background color"
,
class:
'col-form-label col-sm-2'
.col-sm-10
.col-sm-10
.input-group
.input-group
.input-group-prepend
.input-group-prepend
.input-group-text.label-color-preview
.input-group-text.label-color-preview
=
f
.
text_field
:color
,
class:
"form-control"
=
f
.
text_field
:color
,
class:
"form-control
qa-label-color
"
.form-text.text-muted
.form-text.text-muted
Choose any color.
Choose any color.
%br
%br
...
@@ -30,5 +30,5 @@
...
@@ -30,5 +30,5 @@
-
if
@label
.
persisted?
-
if
@label
.
persisted?
=
f
.
submit
'Save changes'
,
class:
'btn btn-success js-save-button'
=
f
.
submit
'Save changes'
,
class:
'btn btn-success js-save-button'
-
else
-
else
=
f
.
submit
'Create label'
,
class:
'btn btn-success js-save-button'
=
f
.
submit
'Create label'
,
class:
'btn btn-success js-save-button
qa-label-create-button
'
=
link_to
'Cancel'
,
back_path
,
class:
'btn btn-cancel'
=
link_to
'Cancel'
,
back_path
,
class:
'btn btn-cancel'
changelogs/unreleased/gt-update-environments-empty-state.yml
0 → 100644
View file @
071b39a2
---
title
:
Update environments empty state
merge_request
:
22297
author
:
George Tsiolis
type
:
other
doc/administration/git_protocol.md
0 → 100644
View file @
071b39a2
---
description
:
"
Set
and
configure
Git
protocol
v2"
---
# Configuring Git Protocol v2
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/46555) in GitLab 11.4.
---
Git protocol v2 improves the v1 wire protocol in several ways and is
enabled by default in GitLab for HTTP requests. In order to enable SSH,
further configuration is needed by the administrator.
More details about the new features and improvements are available in
the
[
Google Open Source Blog
](
https://opensource.googleblog.com/2018/05/introducing-git-protocol-version-2.html
)
and the
[
protocol documentation
](
https://github.com/git/git/blob/master/Documentation/technical/protocol-v2.txt
)
.
## Requirements
From the client side,
`git`
`v2.18.0`
or newer must be installed.
From the server side, if we want to configure SSH we need to set the
`sshd`
server to accept the
`GIT_PROTOCOL`
environment,
```
# /etc/ssh/sshd_config
AcceptEnv GIT_PROTOCOL
```
Once configured, restart the SSH daemon. In Ubuntu, run:
```
sh
sudo
service ssh restart
```
## Instructions
In order to use the new protocol, clients need to either pass the configuration
`-c protocol.version=2`
to the git command, or set it globally:
```
sh
git config
--global
protocol.version 2
```
### HTTP connections
Verify Git v2 is used by the client:
```
sh
GIT_TRACE_CURL
=
1 git
-c
protocol.version
=
2 ls-remote https://your-gitlab-instance.com/group/repo.git 2>&1 |
grep
Git-Protocol
```
You should see that the
`Git-Protocol`
header is sent:
```
16:29:44.577888 http.c:657 => Send header: Git-Protocol: version=2
```
Verify Git v2 is used by the server:
```
sh
GIT_TRACE_PACKET
=
1 git
-c
protocol.version
=
2 ls-remote https://your-gitlab-instance.com/group/repo.git 2>&1 |
head
```
Example response using Git protocol v2:
```
sh
$ GIT_TRACE_PACKET
=
1 git
-c
protocol.version
=
2 ls-remote https://your-gitlab-instance.com/group/repo.git 2>&1 |
head
10:42:50.574485 pkt-line.c:80 packet: git<
# service=git-upload-pack
10:42:50.574653 pkt-line.c:80 packet: git< 0000
10:42:50.574673 pkt-line.c:80 packet: git< version 2
10:42:50.574679 pkt-line.c:80 packet: git<
agent
=
git/2.18.1
10:42:50.574684 pkt-line.c:80 packet: git< ls-refs
10:42:50.574688 pkt-line.c:80 packet: git<
fetch
=
shallow
10:42:50.574693 pkt-line.c:80 packet: git< server-option
10:42:50.574697 pkt-line.c:80 packet: git< 0000
10:42:50.574817 pkt-line.c:80 packet: git< version 2
10:42:50.575308 pkt-line.c:80 packet: git<
agent
=
git/2.18.1
```
### SSH Connections
Verify Git v2 is used by the client:
```
sh
GIT_SSH_COMMAND
=
"ssh -v"
git
-c
protocol.version
=
2 ls-remote ssh://your-gitlab-instance.com:group/repo.git 2>&1 |grep GIT_PROTOCOL
```
You should see that the
`GIT_PROTOCOL`
environment variable is sent:
```
debug1: Sending env GIT_PROTOCOL = version=2
```
For the server side, you can use the
[
same examples from HTTP
](
#http-connections
)
, changing the
URL to use SSH.
doc/administration/index.md
View file @
071b39a2
...
@@ -130,6 +130,7 @@ created in snippets, wikis, and repos.
...
@@ -130,6 +130,7 @@ created in snippets, wikis, and repos.
-
[
Custom Git hooks
](
custom_hooks.md
)
: Custom Git hooks (on the filesystem) for when webhooks aren't enough.
-
[
Custom Git hooks
](
custom_hooks.md
)
: Custom Git hooks (on the filesystem) for when webhooks aren't enough.
-
[
Git LFS configuration
](
../workflow/lfs/lfs_administration.md
)
: Learn how to configure LFS for GitLab.
-
[
Git LFS configuration
](
../workflow/lfs/lfs_administration.md
)
: Learn how to configure LFS for GitLab.
-
[
Housekeeping
](
housekeeping.md
)
: Keep your Git repositories tidy and fast.
-
[
Housekeeping
](
housekeeping.md
)
: Keep your Git repositories tidy and fast.
-
[
Configuring Git Protocol v2
](
git_protocol.md
)
: Git protocol version 2 support.
## Monitoring GitLab
## Monitoring GitLab
...
...
locale/gitlab.pot
View file @
071b39a2
...
@@ -2600,7 +2600,7 @@ msgstr ""
...
@@ -2600,7 +2600,7 @@ msgstr ""
msgid "Environments|Updated"
msgid "Environments|Updated"
msgstr ""
msgstr ""
msgid "Environments|You don't have any environments right now
.
"
msgid "Environments|You don't have any environments right now"
msgstr ""
msgstr ""
msgid "Epic"
msgid "Epic"
...
...
qa/qa.rb
View file @
071b39a2
...
@@ -45,6 +45,7 @@ module QA
...
@@ -45,6 +45,7 @@ module QA
autoload
:Group
,
'qa/factory/resource/group'
autoload
:Group
,
'qa/factory/resource/group'
autoload
:Issue
,
'qa/factory/resource/issue'
autoload
:Issue
,
'qa/factory/resource/issue'
autoload
:Project
,
'qa/factory/resource/project'
autoload
:Project
,
'qa/factory/resource/project'
autoload
:Label
,
'qa/factory/resource/label'
autoload
:MergeRequest
,
'qa/factory/resource/merge_request'
autoload
:MergeRequest
,
'qa/factory/resource/merge_request'
autoload
:ProjectImportedFromGithub
,
'qa/factory/resource/project_imported_from_github'
autoload
:ProjectImportedFromGithub
,
'qa/factory/resource/project_imported_from_github'
autoload
:MergeRequestFromFork
,
'qa/factory/resource/merge_request_from_fork'
autoload
:MergeRequestFromFork
,
'qa/factory/resource/merge_request_from_fork'
...
@@ -240,6 +241,11 @@ module QA
...
@@ -240,6 +241,11 @@ module QA
autoload
:Banner
,
'qa/page/layout/banner'
autoload
:Banner
,
'qa/page/layout/banner'
end
end
module
Label
autoload
:New
,
'qa/page/label/new'
autoload
:Index
,
'qa/page/label/index'
end
module
MergeRequest
module
MergeRequest
autoload
:New
,
'qa/page/merge_request/new'
autoload
:New
,
'qa/page/merge_request/new'
autoload
:Show
,
'qa/page/merge_request/show'
autoload
:Show
,
'qa/page/merge_request/show'
...
...
qa/qa/factory/resource/label.rb
0 → 100644
View file @
071b39a2
require
'securerandom'
module
QA
module
Factory
module
Resource
class
Label
<
Factory
::
Base
attr_accessor
:title
,
:description
,
:color
product
(
:title
)
{
|
factory
|
factory
.
title
}
dependency
Factory
::
Resource
::
Project
,
as: :project
do
|
project
|
project
.
name
=
'project-with-label'
end
def
initialize
@title
=
"qa-test-
#{
SecureRandom
.
hex
(
8
)
}
"
@description
=
'This is a test label'
@color
=
'#0033CC'
end
def
fabricate!
project
.
visit!
Page
::
Project
::
Menu
.
act
{
go_to_labels
}
Page
::
Label
::
Index
.
act
{
go_to_new_label
}
Page
::
Label
::
New
.
perform
do
|
page
|
page
.
fill_title
(
@title
)
page
.
fill_description
(
@description
)
page
.
fill_color
(
@color
)
page
.
create_label
end
end
end
end
end
end
qa/qa/factory/resource/merge_request.rb
View file @
071b39a2
...
@@ -56,6 +56,10 @@ module QA
...
@@ -56,6 +56,10 @@ module QA
page
.
fill_title
(
@title
)
page
.
fill_title
(
@title
)
page
.
fill_description
(
@description
)
page
.
fill_description
(
@description
)
page
.
choose_milestone
(
@milestone
)
if
@milestone
page
.
choose_milestone
(
@milestone
)
if
@milestone
labels
.
each
do
|
label
|
page
.
select_label
(
label
)
end
page
.
create_merge_request
page
.
create_merge_request
end
end
end
end
...
...
qa/qa/page/label/index.rb
0 → 100644
View file @
071b39a2
module
QA
module
Page
module
Label
class
Index
<
Page
::
Base
view
'app/views/projects/labels/index.html.haml'
do
element
:label_create_new
end
def
go_to_new_label
click_element
:label_create_new
end
end
end
end
end
qa/qa/page/label/new.rb
0 → 100644
View file @
071b39a2
module
QA
module
Page
module
Label
class
New
<
Page
::
Base
view
'app/views/shared/labels/_form.html.haml'
do
element
:label_title
element
:label_description
element
:label_color
element
:label_create_button
end
def
create_label
click_element
:label_create_button
end
def
fill_title
(
title
)
fill_element
:label_title
,
title
end
def
fill_description
(
description
)
fill_element
:label_description
,
description
end
def
fill_color
(
color
)
fill_element
:label_color
,
color
end
end
end
end
end
qa/qa/page/merge_request/new.rb
View file @
071b39a2
...
@@ -22,6 +22,10 @@ module QA
...
@@ -22,6 +22,10 @@ module QA
element
:issuable_dropdown_menu_milestone
element
:issuable_dropdown_menu_milestone
end
end
view
'app/views/shared/issuable/_label_dropdown.html.haml'
do
element
:issuable_label
end
def
create_merge_request
def
create_merge_request
click_element
:issuable_create_button
click_element
:issuable_create_button
end
end
...
@@ -40,6 +44,12 @@ module QA
...
@@ -40,6 +44,12 @@ module QA
click_on
milestone
.
title
click_on
milestone
.
title
end
end
end
end
def
select_label
(
label
)
click_element
:issuable_label
click_link
label
.
title
end
end
end
end
end
end
end
...
...
qa/qa/page/merge_request/show.rb
View file @
071b39a2
...
@@ -23,6 +23,10 @@ module QA
...
@@ -23,6 +23,10 @@ module QA
element
:squash_checkbox
element
:squash_checkbox
end
end
view
'app/views/shared/issuable/_sidebar.html.haml'
do
element
:labels_block
end
def
fast_forward_possible?
def
fast_forward_possible?
!
has_text?
(
'Fast-forward merge is not possible'
)
!
has_text?
(
'Fast-forward merge is not possible'
)
end
end
...
@@ -64,6 +68,13 @@ module QA
...
@@ -64,6 +68,13 @@ module QA
end
end
end
end
def
has_label?
(
label
)
page
.
within
(
element_selector_css
(
:labels_block
))
do
element
=
find
(
'span'
,
text:
label
)
!
element
.
nil?
end
end
def
merge!
def
merge!
# The merge button is disabled on load
# The merge button is disabled on load
wait
do
wait
do
...
...
qa/qa/page/project/menu.rb
View file @
071b39a2
...
@@ -22,6 +22,7 @@ module QA
...
@@ -22,6 +22,7 @@ module QA
element
:activity_link
,
"title: _('Activity')"
# rubocop:disable QA/ElementWithPattern
element
:activity_link
,
"title: _('Activity')"
# rubocop:disable QA/ElementWithPattern
element
:wiki_link_text
,
"Wiki"
# rubocop:disable QA/ElementWithPattern
element
:wiki_link_text
,
"Wiki"
# rubocop:disable QA/ElementWithPattern
element
:milestones_link
element
:milestones_link
element
:labels_link
end
end
view
'app/assets/javascripts/fly_out_nav.js'
do
view
'app/assets/javascripts/fly_out_nav.js'
do
...
@@ -104,8 +105,20 @@ module QA
...
@@ -104,8 +105,20 @@ module QA
end
end
end
end
def
go_to_labels
hover_issues
{
click_element
:labels_link
}
end
private
private
def
hover_issues
within_sidebar
do
find_element
(
:issues_item
).
hover
yield
end
end
def
hover_settings
def
hover_settings
within_sidebar
do
within_sidebar
do
find
(
'.qa-settings-item'
).
hover
find
(
'.qa-settings-item'
).
hover
...
...
qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb
View file @
071b39a2
...
@@ -16,16 +16,26 @@ module QA
...
@@ -16,16 +16,26 @@ module QA
milestone
.
project
=
current_project
milestone
.
project
=
current_project
end
end
new_label
=
Factory
::
Resource
::
Label
.
fabricate!
do
|
label
|
label
.
project
=
current_project
label
.
title
=
'qa-mr-test-label'
label
.
description
=
'Merge Request label'
end
Factory
::
Resource
::
MergeRequest
.
fabricate!
do
|
merge_request
|
Factory
::
Resource
::
MergeRequest
.
fabricate!
do
|
merge_request
|
merge_request
.
title
=
'This is a merge request with a milestone'
merge_request
.
title
=
'This is a merge request with a milestone'
merge_request
.
description
=
'Great feature with milestone'
merge_request
.
description
=
'Great feature with milestone'
merge_request
.
project
=
current_project
merge_request
.
project
=
current_project
merge_request
.
milestone
=
current_milestone
merge_request
.
milestone
=
current_milestone
merge_request
.
labels
.
push
(
new_label
)
end
end
expect
(
page
).
to
have_content
(
'This is a merge request with a milestone'
)
Page
::
MergeRequest
::
Show
.
perform
do
|
merge_request
|
expect
(
page
).
to
have_content
(
'Great feature with milestone'
)
expect
(
merge_request
).
to
have_content
(
'This is a merge request with a milestone'
)
expect
(
page
).
to
have_content
(
/Opened [\w\s]+ ago/
)
expect
(
merge_request
).
to
have_content
(
'Great feature with milestone'
)
expect
(
merge_request
).
to
have_content
(
/Opened [\w\s]+ ago/
)
expect
(
merge_request
).
to
have_label
(
new_label
.
title
)
end
Page
::
Issuable
::
Sidebar
.
perform
do
|
sidebar
|
Page
::
Issuable
::
Sidebar
.
perform
do
|
sidebar
|
expect
(
sidebar
).
to
have_milestone
(
current_milestone
.
title
)
expect
(
sidebar
).
to
have_milestone
(
current_milestone
.
title
)
...
...
spec/features/projects/environments/environments_spec.rb
View file @
071b39a2
...
@@ -95,7 +95,7 @@ describe 'Environments page', :js do
...
@@ -95,7 +95,7 @@ describe 'Environments page', :js do
end
end
it
'does not show environments and counters are set to zero'
do
it
'does not show environments and counters are set to zero'
do
expect
(
page
).
to
have_content
(
'You don\'t have any environments right now
.
'
)
expect
(
page
).
to
have_content
(
'You don\'t have any environments right now'
)
expect
(
page
.
find
(
'.js-environments-tab-available .badge'
).
text
).
to
eq
(
'0'
)
expect
(
page
.
find
(
'.js-environments-tab-available .badge'
).
text
).
to
eq
(
'0'
)
expect
(
page
.
find
(
'.js-environments-tab-stopped .badge'
).
text
).
to
eq
(
'0'
)
expect
(
page
.
find
(
'.js-environments-tab-stopped .badge'
).
text
).
to
eq
(
'0'
)
...
...
spec/javascripts/environments/emtpy_state_spec.js
View file @
071b39a2
...
@@ -27,7 +27,7 @@ describe('environments empty state', () => {
...
@@ -27,7 +27,7 @@ describe('environments empty state', () => {
it
(
'
renders empty state and new environment button
'
,
()
=>
{
it
(
'
renders empty state and new environment button
'
,
()
=>
{
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
.
trim
(),
vm
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
.
trim
(),
).
toEqual
(
'
You don
\'
t have any environments right now
.
'
);
).
toEqual
(
'
You don
\'
t have any environments right now
'
);
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
.js-new-environment-button
'
).
getAttribute
(
'
href
'
),
vm
.
$el
.
querySelector
(
'
.js-new-environment-button
'
).
getAttribute
(
'
href
'
),
...
@@ -47,7 +47,7 @@ describe('environments empty state', () => {
...
@@ -47,7 +47,7 @@ describe('environments empty state', () => {
it
(
'
renders empty state without new button
'
,
()
=>
{
it
(
'
renders empty state without new button
'
,
()
=>
{
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
.
trim
(),
vm
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
.
trim
(),
).
toEqual
(
'
You don
\'
t have any environments right now
.
'
);
).
toEqual
(
'
You don
\'
t have any environments right now
'
);
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
.js-new-environment-button
'
),
vm
.
$el
.
querySelector
(
'
.js-new-environment-button
'
),
...
...
spec/javascripts/environments/environments_app_spec.js
View file @
071b39a2
...
@@ -50,7 +50,7 @@ describe('Environment', () => {
...
@@ -50,7 +50,7 @@ describe('Environment', () => {
expect
(
expect
(
component
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
,
component
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
,
).
toContain
(
'
You don
\'
t have any environments right now
.
'
);
).
toContain
(
'
You don
\'
t have any environments right now
'
);
});
});
});
});
...
@@ -127,7 +127,7 @@ describe('Environment', () => {
...
@@ -127,7 +127,7 @@ describe('Environment', () => {
it
(
'
should render empty state
'
,
()
=>
{
it
(
'
should render empty state
'
,
()
=>
{
expect
(
expect
(
component
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
,
component
.
$el
.
querySelector
(
'
.js-blank-state-title
'
).
textContent
,
).
toContain
(
'
You don
\'
t have any environments right now
.
'
);
).
toContain
(
'
You don
\'
t have any environments right now
'
);
});
});
});
});
...
...
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