|
|
@@ -297,13 +297,19 @@ export function assertTRBLAttribute( element, key, top, right = top, bottom = to
|
|
|
* An assertion helper for testing the `<table>` style attribute.
|
|
|
*
|
|
|
* @param {module:core/editor/editor~Editor} editor
|
|
|
- * @param {String} tableStyle A style to assert on table.
|
|
|
+ * @param {String} [tableStyle=''] A style to assert on <table>.
|
|
|
+ * @param {String} [figureStyle=''] A style to assert on <figure>.
|
|
|
*/
|
|
|
-export function assertTableStyle( editor, tableStyle ) {
|
|
|
- const styleEntry = tableStyle ? ` style="${ tableStyle }"` : '';
|
|
|
+export function assertTableStyle( editor, tableStyle, figureStyle ) {
|
|
|
+ const tableStyleEntry = tableStyle ? ` style="${ tableStyle }"` : '';
|
|
|
+ const figureStyleEntry = figureStyle ? ` style="${ figureStyle }"` : '';
|
|
|
|
|
|
assertEqualMarkup( editor.getData(),
|
|
|
- `<figure class="table"><table${ styleEntry }><tbody><tr><td>foo</td></tr></tbody></table></figure>`
|
|
|
+ `<figure class="table"${ figureStyleEntry }>` +
|
|
|
+ `<table${ tableStyleEntry }>` +
|
|
|
+ '<tbody><tr><td>foo</td></tr></tbody>' +
|
|
|
+ '</table>' +
|
|
|
+ '</figure>'
|
|
|
);
|
|
|
}
|
|
|
|