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
480e3557
Commit
480e3557
authored
Feb 05, 2020
by
jboyson1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate diff_line_gutter_content_spec to jest
Move mock data. Consolodate mock data.
parent
41283d2b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
249 deletions
+6
-249
ee/spec/frontend/diffs/components/diff_line_note_form_spec.js
...pec/frontend/diffs/components/diff_line_note_form_spec.js
+1
-1
spec/frontend/diffs/components/diff_line_gutter_content_spec.js
...rontend/diffs/components/diff_line_gutter_content_spec.js
+1
-1
spec/frontend/diffs/mock_data/diff_file.js
spec/frontend/diffs/mock_data/diff_file.js
+0
-2
spec/javascripts/diffs/mock_data/diff_file.js
spec/javascripts/diffs/mock_data/diff_file.js
+4
-245
No files found.
ee/spec/frontend/diffs/components/diff_line_note_form_spec.js
View file @
480e3557
...
...
@@ -2,7 +2,7 @@ import { shallowMount, createLocalVue } from '@vue/test-utils';
import
Vuex
from
'
vuex
'
;
import
DiffLineNoteForm
from
'
~/diffs/components/diff_line_note_form.vue
'
;
import
NoteForm
from
'
~/notes/components/note_form.vue
'
;
import
diffFileMockData
from
'
..
/mock_data/diff_file
'
;
import
diffFileMockData
from
'
jest/diffs
/mock_data/diff_file
'
;
import
note
from
'
../../notes/mock_data
'
;
const
localVue
=
createLocalVue
();
...
...
spec/
javascripts
/diffs/components/diff_line_gutter_content_spec.js
→
spec/
frontend
/diffs/components/diff_line_gutter_content_spec.js
View file @
480e3557
import
Vue
from
'
vue
'
;
import
{
createComponentWithStore
}
from
'
spec/
helpers/vue_mount_component_helper
'
;
import
{
createComponentWithStore
}
from
'
helpers/vue_mount_component_helper
'
;
import
DiffLineGutterContent
from
'
~/diffs/components/diff_line_gutter_content.vue
'
;
import
{
createStore
}
from
'
~/mr_notes/stores
'
;
import
discussionsMockData
from
'
../mock_data/diff_discussions
'
;
...
...
ee/
spec/frontend/diffs/mock_data/diff_file.js
→
spec/frontend/diffs/mock_data/diff_file.js
View file @
480e3557
// Copied from spec/javasripts/diffs/mock_data/diff_file.js
export
default
{
submodule
:
false
,
submodule_link
:
null
,
...
...
spec/javascripts/diffs/mock_data/diff_file.js
View file @
480e3557
// Copied to ee/spec/frontend/diffs/mock_data/diff_file.js
// No new code should be added to this file. Instead, modify the
// file this one re-exports from. For more detail about why, see:
// https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/31349
export
default
{
submodule
:
false
,
submodule_link
:
null
,
blob
:
{
id
:
'
9e10516ca50788acf18c518a231914a21e5f16f7
'
,
path
:
'
CHANGELOG
'
,
name
:
'
CHANGELOG
'
,
mode
:
'
100644
'
,
readable_text
:
true
,
icon
:
'
file-text-o
'
,
},
blob_path
:
'
CHANGELOG
'
,
blob_name
:
'
CHANGELOG
'
,
blob_icon
:
'
<i aria-hidden="true" data-hidden="true" class="fa fa-file-text-o fa-fw"></i>
'
,
file_hash
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a
'
,
file_path
:
'
CHANGELOG
'
,
new_file
:
false
,
deleted_file
:
false
,
renamed_file
:
false
,
old_path
:
'
CHANGELOG
'
,
new_path
:
'
CHANGELOG
'
,
mode_changed
:
false
,
a_mode
:
'
100644
'
,
b_mode
:
'
100644
'
,
text
:
true
,
viewer
:
{
name
:
'
text
'
,
error
:
null
,
collapsed
:
false
,
},
added_lines
:
2
,
removed_lines
:
0
,
diff_refs
:
{
base_sha
:
'
e63f41fe459e62e1228fcef60d7189127aeba95a
'
,
start_sha
:
'
d9eaefe5a676b820c57ff18cf5b68316025f7962
'
,
head_sha
:
'
c48ee0d1bf3b30453f5b32250ce03134beaa6d13
'
,
},
content_sha
:
'
c48ee0d1bf3b30453f5b32250ce03134beaa6d13
'
,
stored_externally
:
null
,
external_storage
:
null
,
old_path_html
:
'
CHANGELOG
'
,
new_path_html
:
'
CHANGELOG
'
,
edit_path
:
'
/gitlab-org/gitlab-test/edit/spooky-stuff/CHANGELOG
'
,
view_path
:
'
/gitlab-org/gitlab-test/blob/spooky-stuff/CHANGELOG
'
,
replaced_view_path
:
null
,
collapsed
:
false
,
renderIt
:
false
,
too_large
:
false
,
context_lines_path
:
'
/gitlab-org/gitlab-test/blob/c48ee0d1bf3b30453f5b32250ce03134beaa6d13/CHANGELOG/diff
'
,
highlighted_diff_lines
:
[
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_1_1
'
,
type
:
'
new
'
,
old_line
:
null
,
new_line
:
1
,
discussions
:
[],
text
:
'
+<span id="LC1" class="line" lang="plaintext"> - Bad dates</span>
\n
'
,
rich_text
:
'
+<span id="LC1" class="line" lang="plaintext"> - Bad dates</span>
\n
'
,
meta_data
:
null
,
},
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_1_2
'
,
type
:
'
new
'
,
old_line
:
null
,
new_line
:
2
,
discussions
:
[],
text
:
'
+<span id="LC2" class="line" lang="plaintext"></span>
\n
'
,
rich_text
:
'
+<span id="LC2" class="line" lang="plaintext"></span>
\n
'
,
meta_data
:
null
,
},
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_1_3
'
,
type
:
null
,
old_line
:
1
,
new_line
:
3
,
discussions
:
[],
text
:
'
<span id="LC3" class="line" lang="plaintext">v6.8.0</span>
\n
'
,
rich_text
:
'
<span id="LC3" class="line" lang="plaintext">v6.8.0</span>
\n
'
,
meta_data
:
null
,
},
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_2_4
'
,
type
:
null
,
old_line
:
2
,
new_line
:
4
,
discussions
:
[],
text
:
'
<span id="LC4" class="line" lang="plaintext"></span>
\n
'
,
rich_text
:
'
<span id="LC4" class="line" lang="plaintext"></span>
\n
'
,
meta_data
:
null
,
},
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_3_5
'
,
type
:
null
,
old_line
:
3
,
new_line
:
5
,
discussions
:
[],
text
:
'
<span id="LC5" class="line" lang="plaintext">v6.7.0</span>
\n
'
,
rich_text
:
'
<span id="LC5" class="line" lang="plaintext">v6.7.0</span>
\n
'
,
meta_data
:
null
,
},
{
line_code
:
null
,
type
:
'
match
'
,
old_line
:
null
,
new_line
:
null
,
discussions
:
[],
text
:
''
,
rich_text
:
''
,
meta_data
:
{
old_pos
:
3
,
new_pos
:
5
,
},
},
],
parallel_diff_lines
:
[
{
left
:
{
type
:
'
empty-cell
'
,
},
right
:
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_1_1
'
,
type
:
'
new
'
,
old_line
:
null
,
new_line
:
1
,
discussions
:
[],
text
:
'
+<span id="LC1" class="line" lang="plaintext"> - Bad dates</span>
\n
'
,
rich_text
:
'
<span id="LC1" class="line" lang="plaintext"> - Bad dates</span>
\n
'
,
meta_data
:
null
,
},
},
{
left
:
{
type
:
'
empty-cell
'
,
},
right
:
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_1_2
'
,
type
:
'
new
'
,
old_line
:
null
,
new_line
:
2
,
discussions
:
[],
text
:
'
+<span id="LC2" class="line" lang="plaintext"></span>
\n
'
,
rich_text
:
'
<span id="LC2" class="line" lang="plaintext"></span>
\n
'
,
meta_data
:
null
,
},
},
{
left
:
{
line_Code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_1_3
'
,
type
:
null
,
old_line
:
1
,
new_line
:
3
,
discussions
:
[],
text
:
'
<span id="LC3" class="line" lang="plaintext">v6.8.0</span>
\n
'
,
rich_text
:
'
<span id="LC3" class="line" lang="plaintext">v6.8.0</span>
\n
'
,
meta_data
:
null
,
},
right
:
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_1_3
'
,
type
:
null
,
old_line
:
1
,
new_line
:
3
,
discussions
:
[],
text
:
'
<span id="LC3" class="line" lang="plaintext">v6.8.0</span>
\n
'
,
rich_text
:
'
<span id="LC3" class="line" lang="plaintext">v6.8.0</span>
\n
'
,
meta_data
:
null
,
},
},
{
left
:
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_2_4
'
,
type
:
null
,
old_line
:
2
,
new_line
:
4
,
discussions
:
[],
text
:
'
<span id="LC4" class="line" lang="plaintext"></span>
\n
'
,
rich_text
:
'
<span id="LC4" class="line" lang="plaintext"></span>
\n
'
,
meta_data
:
null
,
},
right
:
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_2_4
'
,
type
:
null
,
old_line
:
2
,
new_line
:
4
,
discussions
:
[],
text
:
'
<span id="LC4" class="line" lang="plaintext"></span>
\n
'
,
rich_text
:
'
<span id="LC4" class="line" lang="plaintext"></span>
\n
'
,
meta_data
:
null
,
},
},
{
left
:
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_3_5
'
,
type
:
null
,
old_line
:
3
,
new_line
:
5
,
discussions
:
[],
text
:
'
<span id="LC5" class="line" lang="plaintext">v6.7.0</span>
\n
'
,
rich_text
:
'
<span id="LC5" class="line" lang="plaintext">v6.7.0</span>
\n
'
,
meta_data
:
null
,
},
right
:
{
line_code
:
'
1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_3_5
'
,
type
:
null
,
old_line
:
3
,
new_line
:
5
,
discussions
:
[],
text
:
'
<span id="LC5" class="line" lang="plaintext">v6.7.0</span>
\n
'
,
rich_text
:
'
<span id="LC5" class="line" lang="plaintext">v6.7.0</span>
\n
'
,
meta_data
:
null
,
},
},
{
left
:
{
line_code
:
null
,
type
:
'
match
'
,
old_line
:
null
,
new_line
:
null
,
discussions
:
[],
text
:
''
,
rich_text
:
''
,
meta_data
:
{
old_pos
:
3
,
new_pos
:
5
,
},
},
right
:
{
line_code
:
null
,
type
:
'
match
'
,
old_line
:
null
,
new_line
:
null
,
discussions
:
[],
text
:
''
,
rich_text
:
''
,
meta_data
:
{
old_pos
:
3
,
new_pos
:
5
,
},
},
},
],
discussions
:
[],
renderingLines
:
false
,
};
export
{
default
}
from
'
../../../frontend/diffs/mock_data/diff_file
'
;
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