Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/web-platform/web-tests/tests/react.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Copyright 2024 The Lynx Authors. All rights reserved.
// Licensed under the Apache License Version 2.0 that can be found in the
// LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -377,6 +377,21 @@
},
);

test('basic-mts-tail-call', async ({ page }, { title }) => {
let eventHandlerTriggered = false;
page.on('console', (message) => {
if (message.text() === 'hello world') {
eventHandlerTriggered = true;
}
});
await goto(page, title);
await wait(100);
const target = page.locator('#target');
await target.click();

Check failure on line 390 in packages/web-platform/web-tests/tests/react.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (MULTI_THREAD) / check

[webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call

1) [webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call ───────── Retry #4 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#target') 388 | await wait(100); 389 | const target = page.locator('#target'); > 390 | await target.click(); | ^ 391 | await wait(100); 392 | expect(eventHandlerTriggered).toBe(true); 393 | }); at /__w/lynx-stack/lynx-stack/packages/web-platform/web-tests/tests/react.spec.ts:390:20

Check failure on line 390 in packages/web-platform/web-tests/tests/react.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (MULTI_THREAD) / check

[webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call

1) [webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call ───────── Retry #3 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#target') 388 | await wait(100); 389 | const target = page.locator('#target'); > 390 | await target.click(); | ^ 391 | await wait(100); 392 | expect(eventHandlerTriggered).toBe(true); 393 | }); at /__w/lynx-stack/lynx-stack/packages/web-platform/web-tests/tests/react.spec.ts:390:20

Check failure on line 390 in packages/web-platform/web-tests/tests/react.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (MULTI_THREAD) / check

[webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call

1) [webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call ───────── Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#target') 388 | await wait(100); 389 | const target = page.locator('#target'); > 390 | await target.click(); | ^ 391 | await wait(100); 392 | expect(eventHandlerTriggered).toBe(true); 393 | }); at /__w/lynx-stack/lynx-stack/packages/web-platform/web-tests/tests/react.spec.ts:390:20

Check failure on line 390 in packages/web-platform/web-tests/tests/react.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (MULTI_THREAD) / check

[webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call

1) [webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call ───────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#target') 388 | await wait(100); 389 | const target = page.locator('#target'); > 390 | await target.click(); | ^ 391 | await wait(100); 392 | expect(eventHandlerTriggered).toBe(true); 393 | }); at /__w/lynx-stack/lynx-stack/packages/web-platform/web-tests/tests/react.spec.ts:390:20

Check failure on line 390 in packages/web-platform/web-tests/tests/react.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (MULTI_THREAD) / check

[webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call

1) [webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call ───────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#target') 388 | await wait(100); 389 | const target = page.locator('#target'); > 390 | await target.click(); | ^ 391 | await wait(100); 392 | expect(eventHandlerTriggered).toBe(true); 393 | }); at /__w/lynx-stack/lynx-stack/packages/web-platform/web-tests/tests/react.spec.ts:390:20

Check failure on line 390 in packages/web-platform/web-tests/tests/react.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (Default) / check

[webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call

1) [webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call ───────── Retry #4 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#target') 388 | await wait(100); 389 | const target = page.locator('#target'); > 390 | await target.click(); | ^ 391 | await wait(100); 392 | expect(eventHandlerTriggered).toBe(true); 393 | }); at /__w/lynx-stack/lynx-stack/packages/web-platform/web-tests/tests/react.spec.ts:390:20

Check failure on line 390 in packages/web-platform/web-tests/tests/react.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (Default) / check

[webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call

1) [webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call ───────── Retry #3 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#target') 388 | await wait(100); 389 | const target = page.locator('#target'); > 390 | await target.click(); | ^ 391 | await wait(100); 392 | expect(eventHandlerTriggered).toBe(true); 393 | }); at /__w/lynx-stack/lynx-stack/packages/web-platform/web-tests/tests/react.spec.ts:390:20

Check failure on line 390 in packages/web-platform/web-tests/tests/react.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (Default) / check

[webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call

1) [webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call ───────── Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#target') 388 | await wait(100); 389 | const target = page.locator('#target'); > 390 | await target.click(); | ^ 391 | await wait(100); 392 | expect(eventHandlerTriggered).toBe(true); 393 | }); at /__w/lynx-stack/lynx-stack/packages/web-platform/web-tests/tests/react.spec.ts:390:20

Check failure on line 390 in packages/web-platform/web-tests/tests/react.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (Default) / check

[webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call

1) [webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call ───────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#target') 388 | await wait(100); 389 | const target = page.locator('#target'); > 390 | await target.click(); | ^ 391 | await wait(100); 392 | expect(eventHandlerTriggered).toBe(true); 393 | }); at /__w/lynx-stack/lynx-stack/packages/web-platform/web-tests/tests/react.spec.ts:390:20

Check failure on line 390 in packages/web-platform/web-tests/tests/react.spec.ts

View workflow job for this annotation

GitHub Actions / Playwright (Default) / check

[webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call

1) [webkit] › tests/react.spec.ts:380:5 › reactlynx3 tests › basic › basic-mts-tail-call ───────── Error: locator.click: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#target') 388 | await wait(100); 389 | const target = page.locator('#target'); > 390 | await target.click(); | ^ 391 | await wait(100); 392 | expect(eventHandlerTriggered).toBe(true); 393 | }); at /__w/lynx-stack/lynx-stack/packages/web-platform/web-tests/tests/react.spec.ts:390:20
await wait(100);
expect(eventHandlerTriggered).toBe(true);
});

test(
'basic-mts-bindtap-change-element-background',
async ({ page }, { title }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2023 The Lynx Authors. All rights reserved.
// Licensed under the Apache License Version 2.0 that can be found in the
// LICENSE file in the root directory of this source tree.
import { useState, root } from '@lynx-js/react';
function App() {
const [color] = useState('pink');
const mtsFoo = (count) => {
'main thread';
if (count > 0) {
console.log('hello world');
} else {
mtsFoo(count + 1);
}
};
return (
<view
id='target'
main-thread:bindTap={mtsFoo}
style={{
height: '100px',
width: '100px',
background: color,
}}
/>
);
}
root.render(<App />);
Loading