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
aff7b4a5
Commit
aff7b4a5
authored
Jun 18, 2020
by
jboyson
Committed by
Paul Slaughter
Jun 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use getByText to find expansion link
parent
b39e3e74
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
spec/frontend/diffs/components/diff_expansion_cell_spec.js
spec/frontend/diffs/components/diff_expansion_cell_spec.js
+2
-2
No files found.
spec/frontend/diffs/components/diff_expansion_cell_spec.js
View file @
aff7b4a5
...
@@ -6,10 +6,10 @@ import DiffExpansionCell from '~/diffs/components/diff_expansion_cell.vue';
...
@@ -6,10 +6,10 @@ import DiffExpansionCell from '~/diffs/components/diff_expansion_cell.vue';
import
{
getPreviousLineIndex
}
from
'
~/diffs/store/utils
'
;
import
{
getPreviousLineIndex
}
from
'
~/diffs/store/utils
'
;
import
{
INLINE_DIFF_VIEW_TYPE
,
PARALLEL_DIFF_VIEW_TYPE
}
from
'
~/diffs/constants
'
;
import
{
INLINE_DIFF_VIEW_TYPE
,
PARALLEL_DIFF_VIEW_TYPE
}
from
'
~/diffs/constants
'
;
import
diffFileMockData
from
'
../mock_data/diff_file
'
;
import
diffFileMockData
from
'
../mock_data/diff_file
'
;
import
{
getByText
}
from
'
@testing-library/dom
'
;
const
EXPAND_UP_CLASS
=
'
.js-unfold
'
;
const
EXPAND_UP_CLASS
=
'
.js-unfold
'
;
const
EXPAND_DOWN_CLASS
=
'
.js-unfold-down
'
;
const
EXPAND_DOWN_CLASS
=
'
.js-unfold-down
'
;
const
EXPAND_ALL_CLASS
=
'
.js-unfold-all
'
;
const
LINE_TO_USE
=
5
;
const
LINE_TO_USE
=
5
;
const
lineSources
=
{
const
lineSources
=
{
[
INLINE_DIFF_VIEW_TYPE
]:
'
highlighted_diff_lines
'
,
[
INLINE_DIFF_VIEW_TYPE
]:
'
highlighted_diff_lines
'
,
...
@@ -88,7 +88,7 @@ describe('DiffExpansionCell', () => {
...
@@ -88,7 +88,7 @@ describe('DiffExpansionCell', () => {
const
findExpandUp
=
()
=>
vm
.
$el
.
querySelector
(
EXPAND_UP_CLASS
);
const
findExpandUp
=
()
=>
vm
.
$el
.
querySelector
(
EXPAND_UP_CLASS
);
const
findExpandDown
=
()
=>
vm
.
$el
.
querySelector
(
EXPAND_DOWN_CLASS
);
const
findExpandDown
=
()
=>
vm
.
$el
.
querySelector
(
EXPAND_DOWN_CLASS
);
const
findExpandAll
=
()
=>
vm
.
$el
.
querySelector
(
EXPAND_ALL_CLASS
);
const
findExpandAll
=
()
=>
getByText
(
vm
.
$el
,
'
Show unchanged lines
'
);
describe
(
'
top row
'
,
()
=>
{
describe
(
'
top row
'
,
()
=>
{
it
(
'
should have "expand up" and "show all" option
'
,
()
=>
{
it
(
'
should have "expand up" and "show all" option
'
,
()
=>
{
...
...
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