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
7253fc6b
Commit
7253fc6b
authored
Aug 17, 2020
by
NataliaTepluhina
Committed by
Jose Vargas
Aug 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed legacy test
parent
05fae5ac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
16 deletions
+9
-16
app/assets/javascripts/design_management_legacy/pages/index.vue
...sets/javascripts/design_management_legacy/pages/index.vue
+1
-1
spec/frontend/design_management_legacy/pages/index_spec.js
spec/frontend/design_management_legacy/pages/index_spec.js
+8
-15
No files found.
app/assets/javascripts/design_management_legacy/pages/index.vue
View file @
7253fc6b
...
...
@@ -168,7 +168,7 @@ export default {
// if this upload resulted in a new version being created, redirect user to the latest version
if
(
!
this
.
isLatestVersion
)
{
this
.
$router
.
push
({
name
:
DESIGNS_ROUTE_NAME
});
this
.
$router
.
push
({
name
:
DESIGNS_ROUTE_NAME
}
,
()
=>
{}
);
}
this
.
resetFilesToBeSaved
();
},
...
...
spec/frontend/design_management_legacy/pages/index_spec.js
View file @
7253fc6b
...
...
@@ -450,16 +450,15 @@ describe('Design management index page', () => {
describe
(
'
on non-latest version
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
designs
:
mockDesigns
,
allVersions
:
[
mockVersion
]
});
});
router
.
replace
({
it
(
'
does not render design checkboxes
'
,
async
()
=>
{
await
router
.
replace
({
name
:
DESIGNS_ROUTE_NAME
,
query
:
{
version
:
'
2
'
,
},
});
});
it
(
'
does not render design checkboxes
'
,
()
=>
{
expect
(
findDesignCheckboxes
()).
toHaveLength
(
0
);
});
...
...
@@ -482,16 +481,9 @@ describe('Design management index page', () => {
});
event
=
new
Event
(
'
paste
'
);
router
.
replace
({
name
:
DESIGNS_ROUTE_NAME
,
query
:
{
version
:
'
2
'
,
},
});
});
it
(
'
calls onUploadDesign with valid paste
'
,
()
=>
{
it
(
'
calls onUploadDesign with valid paste
'
,
async
()
=>
{
event
.
clipboardData
=
{
files
:
[{
name
:
'
image.png
'
,
type
:
'
image/png
'
}],
getData
:
()
=>
'
test.png
'
,
...
...
@@ -532,11 +524,12 @@ describe('Design management index page', () => {
});
describe
(
'
when navigating
'
,
()
=>
{
it
(
'
ensures fullscreen layout is not applied
'
,
()
=>
{
it
(
'
ensures fullscreen layout is not applied
'
,
async
()
=>
{
createComponent
(
true
);
wrapper
.
vm
.
$router
.
push
(
'
/designs
'
);
expect
(
mockPageEl
.
classList
.
remove
).
toHaveBeenCalledTimes
(
1
);
await
wrapper
.
vm
.
$router
.
replace
(
'
/
'
);
await
wrapper
.
vm
.
$router
.
replace
(
'
/designs
'
);
expect
(
mockPageEl
.
classList
.
remove
).
toHaveBeenCalledTimes
(
2
);
expect
(
mockPageEl
.
classList
.
remove
).
toHaveBeenCalledWith
(...
DESIGN_DETAIL_LAYOUT_CLASSLIST
);
});
});
...
...
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