@ -1,11 +1,14 @@
import Component from './Component';
import { toLowerCase } from 'utils/mixins';
const type = 'tbody';
export default Component.extend(
{
defaults: {
...Component.prototype.defaults,
type: 'tbody',
tagName: 'tbody',
type,
tagName: type,
draggable: ['table'],
droppable: ['tr'],
columns: 1,
@ -45,14 +48,6 @@ export default Component.extend(
}
},
isComponent(el) {
let result = '';
if (el.tagName == 'TBODY') {
result = { type: 'tbody' };
return result;
isComponent: el => toLowerCase(el.tagName) === type
);
@ -44,6 +44,10 @@ describe('Component Types', () => {
expectedType('<table></table>', 'table', { skipHtml: 1 });
});
test('<tbody> is correctly recognized', () => {
expectedType('<tbody></tbody>', 'tbody', { skipHtml: 1 });
test('<script> is correctly recognized', () => {
// const scr = 'console.log("Inline script");'; // issues with jsdom parser
const scr = ``;