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
c4684425
Commit
c4684425
authored
Aug 04, 2020
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GlDropdown reference
parent
3e539330
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
spec/frontend/design_management_legacy/components/upload/design_version_dropdown_spec.js
..._legacy/components/upload/design_version_dropdown_spec.js
+14
-6
No files found.
spec/frontend/design_management_legacy/components/upload/design_version_dropdown_spec.js
View file @
c4684425
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
DesignVersionDropdown
from
'
~/design_management_legacy/components/upload/design_version_dropdown.vue
'
;
import
{
GlD
ropdown
,
Gl
DropdownItem
}
from
'
@gitlab/ui
'
;
import
{
GlD
eprecatedDropdown
,
GlDeprecated
DropdownItem
}
from
'
@gitlab/ui
'
;
import
mockAllVersions
from
'
./mock_data/all_versions
'
;
const
LATEST_VERSION_ID
=
3
;
...
...
@@ -75,7 +75,9 @@ describe('Design management design version dropdown component', () => {
createComponent
();
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
find
(
GlDropdown
).
attributes
(
'
text
'
)).
toBe
(
'
Showing Latest Version
'
);
expect
(
wrapper
.
find
(
GlDeprecatedDropdown
).
attributes
(
'
text
'
)).
toBe
(
'
Showing Latest Version
'
,
);
});
});
...
...
@@ -83,7 +85,9 @@ describe('Design management design version dropdown component', () => {
createComponent
({
maxVersions
:
1
});
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
find
(
GlDropdown
).
attributes
(
'
text
'
)).
toBe
(
'
Showing Latest Version
'
);
expect
(
wrapper
.
find
(
GlDeprecatedDropdown
).
attributes
(
'
text
'
)).
toBe
(
'
Showing Latest Version
'
,
);
});
});
...
...
@@ -91,7 +95,7 @@ describe('Design management design version dropdown component', () => {
createComponent
({
$route
:
designRouteFactory
(
PREVIOUS_VERSION_ID
)
});
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
find
(
GlDropdown
).
attributes
(
'
text
'
)).
toBe
(
`Showing Version #1`
);
expect
(
wrapper
.
find
(
GlD
eprecatedD
ropdown
).
attributes
(
'
text
'
)).
toBe
(
`Showing Version #1`
);
});
});
...
...
@@ -99,7 +103,9 @@ describe('Design management design version dropdown component', () => {
createComponent
({
$route
:
designRouteFactory
(
LATEST_VERSION_ID
)
});
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
find
(
GlDropdown
).
attributes
(
'
text
'
)).
toBe
(
'
Showing Latest Version
'
);
expect
(
wrapper
.
find
(
GlDeprecatedDropdown
).
attributes
(
'
text
'
)).
toBe
(
'
Showing Latest Version
'
,
);
});
});
...
...
@@ -107,7 +113,9 @@ describe('Design management design version dropdown component', () => {
createComponent
();
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
findAll
(
GlDropdownItem
)).
toHaveLength
(
wrapper
.
vm
.
allVersions
.
length
);
expect
(
wrapper
.
findAll
(
GlDeprecatedDropdownItem
)).
toHaveLength
(
wrapper
.
vm
.
allVersions
.
length
,
);
});
});
});
...
...
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