Opened 8 years ago

Closed 8 years ago

#16590 closed Bug (fixed)

Failing tests in plugins/widget

Reported by: Tomasz Jakut Owned by: Marek Lewandowski
Priority: Normal Milestone: CKEditor 4.6.0
Component: General Version: 4.5.10
Keywords: Cc:

Description

Two tests are failing:

tests/plugins/widget/widgetsintegration test pasting upcasted widgets

HTML after loading element to be upcasted
Expected: /^<p><span aria-label="[a-z]+ widget" class="cke_widget_wrapper cke_widget_(?:inline|block) cke_widget_test(?:_upcasted_pasting|inline|block)" contenteditable="false" (?:data-cke-display-name="[a-z0-9]+" )?(?:data-cke-expando="[0-9]+" )?data-cke-filter="off" data-cke-widget-id="[0-9]+" data-cke-widget-wrapper="1" role="region" tabindex="-1"><span class="cke_widget_element" data-cke-widget-data="%7B%22classes%22%3Anull%7D" data-cke-widget-keep-attr="0" data-cke-widget-upcasted="1" data-widget="test_upcasted_pasting"><i class="upcasted_pasting">foo<\/i><\/span><span class="cke_reset cke_widget_drag_handler_container" style="[^"]+"><img class="cke_reset cke_widget_drag_handler" (?:data-cke-expando="[0-9]+" )?data-cke-widget-drag-handler="1" (?:draggable="true" )?height="\d+" role="presentation" src="[^"]+" title="[^"]+" width="\d+" \/><\/span><\/span>X?(<br \/>)?<\/p>(<div [^>]+>&nbsp;<\/div>)?$/ (string)
Actual:   <p><span aria-label="Widget span" class="cke_widget_wrapper cke_widget_inline cke_widget_test_upcasted_pasting" contenteditable="false" data-cke-display-name="span" data-cke-filter="off" data-cke-widget-id="0" data-cke-widget-wrapper="1" role="region" tabindex="-1"><span class="cke_widget_element" data-cke-widget-data="%7B%22classes%22%3Anull%7D" data-cke-widget-keep-attr="0" data-cke-widget-upcasted="1" data-widget="test_upcasted_pasting"><i class="upcasted_pasting">foo</i></span><span class="cke_reset cke_widget_drag_handler_container" style="background-image:url(http://localhost:1030/apps/ckeditor/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5)"><img class="cke_reset cke_widget_drag_handler" data-cke-widget-drag-handler="1" draggable="true" height="15" role="presentation" src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" title="Kliknij i przeciągnij, by przenieść." width="15" /></span></span><br /></p> (string)
tests/plugins/widget/widgetsrepoapi test widgets.destroy

data after destroying 1st widget
Expected: <p>foo<span aria-label="[a-z]+ widget" class="cke_widget_wrapper cke_widget_(?:inline|block) cke_widget_test(?:_upcasted_pasting|inline|block)" contenteditable="false" (?:data-cke-display-name="[a-z0-9]+" )?(?:data-cke-expando="[0-9]+" )?data-cke-filter="off" data-cke-widget-id="[0-9]+" data-cke-widget-wrapper="1" role="region" tabindex="-1"><em class="cke_widget_element" data-cke-widget-data="%7B%22classes%22%3Anull%7D" data-cke-widget-keep-attr="1" data-widget="testinline" id="widget1">bar1</em><span class="cke_reset cke_widget_drag_handler_container" style="[^"]+"><img class="cke_reset cke_widget_drag_handler" (?:data-cke-expando="[0-9]+" )?data-cke-widget-drag-handler="1" (?:draggable="true" )?height="\d+" role="presentation" src="[^"]+" title="[^"]+" width="\d+" /></span></span>boo(<br />)?</p><div aria-label="[a-z]+ widget" class="cke_widget_wrapper cke_widget_(?:inline|block) cke_widget_test(?:_upcasted_pasting|inline|block)" contenteditable="false" (?:data-cke-display-name="[a-z0-9]+" )?(?:data-cke-expando="[0-9]+" )?data-cke-filter="off" data-cke-widget-id="[0-9]+" data-cke-widget-wrapper="1" role="region" tabindex="-1"><div class="cke_widget_element" data-cke-widget-data="%7B%22classes%22%3Anull%7D" data-cke-widget-keep-attr="1" data-widget="testblock" id="widget2">bam</div><span class="cke_reset cke_widget_drag_handler_container" style="[^"]+"><img class="cke_reset cke_widget_drag_handler" (?:data-cke-expando="[0-9]+" )?data-cke-widget-drag-handler="1" (?:draggable="true" )?height="\d+" role="presentation" src="[^"]+" title="[^"]+" width="\d+" /></span></div> (string)
Actual:   <p>foo<span aria-label="Widget em" class="cke_widget_wrapper cke_widget_inline cke_widget_testinline" contenteditable="false" data-cke-display-name="em" data-cke-filter="off" data-cke-widget-id="1" data-cke-widget-wrapper="1" role="region" tabindex="-1"><em class="cke_widget_element" data-cke-widget-data="%7B%22classes%22%3Anull%7D" data-cke-widget-keep-attr="1" data-widget="testinline" id="widget1">bar1</em><span class="cke_reset cke_widget_drag_handler_container" style="background-image:url(http://localhost:1030/apps/ckeditor/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5)"><img class="cke_reset cke_widget_drag_handler" data-cke-widget-drag-handler="1" draggable="true" height="15" role="presentation" src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" title="Kliknij i przeciągnij, by przenieść." width="15" /></span></span>boo</p><div aria-label="Widget div" class="cke_widget_wrapper cke_widget_block cke_widget_testblock" contenteditable="false" data-cke-display-name="div" data-cke-filter="off" data-cke-widget-id="0" data-cke-widget-wrapper="1" role="region" tabindex="-1"><div class="cke_widget_element" data-cke-widget-data="%7B%22classes%22%3Anull%7D" data-cke-widget-keep-attr="1" data-widget="testblock" id="widget2">bam</div><span class="cke_reset cke_widget_drag_handler_container" style="background-image:url(http://localhost:1030/apps/ckeditor/plugins/widget/images/handle.png); background:rgba(220,220,220,0.5)"><img class="cke_reset cke_widget_drag_handler" data-cke-widget-drag-handler="1" height="15" role="presentation" src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" title="Kliknij i przeciągnij, by przenieść." width="15" /></span></div> (string)

These tests are failing only if the default language of a browser is not English (e.g. Polish). In that case, the regular expression for [aria-label] is failing (it expects "<name> widget", but in Polish the phrase is "Widget <name>").

Change History (4)

comment:1 Changed 8 years ago by Tomasz Jakut

Status: newconfirmed

comment:2 Changed 8 years ago by Tomasz Jakut

Milestone: CKEditor 4.6.0CKEditor 4.6.1

comment:3 Changed 8 years ago by Marek Lewandowski

Milestone: CKEditor 4.6.1CKEditor 4.6.0
Owner: set to Marek Lewandowski
Status: confirmedreview

comment:4 Changed 8 years ago by Tomasz Jakut

Resolution: fixed
Status: reviewclosed

LGTM.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy