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
10d8b3a0
Commit
10d8b3a0
authored
Apr 24, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests with json endpoint
Cleans merge request css
parent
312928f5
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
109 additions
and
13 deletions
+109
-13
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+0
-4
db/schema.rb
db/schema.rb
+3
-3
spec/javascripts/pipelines/mock_data.js
spec/javascripts/pipelines/mock_data.js
+99
-2
spec/javascripts/pipelines/stage_spec.js
spec/javascripts/pipelines/stage_spec.js
+7
-4
No files found.
app/assets/stylesheets/pages/merge_requests.scss
View file @
10d8b3a0
...
...
@@ -156,10 +156,6 @@
.dropdown-menu
{
z-index
:
300
;
}
.ci-action-icon-wrapper
{
line-height
:
16px
;
}
}
.mini-pipeline-graph-dropdown-toggle
{
...
...
db/schema.rb
View file @
10d8b3a0
...
...
@@ -307,10 +307,10 @@ ActiveRecord::Schema.define(version: 20180418053107) do
t
.
integer
"auto_canceled_by_id"
t
.
boolean
"retried"
t
.
integer
"stage_id"
t
.
integer
"artifacts_file_store"
t
.
integer
"artifacts_metadata_store"
t
.
boolean
"protected"
t
.
integer
"failure_reason"
t
.
integer
"artifacts_file_store"
t
.
integer
"artifacts_metadata_store"
end
add_index
"ci_builds"
,
[
"artifacts_expire_at"
],
name:
"index_ci_builds_on_artifacts_expire_at"
,
where:
"(artifacts_file <> ''::text)"
,
using: :btree
...
...
@@ -357,13 +357,13 @@ ActiveRecord::Schema.define(version: 20180418053107) do
t
.
integer
"project_id"
,
null:
false
t
.
integer
"job_id"
,
null:
false
t
.
integer
"file_type"
,
null:
false
t
.
integer
"file_store"
t
.
integer
"size"
,
limit:
8
t
.
datetime_with_timezone
"created_at"
,
null:
false
t
.
datetime_with_timezone
"updated_at"
,
null:
false
t
.
datetime_with_timezone
"expire_at"
t
.
string
"file"
t
.
binary
"file_sha256"
t
.
integer
"file_store"
end
add_index
"ci_job_artifacts"
,
[
"expire_at"
,
"job_id"
],
name:
"index_ci_job_artifacts_on_expire_at_and_job_id"
,
using: :btree
...
...
spec/javascripts/pipelines/mock_data.js
View file @
10d8b3a0
This diff is collapsed.
Click to expand it.
spec/javascripts/pipelines/stage_spec.js
View file @
10d8b3a0
...
...
@@ -4,6 +4,7 @@ import axios from '~/lib/utils/axios_utils';
import
stage
from
'
~/pipelines/components/stage.vue
'
;
import
eventHub
from
'
~/pipelines/event_hub
'
;
import
mountComponent
from
'
spec/helpers/vue_mount_component_helper
'
;
import
{
stageReply
}
from
'
./mock_data
'
;
describe
(
'
Pipelines stage component
'
,
()
=>
{
let
StageComponent
;
...
...
@@ -41,7 +42,7 @@ describe('Pipelines stage component', () => {
describe
(
'
with successfull request
'
,
()
=>
{
beforeEach
(()
=>
{
mock
.
onGet
(
'
path.json
'
).
reply
(
200
,
{
html
:
'
foo
'
}
);
mock
.
onGet
(
'
path.json
'
).
reply
(
200
,
stageReply
);
});
it
(
'
should render the received data and emit `clickedDropdown` event
'
,
done
=>
{
...
...
@@ -51,7 +52,7 @@ describe('Pipelines stage component', () => {
setTimeout
(()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.js-builds-dropdown-container ul
'
).
textContent
.
trim
(),
).
to
Equal
(
'
foo
'
);
).
to
Contain
(
stageReply
.
latest_statuses
[
0
].
name
);
expect
(
eventHub
.
$emit
).
toHaveBeenCalledWith
(
'
clickedDropdown
'
);
done
();
},
0
);
...
...
@@ -74,7 +75,9 @@ describe('Pipelines stage component', () => {
describe
(
'
update endpoint correctly
'
,
()
=>
{
beforeEach
(()
=>
{
mock
.
onGet
(
'
bar.json
'
).
reply
(
200
,
{
html
:
'
this is the updated content
'
});
const
copyStage
=
Object
.
assign
({},
stageReply
);
copyStage
.
latest_statuses
[
0
].
name
=
'
this is the updated content
'
;
mock
.
onGet
(
'
bar.json
'
).
reply
(
200
,
copyStage
);
});
it
(
'
should update the stage to request the new endpoint provided
'
,
done
=>
{
...
...
@@ -93,7 +96,7 @@ describe('Pipelines stage component', () => {
setTimeout
(()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.js-builds-dropdown-container ul
'
).
textContent
.
trim
(),
).
to
Equal
(
'
this is the updated content
'
);
).
to
Contain
(
'
this is the updated content
'
);
done
();
});
});
...
...
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