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
f048f4d3
Commit
f048f4d3
authored
Sep 15, 2020
by
derek-knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply 2nd round of feedback
parent
667300e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
spec/frontend/static_site_editor/components/edit_area_spec.js
.../frontend/static_site_editor/components/edit_area_spec.js
+8
-12
No files found.
spec/frontend/static_site_editor/components/edit_area_spec.js
View file @
f048f4d3
...
...
@@ -79,18 +79,6 @@ describe('~/static_site_editor/components/edit_area.vue', () => {
expect
(
findUnsavedChangesConfirmDialog
().
props
(
'
modified
'
)).
toBe
(
false
);
});
it
.
each
`
key
${
'
isModified
'
}
${
'
hasMatter
'
}
`
(
'
updates $key data when refreshEditHelpers is called
'
,
({
key
})
=>
{
const
spy
=
jest
.
spyOn
(
wrapper
.
vm
.
parsedSource
,
key
);
wrapper
.
vm
.
refreshEditHelpers
();
expect
(
spy
).
toHaveBeenCalled
();
});
describe
(
'
when content changes
'
,
()
=>
{
beforeEach
(()
=>
{
findRichContentEditor
().
vm
.
$emit
(
'
input
'
,
newBody
);
...
...
@@ -196,6 +184,10 @@ describe('~/static_site_editor/components/edit_area.vue', () => {
expect
(
findEditDrawer
().
props
(
'
settings
'
)).
toBe
(
wrapper
.
vm
.
editableMatter
);
});
it
(
'
enables toolbar submit button
'
,
()
=>
{
expect
(
findPublishToolbar
().
props
(
'
hasSettings
'
)).
toBe
(
true
);
});
it
(
'
syncs matter changes
'
,
()
=>
{
const
newSettings
=
{
title
:
'
test
'
};
const
spySyncParsedSource
=
jest
.
spyOn
(
wrapper
.
vm
.
parsedSource
,
'
syncMatter
'
);
...
...
@@ -218,6 +210,10 @@ describe('~/static_site_editor/components/edit_area.vue', () => {
it
(
'
does not render edit drawer
'
,
()
=>
{
expect
(
findEditDrawer
().
exists
()).
toBe
(
false
);
});
it
(
'
does not enable toolbar submit button
'
,
()
=>
{
expect
(
findPublishToolbar
().
props
(
'
hasSettings
'
)).
toBe
(
false
);
});
});
describe
(
'
when content is submitted
'
,
()
=>
{
...
...
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