diff --git a/test/karma/test-app/components.d.ts b/test/karma/test-app/components.d.ts index d948f8071c9..523977592a2 100644 --- a/test/karma/test-app/components.d.ts +++ b/test/karma/test-app/components.d.ts @@ -104,10 +104,6 @@ export namespace Components { interface LifecycleUpdateC { "value": number; } - interface ListenJsx { - } - interface ListenJsxRoot { - } interface ListenReattach { } interface NodeResolution { @@ -633,18 +629,6 @@ declare global { prototype: HTMLLifecycleUpdateCElement; new (): HTMLLifecycleUpdateCElement; }; - interface HTMLListenJsxElement extends Components.ListenJsx, HTMLStencilElement { - } - var HTMLListenJsxElement: { - prototype: HTMLListenJsxElement; - new (): HTMLListenJsxElement; - }; - interface HTMLListenJsxRootElement extends Components.ListenJsxRoot, HTMLStencilElement { - } - var HTMLListenJsxRootElement: { - prototype: HTMLListenJsxRootElement; - new (): HTMLListenJsxRootElement; - }; interface HTMLListenReattachElement extends Components.ListenReattach, HTMLStencilElement { } var HTMLListenReattachElement: { @@ -1168,8 +1152,6 @@ declare global { "lifecycle-update-a": HTMLLifecycleUpdateAElement; "lifecycle-update-b": HTMLLifecycleUpdateBElement; "lifecycle-update-c": HTMLLifecycleUpdateCElement; - "listen-jsx": HTMLListenJsxElement; - "listen-jsx-root": HTMLListenJsxRootElement; "listen-reattach": HTMLListenReattachElement; "node-resolution": HTMLNodeResolutionElement; "parent-reflect-nan-attribute": HTMLParentReflectNanAttributeElement; @@ -1353,10 +1335,6 @@ declare namespace LocalJSX { interface LifecycleUpdateC { "value"?: number; } - interface ListenJsx { - } - interface ListenJsxRoot { - } interface ListenReattach { } interface NodeResolution { @@ -1594,8 +1572,6 @@ declare namespace LocalJSX { "lifecycle-update-a": LifecycleUpdateA; "lifecycle-update-b": LifecycleUpdateB; "lifecycle-update-c": LifecycleUpdateC; - "listen-jsx": ListenJsx; - "listen-jsx-root": ListenJsxRoot; "listen-reattach": ListenReattach; "node-resolution": NodeResolution; "parent-reflect-nan-attribute": ParentReflectNanAttribute; @@ -1724,8 +1700,6 @@ declare module "@stencil/core" { "lifecycle-update-a": LocalJSX.LifecycleUpdateA & JSXBase.HTMLAttributes; "lifecycle-update-b": LocalJSX.LifecycleUpdateB & JSXBase.HTMLAttributes; "lifecycle-update-c": LocalJSX.LifecycleUpdateC & JSXBase.HTMLAttributes; - "listen-jsx": LocalJSX.ListenJsx & JSXBase.HTMLAttributes; - "listen-jsx-root": LocalJSX.ListenJsxRoot & JSXBase.HTMLAttributes; "listen-reattach": LocalJSX.ListenReattach & JSXBase.HTMLAttributes; "node-resolution": LocalJSX.NodeResolution & JSXBase.HTMLAttributes; "parent-reflect-nan-attribute": LocalJSX.ParentReflectNanAttribute & JSXBase.HTMLAttributes; diff --git a/test/karma/test-app/listen-jsx/index.html b/test/karma/test-app/listen-jsx/index.html deleted file mode 100644 index d173989437a..00000000000 --- a/test/karma/test-app/listen-jsx/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/test/karma/test-app/listen-jsx/karma.spec.ts b/test/karma/test-app/listen-jsx/karma.spec.ts deleted file mode 100644 index a49a36b4448..00000000000 --- a/test/karma/test-app/listen-jsx/karma.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { setupDomTests, waitForChanges } from '../util'; - -describe('listen-jsx', function () { - const { setupDom, tearDownDom } = setupDomTests(document); - let app: HTMLElement; - - beforeEach(async () => { - app = await setupDom('/listen-jsx/index.html'); - }); - afterEach(tearDownDom); - - it('button click trigger both listeners', async () => { - (app.querySelector('listen-jsx') as HTMLElement).click(); - - await waitForChanges(); - - expect(app.querySelector('#result').textContent).toBe('Host event'); - expect(app.querySelector('#result-root').textContent).toBe('Parent event'); - }); -}); diff --git a/test/wdio/listen-jsx/cmp-root.test.tsx b/test/wdio/listen-jsx/cmp-root.test.tsx new file mode 100644 index 00000000000..cf2defd9669 --- /dev/null +++ b/test/wdio/listen-jsx/cmp-root.test.tsx @@ -0,0 +1,16 @@ +import { h } from '@stencil/core'; +import { render } from '@wdio/browser-runner/stencil'; + +describe('listen-jsx', function () { + beforeEach(() => { + render({ + template: () => , + }); + }); + + it('button click trigger both listeners', async () => { + await $('listen-jsx').click(); + await expect($('#result')).toHaveText('Host event'); + await expect($('#result-root')).toHaveText('Parent event'); + }); +}); diff --git a/test/karma/test-app/listen-jsx/cmp-root.tsx b/test/wdio/listen-jsx/cmp-root.tsx similarity index 100% rename from test/karma/test-app/listen-jsx/cmp-root.tsx rename to test/wdio/listen-jsx/cmp-root.tsx diff --git a/test/karma/test-app/listen-jsx/cmp.tsx b/test/wdio/listen-jsx/cmp.tsx similarity index 100% rename from test/karma/test-app/listen-jsx/cmp.tsx rename to test/wdio/listen-jsx/cmp.tsx