BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e3251a40
Unverified
Commit
e3251a40
authored
Mar 05, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes after review
parent
8ec0fd0a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
46 deletions
+35
-46
pipelines_table.vue
app/assets/javascripts/commit/pipelines/pipelines_table.vue
+1
-1
index.js
...ssets/javascripts/pages/projects/pipelines/index/index.js
+4
-5
empty_state.vue
app/assets/javascripts/pipelines/components/empty_state.vue
+1
-1
pipelines.vue
app/assets/javascripts/pipelines/components/pipelines.vue
+1
-1
pipelines_store.js
app/assets/javascripts/pipelines/stores/pipelines_store.js
+1
-6
pipelines_spec.js
spec/javascripts/pipelines/pipelines_spec.js
+26
-26
pipelines_store_spec.js
spec/javascripts/pipelines/pipelines_store_spec.js
+1
-6
No files found.
app/assets/javascripts/commit/pipelines/pipelines_table.vue
View file @
e3251a40
...
...
@@ -88,7 +88,7 @@
<svg-blank-state
v-else-if=
"shouldRenderErrorState"
:svg-path=
"errorStateSvgPath"
:message=
"s__(`Pipelines|There was an error
with
fetching the pipelines.
:message=
"s__(`Pipelines|There was an error fetching the pipelines.
Try again in a few moments or contact your support team.`)"
/>
...
...
app/assets/javascripts/pages/projects/pipelines/index/index.js
View file @
e3251a40
...
...
@@ -12,14 +12,13 @@ document.addEventListener('DOMContentLoaded', () => new Vue({
pipelinesComponent
,
},
data
()
{
const
store
=
new
PipelinesStore
();
return
{
store
,
dataset
:
document
.
querySelector
(
this
.
$options
.
el
).
dataset
,
store
:
new
PipelinesStore
(),
};
},
created
()
{
this
.
dataset
=
document
.
querySelector
(
this
.
$options
.
el
).
dataset
;
},
render
(
createElement
)
{
return
createElement
(
'pipelines-component'
,
{
props
:
{
...
...
app/assets/javascripts/pipelines/components/empty_state.vue
View file @
e3251a40
...
...
@@ -43,7 +43,7 @@
<div
class=
"text-center"
>
<a
:href=
"helpPagePath"
class=
"btn btn-
info
js-get-started-pipelines"
class=
"btn btn-
primary
js-get-started-pipelines"
>
{{
s__
(
'Pipelines|Get started with Pipelines'
)
}}
</a>
...
...
app/assets/javascripts/pipelines/components/pipelines.vue
View file @
e3251a40
...
...
@@ -323,7 +323,7 @@
<svg-blank-state
v-else-if=
"stateToRender === $options.stateMap.error"
:svg-path=
"errorStateSvgPath"
:message=
"s__(`Pipelines|There was an error
with
fetching the pipelines.
:message=
"s__(`Pipelines|There was an error fetching the pipelines.
Try again in a few moments or contact your support team.`)"
/>
...
...
app/assets/javascripts/pipelines/stores/pipelines_store.js
View file @
e3251a40
...
...
@@ -5,12 +5,7 @@ export default class PipelinesStore {
this
.
state
=
{};
this
.
state
.
pipelines
=
[];
this
.
state
.
count
=
{
all
:
0
,
finished
:
0
,
pending
:
0
,
running
:
0
,
};
this
.
state
.
count
=
{};
this
.
state
.
pageInfo
=
{};
}
...
...
spec/javascripts/pipelines/pipelines_spec.js
View file @
e3251a40
...
...
@@ -183,10 +183,10 @@ describe('Pipelines', () => {
});
it
(
'does not render tabs nor buttons'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-pipelines-tab-all'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-run-pipeline'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-ci-lint'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-clear-cache'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-pipelines-tab-all'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-run-pipeline'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-ci-lint'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-clear-cache'
)).
toBe
Null
(
);
});
});
...
...
@@ -222,7 +222,7 @@ describe('Pipelines', () => {
});
it
(
'renders error state'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.empty-state'
).
textContent
.
trim
()).
toContain
(
'There was an error
with
fetching the pipelines.'
);
expect
(
vm
.
$el
.
querySelector
(
'.empty-state'
).
textContent
.
trim
()).
toContain
(
'There was an error fetching the pipelines.'
);
});
});
});
...
...
@@ -254,9 +254,9 @@ describe('Pipelines', () => {
});
it
(
'does not render buttons'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-run-pipeline'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-ci-lint'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-clear-cache'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-run-pipeline'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-ci-lint'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-clear-cache'
)).
toBe
Null
(
);
});
it
(
'renders pipelines table'
,
()
=>
{
...
...
@@ -291,9 +291,9 @@ describe('Pipelines', () => {
});
it
(
'does not render buttons'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-run-pipeline'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-ci-lint'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-clear-cache'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-run-pipeline'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-ci-lint'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-clear-cache'
)).
toBe
Null
(
);
});
it
(
'renders tab empty state'
,
()
=>
{
...
...
@@ -324,14 +324,14 @@ describe('Pipelines', () => {
it
(
'renders empty state without button to set CI'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-empty-state'
).
textContent
.
trim
()).
toEqual
(
'This project is not currently set up to run pipelines.'
);
expect
(
vm
.
$el
.
querySelector
(
'.js-get-started-pipelines'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-get-started-pipelines'
)).
toBe
Null
(
);
});
it
(
'does not render tabs
n
or buttons'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-pipelines-tab-all'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-run-pipeline'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-ci-lint'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-clear-cache'
)).
toBe
(
null
);
it
(
'does not render tabs or buttons'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-pipelines-tab-all'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-run-pipeline'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-ci-lint'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-clear-cache'
)).
toBe
Null
(
);
});
});
...
...
@@ -361,13 +361,13 @@ describe('Pipelines', () => {
});
it
(
'does not renders buttons'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.js-run-pipeline'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-ci-lint'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-clear-cache'
)).
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'.js-run-pipeline'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-ci-lint'
)).
toBe
Null
(
);
expect
(
vm
.
$el
.
querySelector
(
'.js-clear-cache'
)).
toBe
Null
(
);
});
it
(
'renders error state'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'.empty-state'
).
textContent
.
trim
()).
toContain
(
'There was an error
with
fetching the pipelines.'
);
expect
(
vm
.
$el
.
querySelector
(
'.empty-state'
).
textContent
.
trim
()).
toContain
(
'There was an error fetching the pipelines.'
);
});
});
});
...
...
@@ -527,10 +527,10 @@ describe('Pipelines', () => {
describe
(
'tabs'
,
()
=>
{
it
(
'returns default tabs'
,
()
=>
{
expect
(
vm
.
tabs
).
toEqual
([
{
name
:
'All'
,
scope
:
'all'
,
count
:
0
,
isActive
:
true
},
{
name
:
'Pending'
,
scope
:
'pending'
,
count
:
0
,
isActive
:
false
},
{
name
:
'Running'
,
scope
:
'running'
,
count
:
0
,
isActive
:
false
},
{
name
:
'Finished'
,
scope
:
'finished'
,
count
:
0
,
isActive
:
false
},
{
name
:
'All'
,
scope
:
'all'
,
count
:
undefined
,
isActive
:
true
},
{
name
:
'Pending'
,
scope
:
'pending'
,
count
:
undefined
,
isActive
:
false
},
{
name
:
'Running'
,
scope
:
'running'
,
count
:
undefined
,
isActive
:
false
},
{
name
:
'Finished'
,
scope
:
'finished'
,
count
:
undefined
,
isActive
:
false
},
{
name
:
'Branches'
,
scope
:
'branches'
,
isActive
:
false
},
{
name
:
'Tags'
,
scope
:
'tags'
,
isActive
:
false
},
]);
...
...
@@ -646,7 +646,7 @@ describe('Pipelines', () => {
});
});
it
(
'returs true when state is empty tab & has already made the first request'
,
(
done
)
=>
{
it
(
'retur
n
s true when state is empty tab & has already made the first request'
,
(
done
)
=>
{
vm
.
isLoading
=
false
;
vm
.
state
.
count
.
all
=
10
;
vm
.
hasMadeRequest
=
true
;
...
...
spec/javascripts/pipelines/pipelines_store_spec.js
View file @
e3251a40
...
...
@@ -9,12 +9,7 @@ describe('Pipelines Store', () => {
it
(
'should be initialized with an empty state'
,
()
=>
{
expect
(
store
.
state
.
pipelines
).
toEqual
([]);
expect
(
store
.
state
.
count
).
toEqual
({
all
:
0
,
finished
:
0
,
pending
:
0
,
running
:
0
,
});
expect
(
store
.
state
.
count
).
toEqual
({});
expect
(
store
.
state
.
pageInfo
).
toEqual
({});
});
...
...
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