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
8abcb94f
Commit
8abcb94f
authored
Apr 23, 2021
by
jboyson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test ids to be kebab case
parent
f33003a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
app/assets/javascripts/diffs/components/diff_row.vue
app/assets/javascripts/diffs/components/diff_row.vue
+8
-8
spec/frontend/diffs/components/diff_row_spec.js
spec/frontend/diffs/components/diff_row_spec.js
+5
-4
No files found.
app/assets/javascripts/diffs/components/diff_row.vue
View file @
8abcb94f
...
...
@@ -204,7 +204,7 @@ export default {
<template
v-if=
"line.left && line.left.type !== $options.CONFLICT_MARKER"
>
<div
:class=
"classNameMapCellLeft"
data-testid=
"left
LineN
umber"
data-testid=
"left
-line-n
umber"
class=
"diff-td diff-line-num"
>
<template
v-if=
"!isLeftConflictMarker"
>
...
...
@@ -215,7 +215,7 @@ export default {
:title=
"addCommentTooltipLeft"
>
<div
data-testid=
"left
CommentB
utton"
data-testid=
"left
-comment-b
utton"
role=
"button"
tabindex=
"0"
:draggable=
"!line.left.commentsDisabled && glFeatures.dragCommentSelection"
...
...
@@ -243,7 +243,7 @@ export default {
v-if=
"line.hasDiscussionsLeft"
:discussions=
"line.left.discussions"
:discussions-expanded=
"line.left.discussionsExpanded"
data-testid=
"left
D
iscussions"
data-testid=
"left
-d
iscussions"
@
toggleLineDiscussions=
"
toggleLineDiscussions({
lineCode: line.left.line_code,
...
...
@@ -273,7 +273,7 @@ export default {
:key=
"line.left.line_code"
:class=
"[parallelViewLeftLineType, { parallel: !inline }]"
class=
"diff-td line_content with-coverage left-side"
data-testid=
"left
C
ontent"
data-testid=
"left
-c
ontent"
@
mousedown=
"handleParallelLineMouseDown"
>
<strong
v-if=
"isLeftConflictMarker"
>
{{ conflictText(line.left) }}
</strong>
...
...
@@ -282,7 +282,7 @@ export default {
</template>
<
template
v-else-if=
"!inline || (line.left && line.left.type === $options.CONFLICT_MARKER)"
>
<div
data-testid=
"left
EmptyC
ell"
data-testid=
"left
-empty-c
ell"
class=
"diff-td diff-line-num old_line empty-cell"
:class=
"emptyCellLeftClassMap"
>
...
...
@@ -322,7 +322,7 @@ export default {
:title=
"addCommentTooltipRight"
>
<div
data-testid=
"right
CommentB
utton"
data-testid=
"right
-comment-b
utton"
role=
"button"
tabindex=
"0"
:draggable=
"!line.right.commentsDisabled && glFeatures.dragCommentSelection"
...
...
@@ -349,7 +349,7 @@ export default {
v-if=
"line.hasDiscussionsRight"
:discussions=
"line.right.discussions"
:discussions-expanded=
"line.right.discussionsExpanded"
data-testid=
"right
D
iscussions"
data-testid=
"right
-d
iscussions"
@
toggleLineDiscussions=
"
toggleLineDiscussions({
lineCode: line.right.line_code,
...
...
@@ -391,7 +391,7 @@ export default {
</template>
<
template
v-else
>
<div
data-testid=
"right
EmptyC
ell"
data-testid=
"right
-empty-c
ell"
class=
"diff-td diff-line-num old_line empty-cell"
:class=
"emptyCellRightClassMap"
></div>
...
...
spec/frontend/diffs/components/diff_row_spec.js
View file @
8abcb94f
...
...
@@ -96,7 +96,8 @@ describe('DiffRow', () => {
expect
(
wrapper
.
vm
.
isHighlighted
).
toBe
(
false
);
});
const
getCommentButton
=
(
wrapper
,
side
)
=>
wrapper
.
find
(
`[data-testid="
${
side
}
CommentButton"]`
);
const
getCommentButton
=
(
wrapper
,
side
)
=>
wrapper
.
find
(
`[data-testid="
${
side
}
-comment-button"]`
);
describe
.
each
`
side
...
...
@@ -105,8 +106,8 @@ describe('DiffRow', () => {
`
(
'
$side side
'
,
({
side
})
=>
{
it
(
`renders empty cells if
${
side
}
is unavailable`
,
()
=>
{
const
wrapper
=
createWrapper
({
props
:
{
line
:
testLines
[
2
],
inline
:
false
}
});
expect
(
wrapper
.
find
(
`[data-testid="
${
side
}
LineN
umber"]`
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
(
`[data-testid="
${
side
}
EmptyC
ell"]`
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
`[data-testid="
${
side
}
-line-n
umber"]`
).
exists
()).
toBe
(
false
);
expect
(
wrapper
.
find
(
`[data-testid="
${
side
}
-empty-c
ell"]`
).
exists
()).
toBe
(
true
);
});
describe
(
'
comment button
'
,
()
=>
{
...
...
@@ -157,7 +158,7 @@ describe('DiffRow', () => {
it
(
'
renders avatars
'
,
()
=>
{
const
wrapper
=
createWrapper
({
props
:
{
line
:
testLines
[
0
],
inline
:
false
}
});
expect
(
wrapper
.
find
(
`[data-testid="
${
side
}
D
iscussions"]`
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
`[data-testid="
${
side
}
-d
iscussions"]`
).
exists
()).
toBe
(
true
);
});
});
...
...
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