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
b59ce918
Commit
b59ce918
authored
Sep 14, 2020
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests for modified UI text and buttons
parent
f05696dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
spec/features/merge_request/user_expands_diff_spec.rb
spec/features/merge_request/user_expands_diff_spec.rb
+2
-2
spec/frontend/diffs/components/diff_file_spec.js
spec/frontend/diffs/components/diff_file_spec.js
+8
-8
No files found.
spec/features/merge_request/user_expands_diff_spec.rb
View file @
b59ce918
...
@@ -17,11 +17,11 @@ RSpec.describe 'User expands diff', :js do
...
@@ -17,11 +17,11 @@ RSpec.describe 'User expands diff', :js do
it
'allows user to expand diff'
do
it
'allows user to expand diff'
do
page
.
within
find
(
'[id="19763941ab80e8c09871c0a425f0560d9053bcb3"]'
)
do
page
.
within
find
(
'[id="19763941ab80e8c09871c0a425f0560d9053bcb3"]'
)
do
click_link
'Click to expand it.'
find
(
'[data-testid="expandButton"]'
).
click
wait_for_requests
wait_for_requests
expect
(
page
).
not_to
have_content
(
'
Click to expand it.
'
)
expect
(
page
).
not_to
have_content
(
'
Expand File
'
)
expect
(
page
).
to
have_selector
(
'.code'
)
expect
(
page
).
to
have_selector
(
'.code'
)
end
end
end
end
...
...
spec/frontend/diffs/components/diff_file_spec.js
View file @
b59ce918
...
@@ -90,8 +90,8 @@ describe('DiffFile', () => {
...
@@ -90,8 +90,8 @@ describe('DiffFile', () => {
vm
.
isCollapsed
=
true
;
vm
.
isCollapsed
=
true
;
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
This
diff is collapsed
'
);
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
This
file is collapsed.
'
);
expect
(
vm
.
$el
.
querySelector
All
(
'
.js-click-to-expand
'
).
length
).
toEqual
(
1
);
expect
(
vm
.
$el
.
querySelector
(
'
[data-testid="expandButton"]
'
)).
not
.
toBeFalsy
(
);
done
();
done
();
});
});
...
@@ -102,8 +102,8 @@ describe('DiffFile', () => {
...
@@ -102,8 +102,8 @@ describe('DiffFile', () => {
vm
.
isCollapsed
=
true
;
vm
.
isCollapsed
=
true
;
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
This
diff is collapsed
'
);
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
This
file is collapsed.
'
);
expect
(
vm
.
$el
.
querySelector
All
(
'
.js-click-to-expand
'
).
length
).
toEqual
(
1
);
expect
(
vm
.
$el
.
querySelector
(
'
[data-testid="expandButton"]
'
)).
not
.
toBeFalsy
(
);
done
();
done
();
});
});
...
@@ -121,8 +121,8 @@ describe('DiffFile', () => {
...
@@ -121,8 +121,8 @@ describe('DiffFile', () => {
vm
.
isCollapsed
=
true
;
vm
.
isCollapsed
=
true
;
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
This
diff is collapsed
'
);
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
This
file is collapsed.
'
);
expect
(
vm
.
$el
.
querySelector
All
(
'
.js-click-to-expand
'
).
length
).
toEqual
(
1
);
expect
(
vm
.
$el
.
querySelector
(
'
[data-testid="expandButton"]
'
)).
not
.
toBeFalsy
(
);
done
();
done
();
});
});
...
@@ -135,7 +135,7 @@ describe('DiffFile', () => {
...
@@ -135,7 +135,7 @@ describe('DiffFile', () => {
vm
.
file
.
viewer
.
name
=
diffViewerModes
.
renamed
;
vm
.
file
.
viewer
.
name
=
diffViewerModes
.
renamed
;
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
innerText
).
not
.
toContain
(
'
This
diff is collapsed
'
);
expect
(
vm
.
$el
.
innerText
).
not
.
toContain
(
'
This
file is collapsed.
'
);
done
();
done
();
});
});
...
@@ -148,7 +148,7 @@ describe('DiffFile', () => {
...
@@ -148,7 +148,7 @@ describe('DiffFile', () => {
vm
.
file
.
viewer
.
name
=
diffViewerModes
.
mode_changed
;
vm
.
file
.
viewer
.
name
=
diffViewerModes
.
mode_changed
;
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
innerText
).
not
.
toContain
(
'
This
diff is collapsed
'
);
expect
(
vm
.
$el
.
innerText
).
not
.
toContain
(
'
This
file is collapsed.
'
);
done
();
done
();
});
});
...
...
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