Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Nov 20, 2024
1 parent f05a2e7 commit 1b2c8ed
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/runtime/bootstrap-custom-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const proxyCustomElement = (Cstr: any, compactMeta: d.ComponentRuntimeMet

const originalConnectedCallback = Cstr.prototype.connectedCallback;
const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
let hasHostListenerAttached = false
let hasHostListenerAttached = false;
Object.assign(Cstr.prototype, {
__registerHost() {
registerHost(this, cmpMeta);
Expand Down
6 changes: 2 additions & 4 deletions test/wdio/event-listener-capture/event-re-register.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ describe('event-listener-capture using lazy load components', function () {
await browser.action('key').down('a').pause(100).up('a').perform();

// check if event fired 3 times
await expect(reattach).toHaveText(
expect.stringContaining('Event fired times: 3'));
await expect(reattach).toHaveText(expect.stringContaining('Event fired times: 3'));

// remove node from DOM
elem.remove();
Expand All @@ -43,7 +42,6 @@ describe('event-listener-capture using lazy load components', function () {
await browser.action('key').down('a').pause(100).up('a').perform();

// check if event fired 6 times
await expect(reattach).toHaveText(
expect.stringContaining('Event fired times: 6'));
await expect(reattach).toHaveText(expect.stringContaining('Event fired times: 6'));
});
});
22 changes: 12 additions & 10 deletions test/wdio/event-listener-capture/event-re-register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ export class EventReRegister implements ComponentInterface {
console.log('disconnected');
}
render() {
return <Host tabindex="1">
<ul id="reattach">
<li>Focus this component;</li>
<li>Press key;</li>
<li>See console output</li>
<li>Press 'Reconnect' button</li>
<li>Repeat steps 1-3</li>
</ul>
<p>Event fired times: {this.eventFiredTimes}</p>
</Host>;
return (
<Host tabindex="1">
<ul id="reattach">
<li>Focus this component;</li>
<li>Press key;</li>
<li>See console output</li>
<li>Press 'Reconnect' button</li>
<li>Repeat steps 1-3</li>
</ul>
<p>Event fired times: {this.eventFiredTimes}</p>
</Host>
);
}
}

0 comments on commit 1b2c8ed

Please sign in to comment.