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
db4c1f66
Commit
db4c1f66
authored
Oct 09, 2018
by
Johann Hubert Sonntagbauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable jasmine/prefer-jasmine-matcher
parent
10836664
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
42 additions
and
45 deletions
+42
-45
spec/javascripts/.eslintrc.yml
spec/javascripts/.eslintrc.yml
+0
-1
spec/javascripts/datetime_utility_spec.js
spec/javascripts/datetime_utility_spec.js
+3
-3
spec/javascripts/diffs/components/diff_file_spec.js
spec/javascripts/diffs/components/diff_file_spec.js
+3
-5
spec/javascripts/diffs/components/diff_line_gutter_content_spec.js
...scripts/diffs/components/diff_line_gutter_content_spec.js
+1
-1
spec/javascripts/diffs/components/inline_diff_view_spec.js
spec/javascripts/diffs/components/inline_diff_view_spec.js
+2
-2
spec/javascripts/filtered_search/dropdown_utils_spec.js
spec/javascripts/filtered_search/dropdown_utils_spec.js
+1
-1
spec/javascripts/filtered_search/filtered_search_token_keys_spec.js
...cripts/filtered_search/filtered_search_token_keys_spec.js
+7
-7
spec/javascripts/gl_dropdown_spec.js
spec/javascripts/gl_dropdown_spec.js
+2
-2
spec/javascripts/groups/components/group_item_spec.js
spec/javascripts/groups/components/group_item_spec.js
+1
-1
spec/javascripts/groups/components/groups_spec.js
spec/javascripts/groups/components/groups_spec.js
+1
-1
spec/javascripts/groups/components/item_stats_spec.js
spec/javascripts/groups/components/item_stats_spec.js
+5
-5
spec/javascripts/groups/components/item_stats_value_spec.js
spec/javascripts/groups/components/item_stats_value_spec.js
+2
-2
spec/javascripts/groups/store/groups_store_spec.js
spec/javascripts/groups/store/groups_store_spec.js
+6
-6
spec/javascripts/image_diff/helpers/comment_indicator_helper_spec.js
...ripts/image_diff/helpers/comment_indicator_helper_spec.js
+1
-1
spec/javascripts/lib/utils/common_utils_spec.js
spec/javascripts/lib/utils/common_utils_spec.js
+1
-1
spec/javascripts/notes_spec.js
spec/javascripts/notes_spec.js
+3
-3
spec/javascripts/vue_mr_widget/components/mr_widget_memory_usage_spec.js
...s/vue_mr_widget/components/mr_widget_memory_usage_spec.js
+1
-1
spec/javascripts/vue_shared/components/memory_graph_spec.js
spec/javascripts/vue_shared/components/memory_graph_spec.js
+2
-2
No files found.
spec/javascripts/.eslintrc.yml
View file @
db4c1f66
...
...
@@ -39,5 +39,4 @@ rules:
jasmine/new-line-before-expect
:
off
jasmine/new-line-between-declarations
:
off
jasmine/no-promise-without-done-fail
:
off
jasmine/prefer-jasmine-matcher
:
off
jasmine/prefer-toHaveBeenCalledWith
:
off
spec/javascripts/datetime_utility_spec.js
View file @
db4c1f66
...
...
@@ -158,9 +158,9 @@ describe('getTimeframeWindowFrom', () => {
const
timeframe
=
datetimeUtility
.
getTimeframeWindowFrom
(
startDate
,
5
);
expect
(
timeframe
.
length
).
toBe
(
5
);
timeframe
.
forEach
((
timeframeItem
,
index
)
=>
{
expect
(
timeframeItem
.
getFullYear
()
===
mockTimeframe
[
index
].
getFullYear
()).
toBe
(
true
);
expect
(
timeframeItem
.
getMonth
()
===
mockTimeframe
[
index
].
getMonth
()).
toBe
(
true
);
expect
(
timeframeItem
.
getDate
()
===
mockTimeframe
[
index
].
getDate
()).
toBeTruthy
(
);
expect
(
timeframeItem
.
getFullYear
()
).
toBe
(
mockTimeframe
[
index
].
getFullYear
()
);
expect
(
timeframeItem
.
getMonth
()
).
toBe
(
mockTimeframe
[
index
].
getMonth
()
);
expect
(
timeframeItem
.
getDate
()
).
toBe
(
mockTimeframe
[
index
].
getDate
()
);
});
});
});
...
...
spec/javascripts/diffs/components/diff_file_spec.js
View file @
db4c1f66
...
...
@@ -24,14 +24,14 @@ describe('DiffFile', () => {
expect
(
el
.
querySelectorAll
(
'
.diff-content.hidden
'
).
length
).
toEqual
(
0
);
expect
(
el
.
querySelector
(
'
.js-file-title
'
)).
toBeDefined
();
expect
(
el
.
querySelector
(
'
.file-title-name
'
).
innerText
.
indexOf
(
filePath
)
>
-
1
).
toEqual
(
true
);
expect
(
el
.
querySelector
(
'
.file-title-name
'
).
innerText
.
indexOf
(
filePath
)
).
toBeGreaterThan
(
-
1
);
expect
(
el
.
querySelector
(
'
.js-syntax-highlight
'
)).
toBeDefined
();
expect
(
vm
.
file
.
renderIt
).
toEqual
(
false
);
vm
.
file
.
renderIt
=
true
;
vm
.
$nextTick
(()
=>
{
expect
(
el
.
querySelectorAll
(
'
.line_content
'
).
length
>
5
).
toEqual
(
true
);
expect
(
el
.
querySelectorAll
(
'
.line_content
'
).
length
).
toBeGreaterThan
(
5
);
});
});
...
...
@@ -98,9 +98,7 @@ describe('DiffFile', () => {
'
This source diff could not be displayed because it is too large
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-too-large-diff
'
)).
toBeDefined
();
expect
(
vm
.
$el
.
querySelector
(
'
.js-too-large-diff a
'
).
href
.
indexOf
(
BLOB_LINK
)
>
-
1
).
toEqual
(
true
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-too-large-diff a
'
).
href
.
indexOf
(
BLOB_LINK
)).
toBeGreaterThan
(
-
1
);
done
();
});
...
...
spec/javascripts/diffs/components/diff_line_gutter_content_spec.js
View file @
db4c1f66
...
...
@@ -94,7 +94,7 @@ describe('DiffLineGutterContent', () => {
const
component
=
createComponent
({
lineNumber
,
lineCode
});
const
link
=
component
.
$el
.
querySelector
(
'
a
'
);
expect
(
link
.
href
.
indexOf
(
`#
${
lineCode
}
`
)
>
-
1
).
toEqual
(
true
);
expect
(
link
.
href
.
indexOf
(
`#
${
lineCode
}
`
)
).
toBeGreaterThan
(
-
1
);
expect
(
link
.
dataset
.
linenumber
).
toEqual
(
lineNumber
.
toString
());
});
...
...
spec/javascripts/diffs/components/inline_diff_view_spec.js
View file @
db4c1f66
...
...
@@ -27,7 +27,7 @@ describe('InlineDiffView', () => {
expect
(
el
.
querySelectorAll
(
'
tr.line_holder
'
).
length
).
toEqual
(
6
);
expect
(
el
.
querySelectorAll
(
'
tr.line_holder.new
'
).
length
).
toEqual
(
2
);
expect
(
el
.
querySelectorAll
(
'
tr.line_holder.match
'
).
length
).
toEqual
(
1
);
expect
(
el
.
textContent
.
indexOf
(
'
Bad dates
'
)
>
-
1
).
toEqual
(
true
);
expect
(
el
.
textContent
.
indexOf
(
'
Bad dates
'
)
).
toBeGreaterThan
(
-
1
);
});
it
(
'
should render discussions
'
,
done
=>
{
...
...
@@ -37,7 +37,7 @@ describe('InlineDiffView', () => {
Vue
.
nextTick
(()
=>
{
expect
(
el
.
querySelectorAll
(
'
.notes_holder
'
).
length
).
toEqual
(
1
);
expect
(
el
.
querySelectorAll
(
'
.notes_holder .note-discussion li
'
).
length
).
toEqual
(
5
);
expect
(
el
.
innerText
.
indexOf
(
'
comment 5
'
)
>
-
1
).
toEqual
(
true
);
expect
(
el
.
innerText
.
indexOf
(
'
comment 5
'
)
).
toBeGreaterThan
(
-
1
);
component
.
$store
.
dispatch
(
'
setInitialNotes
'
,
[]);
done
();
...
...
spec/javascripts/filtered_search/dropdown_utils_spec.js
View file @
db4c1f66
...
...
@@ -237,7 +237,7 @@ describe('Dropdown Utils', () => {
it
(
'
should not linear-gradient more than 4 colors
'
,
()
=>
{
const
gradient
=
DropdownUtils
.
duplicateLabelColor
([
'
#FFFFFF
'
,
'
#000000
'
,
'
#333333
'
,
'
#DDDDDD
'
,
'
#EEEEEE
'
]);
expect
(
gradient
.
indexOf
(
'
#EEEEEE
'
)
===
-
1
).
toEqual
(
true
);
expect
(
gradient
.
indexOf
(
'
#EEEEEE
'
)
).
toBe
(
-
1
);
});
});
...
...
spec/javascripts/filtered_search/filtered_search_token_keys_spec.js
View file @
db4c1f66
...
...
@@ -19,7 +19,7 @@ describe('Filtered Search Token Keys', () => {
describe
(
'
get
'
,
()
=>
{
it
(
'
should return tokenKeys
'
,
()
=>
{
expect
(
new
FilteredSearchTokenKeys
().
get
()
!==
null
).
toBe
(
true
);
expect
(
new
FilteredSearchTokenKeys
().
get
()
).
not
.
toBeNull
(
);
});
it
(
'
should return tokenKeys as an array
'
,
()
=>
{
...
...
@@ -40,7 +40,7 @@ describe('Filtered Search Token Keys', () => {
describe
(
'
getConditions
'
,
()
=>
{
it
(
'
should return conditions
'
,
()
=>
{
expect
(
new
FilteredSearchTokenKeys
().
getConditions
()
!==
null
).
toBe
(
true
);
expect
(
new
FilteredSearchTokenKeys
().
getConditions
()
).
not
.
toBeNull
(
);
});
it
(
'
should return conditions as an array
'
,
()
=>
{
...
...
@@ -51,7 +51,7 @@ describe('Filtered Search Token Keys', () => {
describe
(
'
searchByKey
'
,
()
=>
{
it
(
'
should return null when key not found
'
,
()
=>
{
const
tokenKey
=
new
FilteredSearchTokenKeys
(
tokenKeys
).
searchByKey
(
'
notakey
'
);
expect
(
tokenKey
===
null
).
toBe
(
true
);
expect
(
tokenKey
).
toBeNull
(
);
});
it
(
'
should return tokenKey when found by key
'
,
()
=>
{
...
...
@@ -63,7 +63,7 @@ describe('Filtered Search Token Keys', () => {
describe
(
'
searchBySymbol
'
,
()
=>
{
it
(
'
should return null when symbol not found
'
,
()
=>
{
const
tokenKey
=
new
FilteredSearchTokenKeys
(
tokenKeys
).
searchBySymbol
(
'
notasymbol
'
);
expect
(
tokenKey
===
null
).
toBe
(
true
);
expect
(
tokenKey
).
toBeNull
(
);
});
it
(
'
should return tokenKey when found by symbol
'
,
()
=>
{
...
...
@@ -75,7 +75,7 @@ describe('Filtered Search Token Keys', () => {
describe
(
'
searchByKeyParam
'
,
()
=>
{
it
(
'
should return null when key param not found
'
,
()
=>
{
const
tokenKey
=
new
FilteredSearchTokenKeys
(
tokenKeys
).
searchByKeyParam
(
'
notakeyparam
'
);
expect
(
tokenKey
===
null
).
toBe
(
true
);
expect
(
tokenKey
).
toBeNull
(
);
});
it
(
'
should return tokenKey when found by key param
'
,
()
=>
{
...
...
@@ -92,7 +92,7 @@ describe('Filtered Search Token Keys', () => {
describe
(
'
searchByConditionUrl
'
,
()
=>
{
it
(
'
should return null when condition url not found
'
,
()
=>
{
const
condition
=
new
FilteredSearchTokenKeys
([],
[],
conditions
).
searchByConditionUrl
(
null
);
expect
(
condition
===
null
).
toBe
(
true
);
expect
(
condition
).
toBeNull
(
);
});
it
(
'
should return condition when found by url
'
,
()
=>
{
...
...
@@ -106,7 +106,7 @@ describe('Filtered Search Token Keys', () => {
it
(
'
should return null when condition tokenKey and value not found
'
,
()
=>
{
const
condition
=
new
FilteredSearchTokenKeys
([],
[],
conditions
)
.
searchByConditionKeyValue
(
null
,
null
);
expect
(
condition
===
null
).
toBe
(
true
);
expect
(
condition
).
toBeNull
(
);
});
it
(
'
should return condition when found by tokenKey and value
'
,
()
=>
{
...
...
spec/javascripts/gl_dropdown_spec.js
View file @
db4c1f66
...
...
@@ -168,9 +168,9 @@ describe('glDropdown', function describeDropdown() {
it
(
'
should show loading indicator while search results are being fetched by backend
'
,
()
=>
{
const
dropdownMenu
=
document
.
querySelector
(
'
.dropdown-menu
'
);
expect
(
dropdownMenu
.
className
.
indexOf
(
'
is-loading
'
)
!==
-
1
).
toEqual
(
true
);
expect
(
dropdownMenu
.
className
.
indexOf
(
'
is-loading
'
)
).
not
.
toBe
(
-
1
);
remoteCallback
();
expect
(
dropdownMenu
.
className
.
indexOf
(
'
is-loading
'
)
!==
-
1
).
toEqual
(
false
);
expect
(
dropdownMenu
.
className
.
indexOf
(
'
is-loading
'
)
).
toBe
(
-
1
);
});
it
(
'
should not focus search input while remote task is not complete
'
,
()
=>
{
...
...
spec/javascripts/groups/components/group_item_spec.js
View file @
db4c1f66
...
...
@@ -45,7 +45,7 @@ describe('GroupItemComponent', () => {
expect
(
Object
.
keys
(
rowClass
).
length
).
toBe
(
classes
.
length
);
Object
.
keys
(
rowClass
).
forEach
((
className
)
=>
{
expect
(
classes
.
indexOf
(
className
)
>
-
1
).
toBeTruthy
(
);
expect
(
classes
.
indexOf
(
className
)
).
toBeGreaterThan
(
-
1
);
});
});
});
...
...
spec/javascripts/groups/components/groups_spec.js
View file @
db4c1f66
...
...
@@ -53,7 +53,7 @@ describe('GroupsComponent', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.groups-list-tree-container
'
)).
toBeDefined
();
expect
(
vm
.
$el
.
querySelector
(
'
.group-list-tree
'
)).
toBeDefined
();
expect
(
vm
.
$el
.
querySelector
(
'
.gl-pagination
'
)).
toBeDefined
();
expect
(
vm
.
$el
.
querySelectorAll
(
'
.has-no-search-results
'
).
length
===
0
).
toBeTruthy
(
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
.has-no-search-results
'
).
length
).
toBe
(
0
);
done
();
});
});
...
...
spec/javascripts/groups/components/item_stats_spec.js
View file @
db4c1f66
...
...
@@ -107,7 +107,7 @@ describe('ItemStatsComponent', () => {
const
visibilityIconEl
=
vm
.
$el
.
querySelector
(
'
.item-visibility
'
);
expect
(
visibilityIconEl
).
not
.
toBe
(
null
);
expect
(
visibilityIconEl
.
dataset
.
originalTitle
).
toBe
(
vm
.
visibilityTooltip
);
expect
(
visibilityIconEl
.
querySelectorAll
(
'
svg
'
).
length
>
0
).
toBeTruthy
(
);
expect
(
visibilityIconEl
.
querySelectorAll
(
'
svg
'
).
length
).
toBeGreaterThan
(
0
);
vm
.
$destroy
();
});
...
...
@@ -120,10 +120,10 @@ describe('ItemStatsComponent', () => {
const
vm
=
createComponent
(
item
);
const
projectStarIconEl
=
vm
.
$el
.
querySelector
(
'
.project-stars
'
);
expect
(
projectStarIconEl
).
not
.
toBe
(
null
);
expect
(
projectStarIconEl
.
querySelectorAll
(
'
svg
'
).
length
>
0
).
toBeTruthy
(
);
expect
(
projectStarIconEl
.
querySelectorAll
(
'
.stat-value
'
).
length
>
0
).
toBeTruthy
(
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
.last-updated
'
).
length
>
0
).
toBeTruthy
(
);
expect
(
projectStarIconEl
).
not
.
toBe
Null
(
);
expect
(
projectStarIconEl
.
querySelectorAll
(
'
svg
'
).
length
).
toBeGreaterThan
(
0
);
expect
(
projectStarIconEl
.
querySelectorAll
(
'
.stat-value
'
).
length
).
toBeGreaterThan
(
0
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
.last-updated
'
).
length
).
toBeGreaterThan
(
0
);
vm
.
$destroy
();
});
...
...
spec/javascripts/groups/components/item_stats_value_spec.js
View file @
db4c1f66
...
...
@@ -57,8 +57,8 @@ describe('ItemStatsValueComponent', () => {
it
(
'
renders component element correctly
'
,
()
=>
{
expect
(
vm
.
$el
.
classList
.
contains
(
'
number-subgroups
'
)).
toBeTruthy
();
expect
(
vm
.
$el
.
querySelectorAll
(
'
svg
'
).
length
>
0
).
toBeTruthy
(
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
.stat-value
'
).
length
>
0
).
toBeTruthy
(
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
svg
'
).
length
).
toBeGreaterThan
(
0
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
.stat-value
'
).
length
).
toBeGreaterThan
(
0
);
});
it
(
'
renders element tooltip correctly
'
,
()
=>
{
...
...
spec/javascripts/groups/store/groups_store_spec.js
View file @
db4c1f66
...
...
@@ -29,7 +29,7 @@ describe('ProjectsStore', () => {
store
.
setGroups
(
mockGroups
);
expect
(
store
.
state
.
groups
.
length
).
toBe
(
mockGroups
.
length
);
expect
(
store
.
formatGroupItem
).
toHaveBeenCalledWith
(
jasmine
.
any
(
Object
));
expect
(
Object
.
keys
(
store
.
state
.
groups
[
0
]).
indexOf
(
'
fullName
'
)
>
-
1
).
toBeTruthy
(
);
expect
(
Object
.
keys
(
store
.
state
.
groups
[
0
]).
indexOf
(
'
fullName
'
)
).
toBeGreaterThan
(
-
1
);
});
});
...
...
@@ -41,8 +41,8 @@ describe('ProjectsStore', () => {
store
.
setSearchedGroups
(
mockSearchedGroups
);
expect
(
store
.
state
.
groups
.
length
).
toBe
(
mockSearchedGroups
.
length
);
expect
(
store
.
formatGroupItem
).
toHaveBeenCalledWith
(
jasmine
.
any
(
Object
));
expect
(
Object
.
keys
(
store
.
state
.
groups
[
0
]).
indexOf
(
'
fullName
'
)
>
-
1
).
toBeTruthy
(
);
expect
(
Object
.
keys
(
store
.
state
.
groups
[
0
].
children
[
0
]).
indexOf
(
'
fullName
'
)
>
-
1
).
toBeTruthy
(
);
expect
(
Object
.
keys
(
store
.
state
.
groups
[
0
]).
indexOf
(
'
fullName
'
)
).
toBeGreaterThan
(
-
1
);
expect
(
Object
.
keys
(
store
.
state
.
groups
[
0
].
children
[
0
]).
indexOf
(
'
fullName
'
)
).
toBeGreaterThan
(
-
1
);
});
});
...
...
@@ -54,7 +54,7 @@ describe('ProjectsStore', () => {
store
.
setGroupChildren
(
mockParentGroupItem
,
mockRawChildren
);
expect
(
store
.
formatGroupItem
).
toHaveBeenCalledWith
(
jasmine
.
any
(
Object
));
expect
(
mockParentGroupItem
.
children
.
length
).
toBe
(
1
);
expect
(
Object
.
keys
(
mockParentGroupItem
.
children
[
0
]).
indexOf
(
'
fullName
'
)
>
-
1
).
toBeTruthy
(
);
expect
(
Object
.
keys
(
mockParentGroupItem
.
children
[
0
]).
indexOf
(
'
fullName
'
)
).
toBeGreaterThan
(
-
1
);
expect
(
mockParentGroupItem
.
isOpen
).
toBeTruthy
();
expect
(
mockParentGroupItem
.
isChildrenLoading
).
toBeFalsy
();
});
...
...
@@ -81,14 +81,14 @@ describe('ProjectsStore', () => {
store
=
new
GroupsStore
();
updatedGroupItem
=
store
.
formatGroupItem
(
mockRawChildren
[
0
]);
expect
(
Object
.
keys
(
updatedGroupItem
).
indexOf
(
'
fullName
'
)
>
-
1
).
toBeTruthy
(
);
expect
(
Object
.
keys
(
updatedGroupItem
).
indexOf
(
'
fullName
'
)
).
toBeGreaterThan
(
-
1
);
expect
(
updatedGroupItem
.
childrenCount
).
toBe
(
mockRawChildren
[
0
].
children_count
);
expect
(
updatedGroupItem
.
isChildrenLoading
).
toBe
(
false
);
expect
(
updatedGroupItem
.
isBeingRemoved
).
toBe
(
false
);
store
=
new
GroupsStore
(
true
);
updatedGroupItem
=
store
.
formatGroupItem
(
mockRawChildren
[
0
]);
expect
(
Object
.
keys
(
updatedGroupItem
).
indexOf
(
'
fullName
'
)
>
-
1
).
toBeTruthy
(
);
expect
(
Object
.
keys
(
updatedGroupItem
).
indexOf
(
'
fullName
'
)
).
toBeGreaterThan
(
-
1
);
expect
(
updatedGroupItem
.
childrenCount
).
toBe
(
mockRawChildren
[
0
].
subgroup_count
);
});
});
...
...
spec/javascripts/image_diff/helpers/comment_indicator_helper_spec.js
View file @
db4c1f66
...
...
@@ -32,7 +32,7 @@ describe('commentIndicatorHelper', () => {
expect
(
svgEl
).
toBeDefined
();
const
svgLink
=
svgEl
.
querySelector
(
'
use
'
).
getAttribute
(
'
xlink:href
'
);
expect
(
svgLink
.
indexOf
(
'
image-comment-dark
'
)
!==
-
1
).
toEqual
(
true
);
expect
(
svgLink
.
indexOf
(
'
image-comment-dark
'
)
).
not
.
toBe
(
-
1
);
});
});
});
...
...
spec/javascripts/lib/utils/common_utils_spec.js
View file @
db4c1f66
...
...
@@ -42,7 +42,7 @@ describe('common_utils', () => {
it
(
'
should remove the question mark from the search params
'
,
()
=>
{
const
paramsArray
=
commonUtils
.
urlParamsToArray
(
'
?test=thing
'
);
expect
(
paramsArray
[
0
][
0
]
!==
'
?
'
).
toBe
(
true
);
expect
(
paramsArray
[
0
][
0
]
).
not
.
toBe
(
'
?
'
);
});
});
...
...
spec/javascripts/notes_spec.js
View file @
db4c1f66
...
...
@@ -538,7 +538,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
mockNotesPost
();
$
(
'
.js-comment-button
'
).
click
();
expect
(
$notesContainer
.
find
(
'
.note.being-posted
'
).
length
>
0
).
toEqual
(
true
);
expect
(
$notesContainer
.
find
(
'
.note.being-posted
'
).
length
).
toBeGreaterThan
(
0
);
});
it
(
'
should remove placeholder note when new comment is done posting
'
,
done
=>
{
...
...
@@ -582,7 +582,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
$
(
'
.js-comment-button
'
).
click
();
setTimeout
(()
=>
{
expect
(
$notesContainer
.
find
(
`#note_
${
note
.
id
}
`
).
length
>
0
).
toEqual
(
true
);
expect
(
$notesContainer
.
find
(
`#note_
${
note
.
id
}
`
).
length
).
toBeGreaterThan
(
0
);
done
();
});
...
...
@@ -776,7 +776,7 @@ import timeoutPromise from './helpers/set_timeout_promise_helper';
$form
.
find
(
'
textarea.js-note-text
'
).
val
(
sampleComment
);
const
{
formData
,
formContent
,
formAction
}
=
this
.
notes
.
getFormData
(
$form
);
expect
(
formData
.
indexOf
(
sampleComment
)
>
-
1
).
toBe
(
true
);
expect
(
formData
.
indexOf
(
sampleComment
)
).
toBeGreaterThan
(
-
1
);
expect
(
formContent
).
toEqual
(
sampleComment
);
expect
(
formAction
).
toEqual
(
$form
.
attr
(
'
action
'
));
});
...
...
spec/javascripts/vue_mr_widget/components/mr_widget_memory_usage_spec.js
View file @
db4c1f66
...
...
@@ -137,7 +137,7 @@ describe('MemoryUsage', () => {
}
=
vm
;
expect
(
hasMetrics
).
toBeTruthy
();
expect
(
memoryMetrics
.
length
>
0
).
toBeTruthy
(
);
expect
(
memoryMetrics
.
length
).
toBeGreaterThan
(
0
);
expect
(
deploymentTime
).
toEqual
(
deployment_time
);
expect
(
memoryFrom
).
toEqual
(
'
9.13
'
);
expect
(
memoryTo
).
toEqual
(
'
4.28
'
);
...
...
spec/javascripts/vue_shared/components/memory_graph_spec.js
View file @
db4c1f66
...
...
@@ -52,8 +52,8 @@ describe('MemoryGraph', () => {
it
(
'
should show human readable median value based on provided median timestamp
'
,
()
=>
{
vm
.
deploymentTime
=
mockMedian
;
const
formattedMedian
=
vm
.
getFormattedMedian
;
expect
(
formattedMedian
.
indexOf
(
'
Deployed
'
)
>
-
1
).
toBeTruthy
(
);
expect
(
formattedMedian
.
indexOf
(
'
ago
'
)
>
-
1
).
toBeTruthy
(
);
expect
(
formattedMedian
.
indexOf
(
'
Deployed
'
)
).
toBeGreaterThan
(
-
1
);
expect
(
formattedMedian
.
indexOf
(
'
ago
'
)
).
toBeGreaterThan
(
-
1
);
});
});
});
...
...
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