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
9b4f735e
Commit
9b4f735e
authored
Dec 23, 2020
by
Illya Klymov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated `name` calls usage
name() is deprecated in `@vue/test-utils` 1.x
parent
5dc5bd3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
ee/spec/frontend/storage_counter/components/project_with_excess_storage_spec.js
...ge_counter/components/project_with_excess_storage_spec.js
+4
-3
spec/frontend/notes/components/discussion_notes_spec.js
spec/frontend/notes/components/discussion_notes_spec.js
+1
-2
spec/frontend/notes/components/notes_app_spec.js
spec/frontend/notes/components/notes_app_spec.js
+2
-2
No files found.
ee/spec/frontend/storage_counter/components/project_with_excess_storage_spec.js
View file @
9b4f735e
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
Gl
Icon
,
Gl
Link
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
ProjectWithExcessStorage
from
'
ee/storage_counter/components/project_with_excess_storage.vue
'
;
import
{
formatUsageSize
}
from
'
ee/storage_counter/utils
'
;
...
...
@@ -22,7 +22,8 @@ const createComponent = (propsData = {}) => {
};
const
findTableRow
=
()
=>
wrapper
.
find
(
'
[data-testid="projectTableRow"]
'
);
const
findWarningIcon
=
()
=>
wrapper
.
find
({
name
:
'
status_warning
'
});
const
findWarningIcon
=
()
=>
wrapper
.
findAll
(
GlIcon
).
wrappers
.
find
(
w
=>
w
.
props
(
'
name
'
)
===
'
status_warning
'
);
const
findProjectLink
=
()
=>
wrapper
.
find
(
GlLink
);
const
getWarningIconTooltipText
=
()
=>
getBinding
(
findWarningIcon
().
element
,
'
gl-tooltip
'
).
value
;
...
...
@@ -49,7 +50,7 @@ describe('Storage Counter project component', () => {
});
it
(
'
does not render the warning icon if project is not in error state
'
,
()
=>
{
expect
(
findWarningIcon
()
.
exists
()).
toBe
(
false
);
expect
(
findWarningIcon
()
).
toBe
(
undefined
);
});
it
(
'
render row without error state background
'
,
()
=>
{
...
...
spec/frontend/notes/components/discussion_notes_spec.js
View file @
9b4f735e
...
...
@@ -124,10 +124,9 @@ describe('DiscussionNotes', () => {
describe
(
'
with groupped notes and replies expanded
'
,
()
=>
{
const
findNoteAtIndex
=
(
index
)
=>
{
const
noteComponents
=
[
NoteableNote
,
SystemNote
,
PlaceholderNote
,
PlaceholderSystemNote
];
const
allowedNames
=
noteComponents
.
map
((
c
)
=>
c
.
name
);
return
wrapper
.
findAll
(
'
.notes *
'
)
.
filter
(
(
w
)
=>
allowedNames
.
includes
(
w
.
name
(
)))
.
filter
(
w
=>
noteComponents
.
some
(
Component
=>
w
.
is
(
Component
)))
.
at
(
index
);
};
...
...
spec/frontend/notes/components/notes_app_spec.js
View file @
9b4f735e
...
...
@@ -137,7 +137,7 @@ describe('note_app', () => {
});
it
(
'
should render form
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.js-main-target-form
'
).
name
()).
toEqual
(
'
form
'
);
expect
(
wrapper
.
find
(
'
.js-main-target-form
'
).
element
.
tagName
).
toEqual
(
'
FORM
'
);
expect
(
wrapper
.
find
(
'
.js-main-target-form textarea
'
).
attributes
(
'
placeholder
'
)).
toEqual
(
'
Write a comment or drag your files here…
'
,
);
...
...
@@ -202,7 +202,7 @@ describe('note_app', () => {
});
it
(
'
should render form
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
.js-main-target-form
'
).
name
()).
toEqual
(
'
form
'
);
expect
(
wrapper
.
find
(
'
.js-main-target-form
'
).
element
.
tagName
).
toBe
(
'
FORM
'
);
expect
(
wrapper
.
find
(
'
.js-main-target-form textarea
'
).
attributes
(
'
placeholder
'
)).
toEqual
(
'
Write a comment or drag your files here…
'
,
);
...
...
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