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
601dc0d8
Commit
601dc0d8
authored
Jan 09, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken specs
parent
1e420c94
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
25 additions
and
50 deletions
+25
-50
.eslintrc
.eslintrc
+1
-2
app/assets/javascripts/clusters/components/application_row.vue
...ssets/javascripts/clusters/components/application_row.vue
+3
-7
app/assets/javascripts/projects_dropdown/components/projects_list_item.vue
...ripts/projects_dropdown/components/projects_list_item.vue
+2
-3
app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
...cripts/sidebar/components/subscriptions/subscriptions.vue
+1
-2
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
...ue_merge_request_widget/components/mr_widget_pipeline.vue
+2
-3
app/assets/javascripts/vue_shared/components/loading_button.vue
...sets/javascripts/vue_shared/components/loading_button.vue
+2
-7
doc/development/fe_guide/style_guide_js.md
doc/development/fe_guide/style_guide_js.md
+6
-19
spec/javascripts/cycle_analytics/banner_spec.js
spec/javascripts/cycle_analytics/banner_spec.js
+2
-1
spec/javascripts/cycle_analytics/total_time_component_spec.js
.../javascripts/cycle_analytics/total_time_component_spec.js
+3
-3
spec/javascripts/pipelines/empty_state_spec.js
spec/javascripts/pipelines/empty_state_spec.js
+2
-2
spec/javascripts/registry/components/app_spec.js
spec/javascripts/registry/components/app_spec.js
+1
-1
No files found.
.eslintrc
View file @
601dc0d8
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
"localStorage": false
"localStorage": false
},
},
"parserOptions": {
"parserOptions": {
"parser": "babel-eslint",
"parser": "babel-eslint"
"ecmaVersion": 2017
},
},
"plugins": [
"plugins": [
"filenames",
"filenames",
...
...
app/assets/javascripts/clusters/components/application_row.vue
View file @
601dc0d8
<
script
>
<
script
>
/* eslint-disable vue/require-default-prop */
import
{
s__
,
sprintf
}
from
'
../../locale
'
;
import
{
s__
,
sprintf
}
from
'
../../locale
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
import
loadingButton
from
'
../../vue_shared/components/loading_button.vue
'
;
import
loadingButton
from
'
../../vue_shared/components/loading_button.vue
'
;
...
@@ -30,7 +31,6 @@
...
@@ -30,7 +31,6 @@
titleLink
:
{
titleLink
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
description
:
{
description
:
{
type
:
String
,
type
:
String
,
...
@@ -39,22 +39,18 @@
...
@@ -39,22 +39,18 @@
status
:
{
status
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
statusReason
:
{
statusReason
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
requestStatus
:
{
requestStatus
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
default
:
''
,
},
},
requestReason
:
{
requestReason
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
default
:
null
,
},
},
},
},
computed
:
{
computed
:
{
...
@@ -62,7 +58,7 @@
...
@@ -62,7 +58,7 @@
return
`js-cluster-application-row-
${
this
.
id
}
`
;
return
`js-cluster-application-row-
${
this
.
id
}
`
;
},
},
installButtonLoading
()
{
installButtonLoading
()
{
return
this
.
status
||
return
!
this
.
status
||
this
.
status
===
APPLICATION_SCHEDULED
||
this
.
status
===
APPLICATION_SCHEDULED
||
this
.
status
===
APPLICATION_INSTALLING
||
this
.
status
===
APPLICATION_INSTALLING
||
this
.
requestStatus
===
REQUEST_LOADING
;
this
.
requestStatus
===
REQUEST_LOADING
;
...
@@ -180,7 +176,7 @@
...
@@ -180,7 +176,7 @@
{{
statusReason
}}
{{
statusReason
}}
</li>
</li>
<li
<li
v-if=
"requestReaso"
v-if=
"requestReaso
n
"
class=
"js-cluster-application-request-error-message"
class=
"js-cluster-application-request-error-message"
>
>
{{
requestReason
}}
{{
requestReason
}}
...
...
app/assets/javascripts/projects_dropdown/components/projects_list_item.vue
View file @
601dc0d8
<
script
>
<
script
>
/* eslint-disable vue/require-default-prop, vue/require-prop-types */
import
identicon
from
'
../../vue_shared/components/identicon.vue
'
;
import
identicon
from
'
../../vue_shared/components/identicon.vue
'
;
export
default
{
export
default
{
...
@@ -9,7 +10,6 @@
...
@@ -9,7 +10,6 @@
matcher
:
{
matcher
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
default
:
''
,
},
},
projectId
:
{
projectId
:
{
type
:
Number
,
type
:
Number
,
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
required
:
true
,
required
:
true
,
},
},
avatarUrl
:
{
avatarUrl
:
{
type
:
[
String
,
Object
],
required
:
true
,
required
:
true
,
validator
(
value
)
{
validator
(
value
)
{
return
value
===
null
||
typeof
value
===
'
string
'
;
return
value
===
null
||
typeof
value
===
'
string
'
;
...
@@ -40,7 +39,7 @@
...
@@ -40,7 +39,7 @@
return
this
.
avatarUrl
!==
null
;
return
this
.
avatarUrl
!==
null
;
},
},
highlightedProjectName
()
{
highlightedProjectName
()
{
if
(
this
.
matcher
!==
''
)
{
if
(
this
.
matcher
)
{
const
matcherRegEx
=
new
RegExp
(
this
.
matcher
,
'
gi
'
);
const
matcherRegEx
=
new
RegExp
(
this
.
matcher
,
'
gi
'
);
const
matches
=
this
.
projectName
.
match
(
matcherRegEx
);
const
matches
=
this
.
projectName
.
match
(
matcherRegEx
);
...
...
app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
View file @
601dc0d8
<
script
>
<
script
>
/* eslint-disable vue/require-default-prop */
import
{
__
}
from
'
../../../locale
'
;
import
{
__
}
from
'
../../../locale
'
;
import
eventHub
from
'
../../event_hub
'
;
import
eventHub
from
'
../../event_hub
'
;
import
loadingButton
from
'
../../../vue_shared/components/loading_button.vue
'
;
import
loadingButton
from
'
../../../vue_shared/components/loading_button.vue
'
;
...
@@ -16,12 +17,10 @@
...
@@ -16,12 +17,10 @@
subscribed
:
{
subscribed
:
{
type
:
Boolean
,
type
:
Boolean
,
required
:
false
,
required
:
false
,
default
:
false
,
},
},
id
:
{
id
:
{
type
:
Number
,
type
:
Number
,
required
:
false
,
required
:
false
,
default
:
0
,
},
},
},
},
computed
:
{
computed
:
{
...
...
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
View file @
601dc0d8
<
script
>
<
script
>
/* eslint-disable vue/require-default-prop */
import
pipelineStage
from
'
../../pipelines/components/stage.vue
'
;
import
pipelineStage
from
'
../../pipelines/components/stage.vue
'
;
import
ciIcon
from
'
../../vue_shared/components/ci_icon.vue
'
;
import
ciIcon
from
'
../../vue_shared/components/ci_icon.vue
'
;
import
icon
from
'
../../vue_shared/components/icon.vue
'
;
import
icon
from
'
../../vue_shared/components/icon.vue
'
;
...
@@ -20,12 +21,10 @@
...
@@ -20,12 +21,10 @@
hasCi
:
{
hasCi
:
{
type
:
Boolean
,
type
:
Boolean
,
required
:
false
,
required
:
false
,
default
:
false
,
},
},
ciStatus
:
{
ciStatus
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
default
:
''
,
},
},
},
},
computed
:
{
computed
:
{
...
@@ -33,7 +32,7 @@
...
@@ -33,7 +32,7 @@
return
this
.
pipeline
&&
Object
.
keys
(
this
.
pipeline
).
length
>
0
;
return
this
.
pipeline
&&
Object
.
keys
(
this
.
pipeline
).
length
>
0
;
},
},
hasCIError
()
{
hasCIError
()
{
return
this
.
hasCi
&&
this
.
ciStatus
!==
''
;
return
this
.
hasCi
&&
!
this
.
ciStatus
;
},
},
status
()
{
status
()
{
return
this
.
pipeline
.
details
&&
return
this
.
pipeline
.
details
&&
...
...
app/assets/javascripts/vue_shared/components/loading_button.vue
View file @
601dc0d8
<
script
>
<
script
>
/* eslint-disable vue/require-default-prop */
/* This is a re-usable vue component for rendering a button
/* This is a re-usable vue component for rendering a button
that will probably be sending off ajax requests and need
that will probably be sending off ajax requests and need
...
@@ -37,7 +38,6 @@
...
@@ -37,7 +38,6 @@
label
:
{
label
:
{
type
:
String
,
type
:
String
,
required
:
false
,
required
:
false
,
default
:
''
,
},
},
containerClass
:
{
containerClass
:
{
type
:
String
,
type
:
String
,
...
@@ -45,11 +45,6 @@
...
@@ -45,11 +45,6 @@
default
:
'
btn btn-align-content
'
,
default
:
'
btn btn-align-content
'
,
},
},
},
},
computed
:
{
hasLabel
()
{
return
this
.
label
!==
''
;
},
},
methods
:
{
methods
:
{
onClick
(
e
)
{
onClick
(
e
)
{
this
.
$emit
(
'
click
'
,
e
);
this
.
$emit
(
'
click
'
,
e
);
...
@@ -77,7 +72,7 @@
...
@@ -77,7 +72,7 @@
</transition>
</transition>
<transition
name=
"fade"
>
<transition
name=
"fade"
>
<span
<span
v-if=
"
hasL
abel"
v-if=
"
l
abel"
class=
"js-loading-button-label"
class=
"js-loading-button-label"
>
>
{{
label
}}
{{
label
}}
...
...
doc/development/fe_guide/style_guide_js.md
View file @
601dc0d8
...
@@ -364,6 +364,10 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
...
@@ -364,6 +364,10 @@ Please check this [rules][eslint-plugin-vue-rules] for more documentation.
<
component
<
component
bar
=
"
bar
"
bar
=
"
bar
"
/>
/>
// bad
<
component
bar
=
"
bar
"
/>
```
```
#### Quotes
#### Quotes
...
@@ -513,25 +517,7 @@ On those a default key should not be provided.
...
@@ -513,25 +517,7 @@ On those a default key should not be provided.
```
```
1.
Properties in a Vue Component:
1.
Properties in a Vue Component:
1.
`name`
Check
[
order of properties in components rule
][
vue-order
]
.
1.
`props`
1.
`mixins`
1.
`directives`
1.
`components`
1.
`data`
1.
`computedProps`
1.
`methods`
1.
`beforeCreate`
1.
`created`
1.
`beforeMount`
1.
`mounted`
1.
`beforeUpdate`
1.
`updated`
1.
`activated`
1.
`deactivated`
1.
`beforeDestroy`
1.
`destroyed`
#### Vue and Bootstrap
#### Vue and Bootstrap
...
@@ -588,3 +574,4 @@ The goal of this accord is to make sure we are all on the same page.
...
@@ -588,3 +574,4 @@ The goal of this accord is to make sure we are all on the same page.
[
eslint-new
]:
http://eslint.org/docs/rules/no-new
[
eslint-new
]:
http://eslint.org/docs/rules/no-new
[
eslint-plugin-vue
]:
https://github.com/vuejs/eslint-plugin-vue
[
eslint-plugin-vue
]:
https://github.com/vuejs/eslint-plugin-vue
[
eslint-plugin-vue-rules
]:
https://github.com/vuejs/eslint-plugin-vue#bulb-rules
[
eslint-plugin-vue-rules
]:
https://github.com/vuejs/eslint-plugin-vue#bulb-rules
[
vue-order
]:
https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/order-in-components.md
spec/javascripts/cycle_analytics/banner_spec.js
View file @
601dc0d8
...
@@ -20,8 +20,9 @@ describe('Cycle analytics banner', () => {
...
@@ -20,8 +20,9 @@ describe('Cycle analytics banner', () => {
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
h4
'
).
textContent
.
trim
(),
vm
.
$el
.
querySelector
(
'
h4
'
).
textContent
.
trim
(),
).
toEqual
(
'
Introducing Cycle Analytics
'
);
).
toEqual
(
'
Introducing Cycle Analytics
'
);
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
p
'
).
textContent
.
trim
(),
vm
.
$el
.
querySelector
(
'
p
'
).
textContent
.
trim
()
.
replace
(
/
[\r\n]
+/g
,
'
'
)
,
).
toContain
(
'
Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.
'
);
).
toContain
(
'
Cycle Analytics gives an overview of how much time it takes to go from idea to production in your project.
'
);
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
a
'
).
textContent
.
trim
(),
vm
.
$el
.
querySelector
(
'
a
'
).
textContent
.
trim
(),
...
...
spec/javascripts/cycle_analytics/total_time_component_spec.js
View file @
601dc0d8
...
@@ -23,7 +23,7 @@ describe('Total time component', () => {
...
@@ -23,7 +23,7 @@ describe('Total time component', () => {
},
},
});
});
expect
(
vm
.
$el
.
textContent
.
trim
()).
toEqual
(
'
3 days 4 hrs
'
);
expect
(
vm
.
$el
.
textContent
.
trim
()
.
replace
(
/
\s\s
+/g
,
'
'
)
).
toEqual
(
'
3 days 4 hrs
'
);
});
});
it
(
'
should render information for hours and minutes
'
,
()
=>
{
it
(
'
should render information for hours and minutes
'
,
()
=>
{
...
@@ -34,7 +34,7 @@ describe('Total time component', () => {
...
@@ -34,7 +34,7 @@ describe('Total time component', () => {
},
},
});
});
expect
(
vm
.
$el
.
textContent
.
trim
()).
toEqual
(
'
4 hrs 35 mins
'
);
expect
(
vm
.
$el
.
textContent
.
trim
()
.
replace
(
/
\s\s
+/g
,
'
'
)
).
toEqual
(
'
4 hrs 35 mins
'
);
});
});
it
(
'
should render information for seconds
'
,
()
=>
{
it
(
'
should render information for seconds
'
,
()
=>
{
...
@@ -44,7 +44,7 @@ describe('Total time component', () => {
...
@@ -44,7 +44,7 @@ describe('Total time component', () => {
},
},
});
});
expect
(
vm
.
$el
.
textContent
.
trim
()).
toEqual
(
'
45 s
'
);
expect
(
vm
.
$el
.
textContent
.
trim
()
.
replace
(
/
\s\s
+/g
,
'
'
)
).
toEqual
(
'
45 s
'
);
});
});
});
});
...
...
spec/javascripts/pipelines/empty_state_spec.js
View file @
601dc0d8
...
@@ -24,11 +24,11 @@ describe('Pipelines Empty State', () => {
...
@@ -24,11 +24,11 @@ describe('Pipelines Empty State', () => {
expect
(
component
.
$el
.
querySelector
(
'
h4
'
).
textContent
).
toContain
(
'
Build with confidence
'
);
expect
(
component
.
$el
.
querySelector
(
'
h4
'
).
textContent
).
toContain
(
'
Build with confidence
'
);
expect
(
expect
(
component
.
$el
.
querySelector
(
'
p
'
).
textContent
,
component
.
$el
.
querySelector
(
'
p
'
).
textContent
.
trim
().
replace
(
/
[\r\n]
+/g
,
'
'
)
,
).
toContain
(
'
Continous Integration can help catch bugs by running your tests automatically
'
);
).
toContain
(
'
Continous Integration can help catch bugs by running your tests automatically
'
);
expect
(
expect
(
component
.
$el
.
querySelector
(
'
p
'
).
textContent
,
component
.
$el
.
querySelector
(
'
p
'
).
textContent
.
trim
().
replace
(
/
[\r\n]
+/g
,
'
'
)
,
).
toContain
(
'
Continuous Deployment can help you deliver code to your product environment
'
);
).
toContain
(
'
Continuous Deployment can help you deliver code to your product environment
'
);
});
});
...
...
spec/javascripts/registry/components/app_spec.js
View file @
601dc0d8
...
@@ -89,7 +89,7 @@ describe('Registry List', () => {
...
@@ -89,7 +89,7 @@ describe('Registry List', () => {
it
(
'
should render empty message
'
,
(
done
)
=>
{
it
(
'
should render empty message
'
,
(
done
)
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
p
'
).
textContent
.
trim
(),
vm
.
$el
.
querySelector
(
'
p
'
).
textContent
.
trim
()
.
replace
(
/
[\r\n]
+/g
,
'
'
)
,
).
toEqual
(
'
No container images stored for this project. Add one by following the instructions above.
'
);
).
toEqual
(
'
No container images stored for this project. Add one by following the instructions above.
'
);
done
();
done
();
},
0
);
},
0
);
...
...
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