Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #193 from ckeditor/t/ckeditor5/578
Browse files Browse the repository at this point in the history
Tests: Updated image tests to the latest nested editable CSS class naming convention (see ckeditor/ckeditor5#578).
  • Loading branch information
szymonkups committed Mar 30, 2018
2 parents ece891a + dcf628a commit 9f2dd28
Showing 1 changed file with 27 additions and 24 deletions.
51 changes: 27 additions & 24 deletions tests/imagecaption/imagecaptionediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ describe( 'ImageCaptionEditing', () => {
expect( getViewData( view, { withoutSelection: true } ) ).to.equal(
'<figure class="ck ck-widget image" contenteditable="false">' +
'<img src="img.png"></img>' +
'<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'Foo bar baz.' +
'</figcaption>' +
'</figure>'
Expand All @@ -127,7 +128,7 @@ describe( 'ImageCaptionEditing', () => {
'<p>foo</p>' +
'<figure class="ck ck-widget image" contenteditable="false">' +
'<img src="img.png"></img>' +
'<figcaption class="ck ck-editable ck-hidden ck-placeholder" ' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'</figcaption>' +
'</figure>'
Expand Down Expand Up @@ -176,7 +177,8 @@ describe( 'ImageCaptionEditing', () => {
'<p>{}foo</p>' +
'<figure class="ck ck-widget image" contenteditable="false">' +
'<img src="img.png"></img>' +
'<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'foo bar' +
'</figcaption>' +
'</figure>'
Expand All @@ -197,7 +199,7 @@ describe( 'ImageCaptionEditing', () => {
'<p>{}foo</p>' +
'<figure class="ck ck-widget image" contenteditable="false">' +
'<img src="img.png"></img>' +
'<figcaption class="ck ck-editable ck-hidden ck-placeholder" ' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'</figcaption>' +
'</figure>'
Expand All @@ -218,9 +220,8 @@ describe( 'ImageCaptionEditing', () => {
'<p>{}foo</p>' +
'<figure class="ck ck-widget image" contenteditable="false">' +
'<img src="img.png"></img>' +
'<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
'baz' +
'</figcaption>' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
'contenteditable="true" data-placeholder="Enter image caption">baz</figcaption>' +
'</figure>'
);
} );
Expand All @@ -240,7 +241,7 @@ describe( 'ImageCaptionEditing', () => {
expect( getViewData( view ) ).to.equal(
'[<figure class="ck ck-widget image" contenteditable="false">' +
'<img alt="" src=""></img>' +
'<figcaption class="ck ck-editable ck-placeholder" ' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'</figcaption>' +
'</figure>]' +
Expand All @@ -263,7 +264,8 @@ describe( 'ImageCaptionEditing', () => {
expect( getViewData( view ) ).to.equal(
'[<figure class="ck ck-widget image" contenteditable="false">' +
'<img alt="" src=""></img>' +
'<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'foo bar' +
'</figcaption>' +
'</figure>]' +
Expand Down Expand Up @@ -291,7 +293,7 @@ describe( 'ImageCaptionEditing', () => {
expect( getViewData( view ) ).to.equal(
'[<figure class="ck ck-widget image" contenteditable="false">' +
'<img alt="" src=""></img>' +
'<figcaption class="ck ck-editable ck-placeholder" ' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
'</figure>]' +
'<p></p>'
Expand Down Expand Up @@ -321,7 +323,8 @@ describe( 'ImageCaptionEditing', () => {
'<p>foo</p>' +
'[<figure class="ck ck-widget image" contenteditable="false">' +
'<img src=""></img>' +
'<figcaption class="ck ck-editable ck-placeholder" contenteditable="true" data-placeholder="Enter image caption">' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'</figcaption>' +
'</figure>]'
);
Expand All @@ -334,7 +337,7 @@ describe( 'ImageCaptionEditing', () => {
'<p>{}foo</p>' +
'<figure class="ck ck-widget image" contenteditable="false">' +
'<img src=""></img>' +
'<figcaption class="ck ck-editable ck-hidden ck-placeholder" ' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'</figcaption>' +
'</figure>'
Expand All @@ -348,9 +351,8 @@ describe( 'ImageCaptionEditing', () => {
'<p>foo</p>' +
'[<figure class="ck ck-widget image" contenteditable="false">' +
'<img src=""></img>' +
'<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
'foo bar' +
'</figcaption>' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
'contenteditable="true" data-placeholder="Enter image caption">foo bar</figcaption>' +
'</figure>]'
);
} );
Expand All @@ -366,7 +368,7 @@ describe( 'ImageCaptionEditing', () => {
'<p>{}foo</p>' +
'<figure class="ck ck-widget image" contenteditable="false">' +
'<img src=""></img>' +
'<figcaption class="ck ck-editable ck-hidden ck-placeholder" ' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'</figcaption>' +
'</figure>'
Expand All @@ -383,7 +385,8 @@ describe( 'ImageCaptionEditing', () => {
expect( getViewData( view ) ).to.equal(
'<figure class="ck ck-widget image" contenteditable="false">' +
'<img src=""></img>' +
'<figcaption class="ck ck-editable ck-placeholder" contenteditable="true" data-placeholder="Enter image caption">' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'[]' +
'</figcaption>' +
'</figure>'
Expand All @@ -402,7 +405,7 @@ describe( 'ImageCaptionEditing', () => {
expect( getViewData( view ) ).to.equal(
'[<figure class="ck ck-widget image" contenteditable="false">' +
'<img src=""></img>' +
'<figcaption class="ck ck-editable ck-placeholder" ' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
'</figure>]'
);
Expand All @@ -419,13 +422,12 @@ describe( 'ImageCaptionEditing', () => {
expect( getViewData( view ) ).to.equal(
'<figure class="ck ck-widget image" contenteditable="false">' +
'<img src=""></img>' +
'<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
'foo bar' +
'</figcaption>' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
'contenteditable="true" data-placeholder="Enter image caption">foo bar</figcaption>' +
'</figure>' +
'[<figure class="ck ck-widget image" contenteditable="false">' +
'<img src=""></img>' +
'<figcaption class="ck ck-editable ck-placeholder" ' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-placeholder" ' +
'contenteditable="true" data-placeholder="Enter image caption"></figcaption>' +
'</figure>]'
);
Expand All @@ -450,7 +452,7 @@ describe( 'ImageCaptionEditing', () => {
'<p>{}foo</p>' +
'<figure class="ck ck-widget image" contenteditable="false">' +
'<img src=""></img>' +
'<figcaption class="ck ck-editable ck-hidden ck-placeholder" ' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable ck-hidden ck-placeholder" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'</figcaption>' +
'</figure>'
Expand All @@ -463,7 +465,8 @@ describe( 'ImageCaptionEditing', () => {
'<p>foo</p>' +
'<figure class="ck ck-widget image" contenteditable="false">' +
'<img src=""></img>' +
'<figcaption class="ck ck-editable" contenteditable="true" data-placeholder="Enter image caption">' +
'<figcaption class="ck ck-editor__editable ck-editor__nested-editable" ' +
'contenteditable="true" data-placeholder="Enter image caption">' +
'{foo bar baz}' +
'</figcaption>' +
'</figure>'
Expand Down

0 comments on commit 9f2dd28

Please sign in to comment.