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
e167f1d9
Commit
e167f1d9
authored
Nov 17, 2021
by
Enrique Alcantara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code review feedback
parent
446bdafc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
spec/frontend/pages/shared/wikis/components/wiki_form_spec.js
.../frontend/pages/shared/wikis/components/wiki_form_spec.js
+15
-7
No files found.
spec/frontend/pages/shared/wikis/components/wiki_form_spec.js
View file @
e167f1d9
...
...
@@ -309,6 +309,18 @@ describe('WikiForm', () => {
);
});
describe
(
'
when wikiSwitchBetweenContentEditorRawMarkdown feature flag is not enabled
'
,
()
=>
{
beforeEach
(()
=>
{
createShallowWrapper
(
true
,
{
glFeatures
:
{
wikiSwitchBetweenContentEditorRawMarkdown
:
false
},
});
});
it
(
'
hides toggle editing mode button
'
,
()
=>
{
expect
(
findToggleEditingModeButton
().
exists
()).
toBe
(
false
);
});
});
describe
(
'
when wikiSwitchBetweenContentEditorRawMarkdown feature flag is enabled
'
,
()
=>
{
beforeEach
(()
=>
{
createShallowWrapper
(
true
,
{
...
...
@@ -330,10 +342,8 @@ describe('WikiForm', () => {
});
describe
(
'
when clicking the toggle editing mode button
'
,
()
=>
{
beforeEach
(
async
()
=>
{
beforeEach
(()
=>
{
findToggleEditingModeButton
().
vm
.
$emit
(
'
click
'
);
await
nextTick
();
});
it
(
'
hides the classic editor
'
,
()
=>
{
...
...
@@ -355,7 +365,7 @@ describe('WikiForm', () => {
setSerializedContent
:
jest
.
fn
(),
};
wrapper
.
setData
({
useContentEditor
:
true
}
);
findToggleEditingModeButton
().
vm
.
$emit
(
'
click
'
);
});
it
(
'
hides switch to old editor button
'
,
()
=>
{
...
...
@@ -369,15 +379,13 @@ describe('WikiForm', () => {
describe
(
'
when clicking the toggle editing mode button
'
,
()
=>
{
const
contentEditorFakeSerializedContent
=
'
fake content
'
;
beforeEach
(
async
()
=>
{
beforeEach
(()
=>
{
mockContentEditor
.
getSerializedContent
.
mockReturnValueOnce
(
contentEditorFakeSerializedContent
,
);
findContentEditor
().
vm
.
$emit
(
'
initialized
'
,
mockContentEditor
);
findToggleEditingModeButton
().
vm
.
$emit
(
'
click
'
);
await
nextTick
();
});
it
(
'
hides the content editor
'
,
()
=>
{
...
...
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