Skip to content

Commit

Permalink
chore(test): migrate event-listen-capturer (#5494)
Browse files Browse the repository at this point in the history
* chore(test): migrate event-listen-capturer

* rename test file

* migrate test
  • Loading branch information
christian-bromann authored Mar 18, 2024
1 parent 5c5120e commit 52fd257
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 50 deletions.
13 changes: 0 additions & 13 deletions test/karma/test-app/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ export namespace Components {
}
interface EventCustomType {
}
interface EventListenerCapture {
}
interface ExternalImportA {
}
interface ExternalImportB {
Expand Down Expand Up @@ -419,12 +417,6 @@ declare global {
prototype: HTMLEventCustomTypeElement;
new (): HTMLEventCustomTypeElement;
};
interface HTMLEventListenerCaptureElement extends Components.EventListenerCapture, HTMLStencilElement {
}
var HTMLEventListenerCaptureElement: {
prototype: HTMLEventListenerCaptureElement;
new (): HTMLEventListenerCaptureElement;
};
interface HTMLExternalImportAElement extends Components.ExternalImportA, HTMLStencilElement {
}
var HTMLExternalImportAElement: {
Expand Down Expand Up @@ -1036,7 +1028,6 @@ declare global {
"es5-addclass-svg": HTMLEs5AddclassSvgElement;
"esm-import": HTMLEsmImportElement;
"event-custom-type": HTMLEventCustomTypeElement;
"event-listener-capture": HTMLEventListenerCaptureElement;
"external-import-a": HTMLExternalImportAElement;
"external-import-b": HTMLExternalImportBElement;
"external-import-c": HTMLExternalImportCElement;
Expand Down Expand Up @@ -1176,8 +1167,6 @@ declare namespace LocalJSX {
interface EventCustomType {
"onTestEvent"?: (event: EventCustomTypeCustomEvent<TestEventDetail>) => void;
}
interface EventListenerCapture {
}
interface ExternalImportA {
}
interface ExternalImportB {
Expand Down Expand Up @@ -1429,7 +1418,6 @@ declare namespace LocalJSX {
"es5-addclass-svg": Es5AddclassSvg;
"esm-import": EsmImport;
"event-custom-type": EventCustomType;
"event-listener-capture": EventListenerCapture;
"external-import-a": ExternalImportA;
"external-import-b": ExternalImportB;
"external-import-c": ExternalImportC;
Expand Down Expand Up @@ -1550,7 +1538,6 @@ declare module "@stencil/core" {
"es5-addclass-svg": LocalJSX.Es5AddclassSvg & JSXBase.HTMLAttributes<HTMLEs5AddclassSvgElement>;
"esm-import": LocalJSX.EsmImport & JSXBase.HTMLAttributes<HTMLEsmImportElement>;
"event-custom-type": LocalJSX.EventCustomType & JSXBase.HTMLAttributes<HTMLEventCustomTypeElement>;
"event-listener-capture": LocalJSX.EventListenerCapture & JSXBase.HTMLAttributes<HTMLEventListenerCaptureElement>;
"external-import-a": LocalJSX.ExternalImportA & JSXBase.HTMLAttributes<HTMLExternalImportAElement>;
"external-import-b": LocalJSX.ExternalImportB & JSXBase.HTMLAttributes<HTMLExternalImportBElement>;
"external-import-c": LocalJSX.ExternalImportC & JSXBase.HTMLAttributes<HTMLExternalImportCElement>;
Expand Down
6 changes: 0 additions & 6 deletions test/karma/test-app/event-listener-capture/index.html

This file was deleted.

31 changes: 0 additions & 31 deletions test/karma/test-app/event-listener-capture/karma.spec.ts

This file was deleted.

26 changes: 26 additions & 0 deletions test/wdio/event-listener-capture/cmp.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { h } from '@stencil/core';
import { render } from '@wdio/browser-runner/stencil';

describe('event-listener-capture', function () {
const eventListenerCaptureCmp = () => $('event-listener-capture');

beforeEach(() => {
render({
template: () => <event-listener-capture></event-listener-capture>,
});
});

it('should render', async () => {
await expect(eventListenerCaptureCmp()).toBePresent();
});

it('should increment counter on click', async () => {
const counter = $('#counter');
await expect(counter).toHaveText('0');

const p = eventListenerCaptureCmp().$('#incrementer');
await expect(p).toBePresent();
await p.click();
await expect(counter).toHaveText('1');
});
});
File renamed without changes.

0 comments on commit 52fd257

Please sign in to comment.