Skip to content

Commit

Permalink
Add manual test for disabled caption.
Browse files Browse the repository at this point in the history
  • Loading branch information
Comandeer committed Jan 29, 2018
1 parent 2fb919d commit d161e8a
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/plugins/imagebase/features/manual/captiondisabled.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<h1>Classic editor</h1>

<div id="classic">
<p>Widget:</p>
<figure>
<img src="../../../image2/_assets/foo.png" alt="foo">
</figure>
</div>

<h1>Divarea</h1>

<div id="divarea">
<p>Widget:</p>
<figure>
<img src="../../../image2/_assets/foo.png" alt="foo">
</figure>
</div>

<script>
var cfg = {
disallowedContent: 'figcaption',
on: {
pluginsLoaded: function( evt ) {
var editor = evt.editor,
imageBase = CKEDITOR.plugins.imagebase;

imageBase.addImageWidget( editor, 'testWidget', imageBase.addFeature( editor, 'caption', {} ) );
}
},
height: 270
};

CKEDITOR.replace( 'classic', cfg );
CKEDITOR.replace( 'divarea', CKEDITOR.tools.object.merge( cfg, { extraPlugins: 'divarea' } ) );
</script>
19 changes: 19 additions & 0 deletions tests/plugins/imagebase/features/manual/captiondisabled.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@bender-tags: 4.9.0, feature, 932
@bender-ui: collapsed
@bender-ckeditor-plugins: sourcearea, wysiwygarea, toolbar, imagebase, link, htmlwriter, elementspath, basicstyles

# Customizing caption existence with ACF

1. Focus widget.

## Expected

There is no caption.

## Unexpected

Caption shows after focus.

---

Repeat for all editors.

0 comments on commit d161e8a

Please sign in to comment.