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
2ef70d67
Commit
2ef70d67
authored
Jul 21, 2020
by
Natalia Tepluhina
Committed by
Ezekiel Kigbo
Jul 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Anchor tags to Designs is not working"
parent
c639cb5b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
app/assets/javascripts/design_management_new/pages/index.vue
app/assets/javascripts/design_management_new/pages/index.vue
+3
-0
changelogs/unreleased/229960-anchor-tags-to-designs-is-not-working.yml
...released/229960-anchor-tags-to-designs-is-not-working.yml
+5
-0
spec/frontend/design_management_new/pages/index_spec.js
spec/frontend/design_management_new/pages/index_spec.js
+12
-0
No files found.
app/assets/javascripts/design_management_new/pages/index.vue
View file @
2ef70d67
...
@@ -107,6 +107,9 @@ export default {
...
@@ -107,6 +107,9 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
toggleOnPasteListener
(
this
.
$route
.
name
);
this
.
toggleOnPasteListener
(
this
.
$route
.
name
);
if
(
this
.
$route
.
path
===
'
/designs
'
)
{
this
.
$el
.
scrollIntoView
();
}
},
},
methods
:
{
methods
:
{
resetFilesToBeSaved
()
{
resetFilesToBeSaved
()
{
...
...
changelogs/unreleased/229960-anchor-tags-to-designs-is-not-working.yml
0 → 100644
View file @
2ef70d67
---
title
:
Resolve Anchor tags to Designs is not working
merge_request
:
37307
author
:
type
:
fixed
spec/frontend/design_management_new/pages/index_spec.js
View file @
2ef70d67
...
@@ -25,6 +25,9 @@ const mockPageEl = {
...
@@ -25,6 +25,9 @@ const mockPageEl = {
};
};
jest
.
spyOn
(
utils
,
'
getPageLayoutElement
'
).
mockReturnValue
(
mockPageEl
);
jest
.
spyOn
(
utils
,
'
getPageLayoutElement
'
).
mockReturnValue
(
mockPageEl
);
const
scrollIntoViewMock
=
jest
.
fn
();
HTMLElement
.
prototype
.
scrollIntoView
=
scrollIntoViewMock
;
const
localVue
=
createLocalVue
();
const
localVue
=
createLocalVue
();
const
router
=
createRouter
();
const
router
=
createRouter
();
localVue
.
use
(
VueRouter
);
localVue
.
use
(
VueRouter
);
...
@@ -567,5 +570,14 @@ describe('Design management index page', () => {
...
@@ -567,5 +570,14 @@ describe('Design management index page', () => {
expect
(
mockPageEl
.
classList
.
remove
).
toHaveBeenCalledTimes
(
1
);
expect
(
mockPageEl
.
classList
.
remove
).
toHaveBeenCalledTimes
(
1
);
expect
(
mockPageEl
.
classList
.
remove
).
toHaveBeenCalledWith
(...
DESIGN_DETAIL_LAYOUT_CLASSLIST
);
expect
(
mockPageEl
.
classList
.
remove
).
toHaveBeenCalledWith
(...
DESIGN_DETAIL_LAYOUT_CLASSLIST
);
});
});
it
(
'
should trigger a scrollIntoView method if designs route is detected
'
,
()
=>
{
router
.
replace
({
path
:
'
/designs
'
,
});
createComponent
(
true
);
expect
(
scrollIntoViewMock
).
toHaveBeenCalled
();
});
});
});
});
});
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