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
fb3117c2
Commit
fb3117c2
authored
Nov 04, 2021
by
Scott Stern
Committed by
Simon Knox
Nov 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove extra separator in breadcrumb for cadences
parent
1f56a262
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
ee/app/assets/javascripts/iterations/components/iteration_breadcrumb.vue
...avascripts/iterations/components/iteration_breadcrumb.vue
+7
-5
ee/spec/frontend/iterations/components/iteration_breadcumb_spec.js
...rontend/iterations/components/iteration_breadcumb_spec.js
+16
-4
No files found.
ee/app/assets/javascripts/iterations/components/iteration_breadcrumb.vue
View file @
fb3117c2
...
...
@@ -59,11 +59,13 @@ export default {
const
prevPath
=
breadcrumbs
[
index
-
1
]?.
to
||
''
;
const
to
=
`
${
prevPath
}
/
${
path
}
`
.
replace
(
/
\/
+/
,
'
/
'
);
breadcrumbs
.
push
({
path
,
to
,
text
,
});
if
(
text
)
{
breadcrumbs
.
push
({
path
,
to
,
text
,
});
}
});
return
breadcrumbs
;
...
...
ee/spec/frontend/iterations/components/iteration_breadcumb_spec.js
View file @
fb3117c2
...
...
@@ -160,9 +160,12 @@ describe('Iteration Breadcrumb', () => {
describe
(
'
when cadence is present
'
,
()
=>
{
const
cadenceTitle
=
'
cadencetitle
'
;
const
breadcrumbProps
=
()
=>
findBreadcrumb
().
props
(
'
items
'
);
it
(
'
is found in crumb items
'
,
async
()
=>
{
const
cadenceSpy
=
jest
.
fn
().
mockResolvedValue
({
let
cadenceSpy
;
beforeEach
(
async
()
=>
{
cadenceSpy
=
jest
.
fn
().
mockResolvedValue
({
data
:
{
group
:
{
id
:
''
,
...
...
@@ -183,16 +186,25 @@ describe('Iteration Breadcrumb', () => {
},
},
});
});
it
(
'
is found in crumb items
'
,
async
()
=>
{
await
router
.
push
({
name
:
'
editIteration
'
,
params
:
{
cadenceId
:
'
123
'
,
iterationId
:
'
1
'
}
});
createComponentWithApollo
({
readCadenceSpy
:
cadenceSpy
});
await
waitForPromises
();
expect
(
breadcrumbProps
().
some
(({
text
})
=>
text
===
cadenceTitle
)).
toBe
(
true
);
});
const
breadcrumbProps
=
findBreadcrumb
().
props
(
'
items
'
);
it
(
'
does not pass a breadcrumb without a title
'
,
async
()
=>
{
await
router
.
push
({
name
:
'
index
'
});
createComponentWithApollo
({
readCadenceSpy
:
cadenceSpy
});
await
waitForPromises
();
expect
(
breadcrumbProps
.
some
(({
text
})
=>
text
===
cadenceTitle
)).
toBe
(
tru
e
);
expect
(
breadcrumbProps
().
some
(({
text
})
=>
text
===
''
)).
toBe
(
fals
e
);
});
});
...
...
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