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
fd0fd602
Commit
fd0fd602
authored
Apr 25, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ee into ce-to-ee
parents
3120d98a
84779047
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
242 additions
and
150 deletions
+242
-150
app/assets/javascripts/blob/blob_fork_suggestion.js
app/assets/javascripts/blob/blob_fork_suggestion.js
+41
-0
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+5
-0
app/assets/javascripts/environments/components/deploy_board_component.vue
...cripts/environments/components/deploy_board_component.vue
+78
-68
app/assets/javascripts/environments/components/deploy_board_instance_component.vue
...vironments/components/deploy_board_instance_component.vue
+11
-10
app/assets/javascripts/environments/components/environments_table.vue
...avascripts/environments/components/environments_table.vue
+1
-1
app/controllers/projects/deploy_keys_controller.rb
app/controllers/projects/deploy_keys_controller.rb
+1
-2
app/views/projects/settings/_head.html.haml
app/views/projects/settings/_head.html.haml
+6
-0
spec/controllers/projects/builds_controller_spec.rb
spec/controllers/projects/builds_controller_spec.rb
+40
-0
spec/controllers/projects/builds_controller_specs.rb
spec/controllers/projects/builds_controller_specs.rb
+0
-47
spec/features/groups/analytics_spec.rb
spec/features/groups/analytics_spec.rb
+0
-0
spec/features/groups/audit_events_spec.rb
spec/features/groups/audit_events_spec.rb
+5
-0
spec/features/groups/pipeline_quota_spec.rb
spec/features/groups/pipeline_quota_spec.rb
+8
-14
spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb
...eate_issue_for_single_discussion_in_merge_request_spec.rb
+3
-3
spec/features/issues/sub_nav_ee_spec.rb
spec/features/issues/sub_nav_ee_spec.rb
+0
-0
spec/features/merge_requests/user_posts_notes_spec.rb
spec/features/merge_requests/user_posts_notes_spec.rb
+0
-0
spec/features/projects/audit_events_spec.rb
spec/features/projects/audit_events_spec.rb
+10
-2
spec/javascripts/blob/blob_fork_suggestion_spec.js
spec/javascripts/blob/blob_fork_suggestion_spec.js
+28
-0
spec/javascripts/environments/deploy_board_component_spec.js
spec/javascripts/environments/deploy_board_component_spec.js
+1
-1
spec/javascripts/environments/deploy_board_instance_component_spec.js
...ipts/environments/deploy_board_instance_component_spec.js
+1
-1
spec/lib/gitlab/other_markup_spec.rb
spec/lib/gitlab/other_markup_spec.rb
+3
-1
No files found.
app/assets/javascripts/blob/blob_fork_suggestion.js
View file @
fd0fd602
...
@@ -16,6 +16,7 @@ const defaults = {
...
@@ -16,6 +16,7 @@ const defaults = {
class
BlobForkSuggestion
{
class
BlobForkSuggestion
{
constructor
(
options
)
{
constructor
(
options
)
{
this
.
elementMap
=
Object
.
assign
({},
defaults
,
options
);
this
.
elementMap
=
Object
.
assign
({},
defaults
,
options
);
<<<<<<<
HEAD
this
.
onClickWrapper
=
this
.
onClick
.
bind
(
this
);
this
.
onClickWrapper
=
this
.
onClick
.
bind
(
this
);
document
.
addEventListener
(
'
click
'
,
this
.
onClickWrapper
);
document
.
addEventListener
(
'
click
'
,
this
.
onClickWrapper
);
...
@@ -40,6 +41,46 @@ class BlobForkSuggestion {
...
@@ -40,6 +41,46 @@ class BlobForkSuggestion {
[].
forEach
.
call
(
this
.
elementMap
.
suggestionSections
,
(
suggestionSection
)
=>
{
[].
forEach
.
call
(
this
.
elementMap
.
suggestionSections
,
(
suggestionSection
)
=>
{
suggestionSection
.
classList
.
add
(
'
hidden
'
);
suggestionSection
.
classList
.
add
(
'
hidden
'
);
});
});
=======
this
.
onOpenButtonClick
=
this
.
onOpenButtonClick
.
bind
(
this
);
this
.
onCancelButtonClick
=
this
.
onCancelButtonClick
.
bind
(
this
);
}
init
()
{
this
.
bindEvents
();
return
this
;
}
bindEvents
()
{
$
(
this
.
elementMap
.
openButtons
).
on
(
'
click
'
,
this
.
onOpenButtonClick
);
$
(
this
.
elementMap
.
cancelButtons
).
on
(
'
click
'
,
this
.
onCancelButtonClick
);
}
showSuggestionSection
(
forkPath
,
action
=
'
edit
'
)
{
$
(
this
.
elementMap
.
suggestionSections
).
removeClass
(
'
hidden
'
);
$
(
this
.
elementMap
.
forkButtons
).
attr
(
'
href
'
,
forkPath
);
$
(
this
.
elementMap
.
actionTextPieces
).
text
(
action
);
}
hideSuggestionSection
()
{
$
(
this
.
elementMap
.
suggestionSections
).
addClass
(
'
hidden
'
);
}
onOpenButtonClick
(
e
)
{
const
forkPath
=
$
(
e
.
currentTarget
).
attr
(
'
data-fork-path
'
);
const
action
=
$
(
e
.
currentTarget
).
attr
(
'
data-action
'
);
this
.
showSuggestionSection
(
forkPath
,
action
);
}
onCancelButtonClick
()
{
this
.
hideSuggestionSection
();
}
destroy
()
{
$
(
this
.
elementMap
.
openButtons
).
off
(
'
click
'
,
this
.
onOpenButtonClick
);
$
(
this
.
elementMap
.
cancelButtons
).
off
(
'
click
'
,
this
.
onCancelButtonClick
);
>>>>>>>
847790478
f8d85607eacedcdb693cfcd25c415af
}
}
onClick
(
e
)
{
onClick
(
e
)
{
...
...
app/assets/javascripts/dispatcher.js
View file @
fd0fd602
...
@@ -103,7 +103,12 @@ const ShortcutsBlob = require('./shortcuts_blob');
...
@@ -103,7 +103,12 @@ const ShortcutsBlob = require('./shortcuts_blob');
cancelButtons
:
document
.
querySelectorAll
(
'
.js-cancel-fork-suggestion-button
'
),
cancelButtons
:
document
.
querySelectorAll
(
'
.js-cancel-fork-suggestion-button
'
),
suggestionSections
:
document
.
querySelectorAll
(
'
.js-file-fork-suggestion-section
'
),
suggestionSections
:
document
.
querySelectorAll
(
'
.js-file-fork-suggestion-section
'
),
actionTextPieces
:
document
.
querySelectorAll
(
'
.js-file-fork-suggestion-section-action
'
),
actionTextPieces
:
document
.
querySelectorAll
(
'
.js-file-fork-suggestion-section-action
'
),
<<<<<<<
HEAD
});
});
=======
})
.
init
();
>>>>>>>
847790478
f8d85607eacedcdb693cfcd25c415af
}
}
switch
(
page
)
{
switch
(
page
)
{
...
...
app/assets/javascripts/environments/components/deploy_board_component.
js
→
app/assets/javascripts/environments/components/deploy_board_component.
vue
View file @
fd0fd602
<
script
>
/* eslint-disable no-new, no-undef */
/* eslint-disable no-new, no-undef */
/* global Flash */
/* global Flash */
/**
/**
...
@@ -22,7 +23,7 @@ import statusCodes from '~/lib/utils/http_status';
...
@@ -22,7 +23,7 @@ import statusCodes from '~/lib/utils/http_status';
import
'
~/flash
'
;
import
'
~/flash
'
;
import
'
~/lib/utils/common_utils
'
;
import
'
~/lib/utils/common_utils
'
;
import
deployBoardSvg
from
'
empty_states/icons/_deploy_board.svg
'
;
import
deployBoardSvg
from
'
empty_states/icons/_deploy_board.svg
'
;
import
instanceComponent
from
'
./deploy_board_instance_component
'
;
import
instanceComponent
from
'
./deploy_board_instance_component
.vue
'
;
export
default
{
export
default
{
...
@@ -160,72 +161,81 @@ export default {
...
@@ -160,72 +161,81 @@ export default {
return
'
<projectname>
'
;
return
'
<projectname>
'
;
},
},
},
},
};
</
script
>
<
template
>
<div
class=
"js-deploy-board deploy-board"
>
<div
v-if=
"isLoading"
>
<i
class=
"fa fa-spinner fa-spin"
aria-hidden=
"true"
/>
</div>
template
:
`
<div
v-if=
"canRenderDeployBoard"
>
<div class="js-deploy-board deploy-board">
<section
class=
"deploy-board-information"
>
<div v-if="isLoading">
<span>
<i class="fa fa-spinner fa-spin" aria-hidden="true"></i>
<span
class=
"percentage"
>
{{
deployBoardData
.
completion
}}
%
</span>
</div>
<span
class=
"text"
>
Complete
</span>
</span>
<div v-if="canRenderDeployBoard">
</section>
<section class="deploy-board-information">
<section
class=
"deploy-board-instances"
>
<span>
<p
class=
"text"
>
{{
instanceTitle
}}
</p>
<span class="percentage">{{deployBoardData.completion}}%</span>
<span class="text">Complete</span>
<div
class=
"deploy-board-instances-container"
>
</span>
<template
v-for=
"instance in deployBoardData.instances"
>
</section>
<instance-component
:status=
"instance.status"
<section class="deploy-board-instances">
:tooltip-text=
"instance.tooltip"
<p class="text">{{instanceTitle}}</p>
:stable=
"instance.stable"
/>
</
template
>
<div class="deploy-board-instances-container">
</div>
<template v-for="instance in deployBoardData.instances">
</section>
<instance-component
:status="instance.status"
<section
:tooltip-text="instance.tooltip"
class=
"deploy-board-actions"
:stable="instance.stable" />
v-if=
"deployBoardData.rollback_url || deployBoardData.abort_url"
>
</template>
<a
</div>
class=
"btn"
</section>
data-method=
"post"
rel=
"nofollow"
<section class="deploy-board-actions" v-if="deployBoardData.rollback_url || deployBoardData.abort_url">
v-if=
"deployBoardData.rollback_url"
<a class="btn"
:href=
"deployBoardData.rollback_url"
>
data-method="post"
Rollback
rel="nofollow"
</a>
v-if="deployBoardData.rollback_url"
:href="deployBoardData.rollback_url">
<a
Rollback
class=
"btn btn-red btn-inverted"
</a>
data-method=
"post"
rel=
"nofollow"
<a class="btn btn-red btn-inverted"
v-if=
"deployBoardData.abort_url"
data-method="post"
:href=
"deployBoardData.abort_url"
>
rel="nofollow"
Abort
v-if="deployBoardData.abort_url"
</a>
:href="deployBoardData.abort_url">
</section>
Abort
</a>
</section>
</div>
<div v-if="canRenderEmptyState">
<section class="deploy-board-empty-state-svg">
${
deployBoardSvg
}
</section>
<section class="deploy-board-empty-state-text">
<span class="title">Kubernetes deployment not found</span>
<span>
To see deployment progress for your environments, make sure your deployments are in Kubernetes namespace
<code>{{projectName}}</code> and labeled with <code>app=$CI_ENVIRONMENT_SLUG</code>.
</span>
</section>
</div>
<div v-if="canRenderErrorState" class="deploy-board-error-message">
We can't fetch the data right now. Please try again later.
</div>
</div>
</div>
`
,
};
<div
v-if=
"canRenderEmptyState"
>
<section
class=
"deploy-board-empty-state-svg"
v-html=
"deployBoardSvg"
>
</section>
<section
class=
"deploy-board-empty-state-text"
>
<span
class=
"title"
>
Kubernetes deployment not found
</span>
<span>
To see deployment progress for your environments, make sure your deployments are in Kubernetes namespace
<code>
{{projectName}}
</code>
and labeled with
<code>
app=$CI_ENVIRONMENT_SLUG
</code>
.
</span>
</section>
</div>
<div
v-if=
"canRenderErrorState"
class=
"deploy-board-error-message"
>
We can't fetch the data right now. Please try again later.
</div>
</div>
</script>
app/assets/javascripts/environments/components/deploy_board_instance_component.
js
→
app/assets/javascripts/environments/components/deploy_board_instance_component.
vue
View file @
fd0fd602
<
script
>
/**
/**
* An instance in deploy board is represented by a square in this mockup:
* An instance in deploy board is represented by a square in this mockup:
* https://gitlab.com/gitlab-org/gitlab-ce/uploads/2f655655c0eadf655d0ae7467b53002a/environments__deploy-graphic.png
* https://gitlab.com/gitlab-org/gitlab-ce/uploads/2f655655c0eadf655d0ae7467b53002a/environments__deploy-graphic.png
...
@@ -50,14 +51,14 @@ export default {
...
@@ -50,14 +51,14 @@ export default {
return
cssClassName
;
return
cssClassName
;
},
},
},
},
template
:
`
<div
class="deploy-board-instance has-tooltip"
:class="cssClass"
:data-title="tooltipText"
data-toggle="tooltip"
data-placement="top">
</div>
`
,
};
};
</
script
>
<
template
>
<div
class=
"deploy-board-instance has-tooltip"
:class=
"cssClass"
:data-title=
"tooltipText"
data-toggle=
"tooltip"
data-placement=
"top"
>
</div>
</
template
>
app/assets/javascripts/environments/components/environments_table.vue
View file @
fd0fd602
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* Render environments table.
* Render environments table.
*/
*/
import
EnvironmentTableRowComponent
from
'
./environment_item.vue
'
;
import
EnvironmentTableRowComponent
from
'
./environment_item.vue
'
;
import
DeployBoard
from
'
./deploy_board_component
'
;
import
DeployBoard
from
'
./deploy_board_component
.vue
'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
...
app/controllers/projects/deploy_keys_controller.rb
View file @
fd0fd602
...
@@ -38,9 +38,8 @@ class Projects::DeployKeysController < Projects::ApplicationController
...
@@ -38,9 +38,8 @@ class Projects::DeployKeysController < Projects::ApplicationController
deploy_key_project
=
@project
.
deploy_keys_projects
.
find_by
(
deploy_key_id:
params
[
:id
])
deploy_key_project
=
@project
.
deploy_keys_projects
.
find_by
(
deploy_key_id:
params
[
:id
])
return
render_404
unless
deploy_key_project
return
render_404
unless
deploy_key_project
deploy_key_project
.
destroy!
load_key
load_key
deploy_key_project
.
destroy!
log_audit_event
(
@key
.
title
,
action: :destroy
)
log_audit_event
(
@key
.
title
,
action: :destroy
)
redirect_to_repository_settings
(
@project
)
redirect_to_repository_settings
(
@project
)
...
...
app/views/projects/settings/_head.html.haml
View file @
fd0fd602
...
@@ -31,3 +31,9 @@
...
@@ -31,3 +31,9 @@
=
link_to
namespace_project_pages_path
(
@project
.
namespace
,
@project
),
title:
'Pages'
do
=
link_to
namespace_project_pages_path
(
@project
.
namespace
,
@project
),
title:
'Pages'
do
%span
%span
Pages
Pages
=
nav_link
(
controller: :audit_events
)
do
=
link_to
namespace_project_audit_events_path
(
@project
.
namespace
,
@project
),
title:
"Audit Events"
do
%span
Audit Events
spec/controllers/projects/builds_controller_spec.rb
View file @
fd0fd602
...
@@ -63,4 +63,44 @@ describe Projects::BuildsController do
...
@@ -63,4 +63,44 @@ describe Projects::BuildsController do
expect
(
json_response
[
'favicon'
]).
to
eq
"/assets/ci_favicons/
#{
status
.
favicon
}
.ico"
expect
(
json_response
[
'favicon'
]).
to
eq
"/assets/ci_favicons/
#{
status
.
favicon
}
.ico"
end
end
end
end
describe
'GET trace.json'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
let
(
:user
)
{
create
(
:user
)
}
context
'when user is logged in as developer'
do
before
do
project
.
add_developer
(
user
)
sign_in
(
user
)
get_trace
end
it
'traces build log'
do
expect
(
response
).
to
have_http_status
(
:ok
)
expect
(
json_response
[
'id'
]).
to
eq
build
.
id
expect
(
json_response
[
'status'
]).
to
eq
build
.
status
end
end
context
'when user is logged in as non member'
do
before
do
sign_in
(
user
)
get_trace
end
it
'traces build log'
do
expect
(
response
).
to
have_http_status
(
:ok
)
expect
(
json_response
[
'id'
]).
to
eq
build
.
id
expect
(
json_response
[
'status'
]).
to
eq
build
.
status
end
end
def
get_trace
get
:trace
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
build
.
id
,
format: :json
end
end
end
end
spec/controllers/projects/builds_controller_specs.rb
deleted
100644 → 0
View file @
3120d98a
require
'spec_helper'
describe
Projects
::
BuildsController
do
include
ApiHelpers
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
describe
'GET trace.json'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let
(
:build
)
{
create
(
:ci_build
,
pipeline:
pipeline
)
}
let
(
:user
)
{
create
(
:user
)
}
context
'when user is logged in as developer'
do
before
do
project
.
add_developer
(
user
)
sign_in
(
user
)
get_trace
end
it
'traces build log'
do
expect
(
response
).
to
have_http_status
(
:ok
)
expect
(
json_response
[
'id'
]).
to
eq
build
.
id
expect
(
json_response
[
'status'
]).
to
eq
build
.
status
end
end
context
'when user is logged in as non member'
do
before
do
sign_in
(
user
)
get_trace
end
it
'traces build log'
do
expect
(
response
).
to
have_http_status
(
:ok
)
expect
(
json_response
[
'id'
]).
to
eq
build
.
id
expect
(
json_response
[
'status'
]).
to
eq
build
.
status
end
end
def
get_trace
get
:trace
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
build
.
id
,
format: :json
end
end
end
spec/features/groups/analytics.rb
→
spec/features/groups/analytics
_spec
.rb
View file @
fd0fd602
File moved
spec/features/groups/audit_events.rb
→
spec/features/groups/audit_events
_spec
.rb
View file @
fd0fd602
...
@@ -18,8 +18,13 @@ feature 'Groups > Audit Events', js: true, feature: true do
...
@@ -18,8 +18,13 @@ feature 'Groups > Audit Events', js: true, feature: true do
group_member
=
group
.
members
.
find_by
(
user_id:
pete
)
group_member
=
group
.
members
.
find_by
(
user_id:
pete
)
page
.
within
"#group_member_
#{
group_member
.
id
}
"
do
page
.
within
"#group_member_
#{
group_member
.
id
}
"
do
<<<<<<<
HEAD
:spec
/
features
/
groups
/
audit_events
.
rb
click_button
(
'Developer'
)
click_button
(
'Developer'
)
click_link
(
'Master'
)
click_link
(
'Master'
)
=======
click_button
'Developer'
click_link
'Master'
>>>>>>>
847790478
f8d85607eacedcdb693cfcd25c415af
:spec
/
features
/
groups
/
audit_events_spec
.
rb
end
end
# This is to avoid a Capybara::Poltergeist::MouseEventFailed error
# This is to avoid a Capybara::Poltergeist::MouseEventFailed error
...
...
spec/features/groups/pipeline_quota.rb
→
spec/features/groups/pipeline_quota
_spec
.rb
View file @
fd0fd602
...
@@ -36,11 +36,9 @@ feature 'Groups > Pipeline Quota', feature: true do
...
@@ -36,11 +36,9 @@ feature 'Groups > Pipeline Quota', feature: true do
let!
(
:project
)
{
create
(
:empty_project
,
namespace:
group
,
shared_runners_enabled:
false
)
}
let!
(
:project
)
{
create
(
:empty_project
,
namespace:
group
,
shared_runners_enabled:
false
)
}
it
'is not linked within the group settings dropdown'
do
it
'is not linked within the group settings dropdown'
do
visit
group_path
(
group
)
visit
edit_
group_path
(
group
)
page
.
within
(
'.layout-nav'
)
do
expect
(
page
).
not_to
have_link
(
'Pipelines quota'
)
expect
(
page
).
not_to
have_selector
(
:link_or_button
,
'Pipeline Quota'
)
end
end
end
it
'shows correct group quota info'
do
it
'shows correct group quota info'
do
...
@@ -60,12 +58,10 @@ feature 'Groups > Pipeline Quota', feature: true do
...
@@ -60,12 +58,10 @@ feature 'Groups > Pipeline Quota', feature: true do
context
'minutes under quota'
do
context
'minutes under quota'
do
let
(
:group
)
{
create
(
:group
,
:with_not_used_build_minutes_limit
)
}
let
(
:group
)
{
create
(
:group
,
:with_not_used_build_minutes_limit
)
}
it
'is linked within the group settings
dropdown
'
do
it
'is linked within the group settings
tab
'
do
visit
group_path
(
group
)
visit
edit_
group_path
(
group
)
page
.
within
(
'.layout-nav'
)
do
expect
(
page
).
to
have_link
(
'Pipelines quota'
)
expect
(
page
).
to
have_selector
(
:link_or_button
,
'Pipeline Quota'
)
end
end
end
it
'shows correct group quota info'
do
it
'shows correct group quota info'
do
...
@@ -83,12 +79,10 @@ feature 'Groups > Pipeline Quota', feature: true do
...
@@ -83,12 +79,10 @@ feature 'Groups > Pipeline Quota', feature: true do
let
(
:group
)
{
create
(
:group
,
:with_used_build_minutes_limit
)
}
let
(
:group
)
{
create
(
:group
,
:with_used_build_minutes_limit
)
}
let!
(
:other_project
)
{
create
(
:empty_project
,
namespace:
group
,
shared_runners_enabled:
false
)
}
let!
(
:other_project
)
{
create
(
:empty_project
,
namespace:
group
,
shared_runners_enabled:
false
)
}
it
'is linked within the group settings
dropdown
'
do
it
'is linked within the group settings
tab
'
do
visit
group_path
(
group
)
visit
edit_
group_path
(
group
)
page
.
within
(
'.layout-nav'
)
do
expect
(
page
).
to
have_link
(
'Pipelines quota'
)
expect
(
page
).
to
have_selector
(
:link_or_button
,
'Pipeline Quota'
)
end
end
end
it
'shows correct group quota and projects info'
do
it
'shows correct group quota and projects info'
do
...
...
spec/features/issues/create_issue_for_single_discussion_in_merge_request.rb
→
spec/features/issues/create_issue_for_single_discussion_in_merge_request
_spec
.rb
View file @
fd0fd602
...
@@ -4,7 +4,7 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe
...
@@ -4,7 +4,7 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
only_allow_merge_if_all_discussions_are_resolved:
true
)
}
let
(
:project
)
{
create
(
:project
,
only_allow_merge_if_all_discussions_are_resolved:
true
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
let!
(
:discussion
)
{
Discussion
.
for_diff_notes
([
create
(
:diff_note_on_merge_request
,
noteable:
merge_request
,
project:
project
)]).
first
}
let!
(
:discussion
)
{
create
(
:diff_note_on_merge_request
,
noteable:
merge_request
,
project:
project
).
to_discussion
}
describe
'As a user with access to the project'
do
describe
'As a user with access to the project'
do
before
do
before
do
...
@@ -74,8 +74,8 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe
...
@@ -74,8 +74,8 @@ feature 'Resolve an open discussion in a merge request by creating an issue', fe
it
'Shows a notice to ask someone else to resolve the discussions'
do
it
'Shows a notice to ask someone else to resolve the discussions'
do
expect
(
page
).
to
have_content
(
"The discussion at
#{
merge_request
.
to_reference
}
"
\
expect
(
page
).
to
have_content
(
"The discussion at
#{
merge_request
.
to_reference
}
"
\
"(discussion
#{
discussion
.
first_note
.
id
}
) will stay unresolved."
\
"
(discussion
#{
discussion
.
first_note
.
id
}
) will stay unresolved."
\
"Ask someone with permission to resolve it."
)
"
Ask someone with permission to resolve it."
)
end
end
end
end
end
end
spec/features/issues/sub_nav_ee.rb
→
spec/features/issues/sub_nav_ee
_spec
.rb
View file @
fd0fd602
File moved
spec/features/merge_requests/user_posts_notes.rb
→
spec/features/merge_requests/user_posts_notes
_spec
.rb
View file @
fd0fd602
File moved
spec/features/projects/audit_events.rb
→
spec/features/projects/audit_events
_spec
.rb
View file @
fd0fd602
...
@@ -17,14 +17,17 @@ feature 'Projects > Audit Events', js: true, feature: true do
...
@@ -17,14 +17,17 @@ feature 'Projects > Audit Events', js: true, feature: true do
fill_in
'deploy_key_title'
,
with:
'laptop'
fill_in
'deploy_key_title'
,
with:
'laptop'
fill_in
'deploy_key_key'
,
with:
'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzrEJUIR6Y03TCE9rIJ+GqTBvgb8t1jI9h5UBzCLuK4VawOmkLornPqLDrGbm6tcwM/wBrrLvVOqi2HwmkKEIecVO0a64A4rIYScVsXIniHRS6w5twyn1MD3sIbN+socBDcaldECQa2u1dI3tnNVcs8wi77fiRe7RSxePsJceGoheRQgC8AZ510UdIlO+9rjIHUdVN7LLyz512auAfYsgx1OfablkQ/XJcdEwDNgi9imI6nAXhmoKUm1IPLT2yKajTIC64AjLOnE0YyCh6+7RFMpiMyu1qiOCpdjYwTgBRiciNRZCH8xIedyCoAmiUgkUT40XYHwLuwiPJICpkAzp7Q== user@laptop'
fill_in
'deploy_key_key'
,
with:
'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzrEJUIR6Y03TCE9rIJ+GqTBvgb8t1jI9h5UBzCLuK4VawOmkLornPqLDrGbm6tcwM/wBrrLvVOqi2HwmkKEIecVO0a64A4rIYScVsXIniHRS6w5twyn1MD3sIbN+socBDcaldECQa2u1dI3tnNVcs8wi77fiRe7RSxePsJceGoheRQgC8AZ510UdIlO+9rjIHUdVN7LLyz512auAfYsgx1OfablkQ/XJcdEwDNgi9imI6nAXhmoKUm1IPLT2yKajTIC64AjLOnE0YyCh6+7RFMpiMyu1qiOCpdjYwTgBRiciNRZCH8xIedyCoAmiUgkUT40XYHwLuwiPJICpkAzp7Q== user@laptop'
click_button
'
Create
'
click_button
'
Add key
'
visit
namespace_project_audit_events_path
(
project
.
namespace
,
project
)
visit
namespace_project_audit_events_path
(
project
.
namespace
,
project
)
expect
(
page
).
to
have_content
(
'Add deploy key'
)
expect
(
page
).
to
have_content
(
'Add deploy key'
)
visit
namespace_project_deploy_keys_path
(
project
.
namespace
,
project
)
visit
namespace_project_deploy_keys_path
(
project
.
namespace
,
project
)
click_link
'Remove'
accept_confirm
do
click_link
'Remove'
end
visit
namespace_project_audit_events_path
(
project
.
namespace
,
project
)
visit
namespace_project_audit_events_path
(
project
.
namespace
,
project
)
...
@@ -43,8 +46,13 @@ feature 'Projects > Audit Events', js: true, feature: true do
...
@@ -43,8 +46,13 @@ feature 'Projects > Audit Events', js: true, feature: true do
project_member
=
project
.
project_member
(
pete
)
project_member
=
project
.
project_member
(
pete
)
page
.
within
"#project_member_
#{
project_member
.
id
}
"
do
page
.
within
"#project_member_
#{
project_member
.
id
}
"
do
<<<<<<<
HEAD
:spec
/
features
/
projects
/
audit_events
.
rb
click_button
(
'Developer'
)
click_button
(
'Developer'
)
click_link
(
'Reporter'
)
click_link
(
'Reporter'
)
=======
click_button
'Developer'
click_link
'Master'
>>>>>>>
847790478
f8d85607eacedcdb693cfcd25c415af
:spec
/
features
/
projects
/
audit_events_spec
.
rb
end
end
# This is to avoid a Capybara::Poltergeist::MouseEventFailed error
# This is to avoid a Capybara::Poltergeist::MouseEventFailed error
...
...
spec/javascripts/blob/blob_fork_suggestion_spec.js
View file @
fd0fd602
...
@@ -3,6 +3,7 @@ import BlobForkSuggestion from '~/blob/blob_fork_suggestion';
...
@@ -3,6 +3,7 @@ import BlobForkSuggestion from '~/blob/blob_fork_suggestion';
describe
(
'
BlobForkSuggestion
'
,
()
=>
{
describe
(
'
BlobForkSuggestion
'
,
()
=>
{
let
blobForkSuggestion
;
let
blobForkSuggestion
;
<<<<<<<
HEAD
const
openButtons
=
[
document
.
createElement
(
'
div
'
)];
const
openButtons
=
[
document
.
createElement
(
'
div
'
)];
const
forkButtons
=
[
document
.
createElement
(
'
a
'
)];
const
forkButtons
=
[
document
.
createElement
(
'
a
'
)];
const
cancelButtons
=
[
document
.
createElement
(
'
div
'
)];
const
cancelButtons
=
[
document
.
createElement
(
'
div
'
)];
...
@@ -17,6 +18,23 @@ describe('BlobForkSuggestion', () => {
...
@@ -17,6 +18,23 @@ describe('BlobForkSuggestion', () => {
suggestionSections
,
suggestionSections
,
actionTextPieces
,
actionTextPieces
,
});
});
=======
const
openButton
=
document
.
createElement
(
'
div
'
);
const
forkButton
=
document
.
createElement
(
'
a
'
);
const
cancelButton
=
document
.
createElement
(
'
div
'
);
const
suggestionSection
=
document
.
createElement
(
'
div
'
);
const
actionTextPiece
=
document
.
createElement
(
'
div
'
);
beforeEach
(()
=>
{
blobForkSuggestion
=
new
BlobForkSuggestion
({
openButtons
:
openButton
,
forkButtons
:
forkButton
,
cancelButtons
:
cancelButton
,
suggestionSections
:
suggestionSection
,
actionTextPieces
:
actionTextPiece
,
})
.
init
();
>>>>>>>
847790478
f8d85607eacedcdb693cfcd25c415af
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
...
@@ -25,13 +43,23 @@ describe('BlobForkSuggestion', () => {
...
@@ -25,13 +43,23 @@ describe('BlobForkSuggestion', () => {
it
(
'
showSuggestionSection
'
,
()
=>
{
it
(
'
showSuggestionSection
'
,
()
=>
{
blobForkSuggestion
.
showSuggestionSection
(
'
/foo
'
,
'
foo
'
);
blobForkSuggestion
.
showSuggestionSection
(
'
/foo
'
,
'
foo
'
);
<<<<<<<
HEAD
expect
(
suggestionSections
[
0
].
classList
.
contains
(
'
hidden
'
)).
toEqual
(
false
);
expect
(
suggestionSections
[
0
].
classList
.
contains
(
'
hidden
'
)).
toEqual
(
false
);
expect
(
forkButtons
[
0
].
getAttribute
(
'
href
'
)).
toEqual
(
'
/foo
'
);
expect
(
forkButtons
[
0
].
getAttribute
(
'
href
'
)).
toEqual
(
'
/foo
'
);
expect
(
actionTextPieces
[
0
].
textContent
).
toEqual
(
'
foo
'
);
expect
(
actionTextPieces
[
0
].
textContent
).
toEqual
(
'
foo
'
);
=======
expect
(
suggestionSection
.
classList
.
contains
(
'
hidden
'
)).
toEqual
(
false
);
expect
(
forkButton
.
getAttribute
(
'
href
'
)).
toEqual
(
'
/foo
'
);
expect
(
actionTextPiece
.
textContent
).
toEqual
(
'
foo
'
);
>>>>>>>
847790478
f8d85607eacedcdb693cfcd25c415af
});
});
it
(
'
hideSuggestionSection
'
,
()
=>
{
it
(
'
hideSuggestionSection
'
,
()
=>
{
blobForkSuggestion
.
hideSuggestionSection
();
blobForkSuggestion
.
hideSuggestionSection
();
<<<<<<<
HEAD
expect
(
suggestionSections
[
0
].
classList
.
contains
(
'
hidden
'
)).
toEqual
(
true
);
expect
(
suggestionSections
[
0
].
classList
.
contains
(
'
hidden
'
)).
toEqual
(
true
);
=======
expect
(
suggestionSection
.
classList
.
contains
(
'
hidden
'
)).
toEqual
(
true
);
>>>>>>>
847790478
f8d85607eacedcdb693cfcd25c415af
});
});
});
});
spec/javascripts/environments/deploy_board_component_spec.js
View file @
fd0fd602
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
DeployBoard
from
'
~/environments/components/deploy_board_component
'
;
import
DeployBoard
from
'
~/environments/components/deploy_board_component
.vue
'
;
import
Service
from
'
~/environments/services/environments_service
'
;
import
Service
from
'
~/environments/services/environments_service
'
;
const
{
deployBoardMockData
,
invalidDeployBoardMockData
}
=
require
(
'
./mock_data
'
);
const
{
deployBoardMockData
,
invalidDeployBoardMockData
}
=
require
(
'
./mock_data
'
);
...
...
spec/javascripts/environments/deploy_board_instance_component_spec.js
View file @
fd0fd602
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
DeployBoardInstance
from
'
~/environments/components/deploy_board_instance_component
'
;
import
DeployBoardInstance
from
'
~/environments/components/deploy_board_instance_component
.vue
'
;
describe
(
'
Deploy Board Instance
'
,
()
=>
{
describe
(
'
Deploy Board Instance
'
,
()
=>
{
let
DeployBoardInstanceComponent
;
let
DeployBoardInstanceComponent
;
...
...
spec/lib/gitlab/other_markup.rb
→
spec/lib/gitlab/other_markup
_spec
.rb
View file @
fd0fd602
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
OtherMarkup
,
lib:
true
do
describe
Gitlab
::
OtherMarkup
,
lib:
true
do
let
(
:context
)
{
{}
}
context
"XSS Checks"
do
context
"XSS Checks"
do
links
=
{
links
=
{
'links'
=>
{
'links'
=>
{
file:
'file.rdoc'
,
file:
'file.rdoc'
,
input:
'XSS[JaVaScriPt:alert(1)]'
,
input:
'XSS[JaVaScriPt:alert(1)]'
,
output:
'<p><a>XSS</a></p>'
output:
"
\n
"
+
'<p><a>XSS</a></p>'
+
"
\n
"
}
}
}
}
links
.
each
do
|
name
,
data
|
links
.
each
do
|
name
,
data
|
...
...
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