From 623faaf429bee78335b4db28085bb9ccbce7fcaa Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 10 Aug 2021 15:56:24 +0200 Subject: [PATCH] Fix tests for html parser --- .../dom_components/model/ComponentTypes.js | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/test/specs/dom_components/model/ComponentTypes.js b/test/specs/dom_components/model/ComponentTypes.js index 1f6b9b0d5..5f433322a 100644 --- a/test/specs/dom_components/model/ComponentTypes.js +++ b/test/specs/dom_components/model/ComponentTypes.js @@ -8,7 +8,8 @@ describe('Component Types', () => { const cmp = wrapper.append(input)[0]; expect(wrapper.components().length).toBe(opts.total || 1); !opts.skipHtml && expect(cmp.toHTML()).toBe(input); - expect(cmp.is(type)).toBe(true); + const res = opts.getType ? wrapper.findType(type)[0] : cmp; + expect(res.is(type)).toBe(true); }; beforeAll(() => { @@ -45,15 +46,17 @@ describe('Component Types', () => { }); test(' is correctly recognized', () => { - expectedType('', 'thead', { skipHtml: 1 }); + expectedType('
', 'thead', { getType: 1 }); }); test(' is correctly recognized', () => { - expectedType('', 'tbody', { skipHtml: 1 }); + expectedType('
', 'tbody', { getType: 1 }); }); test(' is correctly recognized', () => { - expectedType('', 'row'); + expectedType('
', 'row', { + getType: 1 + }); }); test('