Skip to content

Commit

Permalink
fix: fix integration test.
Browse files Browse the repository at this point in the history
  • Loading branch information
andycall committed Nov 23, 2024
1 parent 0bf6768 commit 97c34d9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion integration_tests/spec_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@
{
"name": "DOM",
"specs": [
"specs/dom/**/*.{js,jsx,ts,tsx,html}"
"specs/dom/events/**/*.ts",
"specs/dom/geometry/**/*.{js,jsx,ts,tsx,html}",
"specs/dom/global_attributes/**/*.{js,jsx,ts,tsx,html}",
"specs/dom/lists/**/*.{js,jsx,ts,tsx,html}",
"specs/dom/nodes/**/*.{js,jsx,ts,tsx,html}",
"specs/dom/elements/**/*.{js,jsx,ts,tsx,html}",
"specs/dom/*.{js,jsx,ts,tsx,html}"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/specs/dom/elements/custom-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ describe('custom widget element', () => {
it('work with click event', async (done) => {
const image = document.createElement('flutter-asset-image');
image.setAttribute('src', 'assets/rabbit.png');
document.body.appendChild(image);

image.addEventListener('click', function (e) {
done();
});

await sleep(0.2);
await sleep(1);

simulateClick(20, 20);
document.body.appendChild(image);
await simulateClick(10, 10);
});

it('text node should be child of flutter container', async () => {
Expand Down
1 change: 1 addition & 0 deletions integration_tests/specs/dom/events/touchEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ describe('TouchEvent', () => {
// @ts-ignore
expect(touchList.item(0).target).toBe(div);

await simulatePointUp(12, 12);
done();
});
requestAnimationFrame(async () => {
Expand Down

0 comments on commit 97c34d9

Please sign in to comment.