Skip to content

Commit 6de3e90

Browse files
committed
test(android): use rafraf helper and current license header
1 parent 9b39365 commit 6de3e90

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎tests/android/input.spec.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
2-
* Copyright 2020 Microsoft Corporation. All rights reserved.
2+
* Copyright (c) Microsoft Corporation.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* http://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import { androidTest as test, expect } from './androidTest';
18+
import { rafraf } from '../config/utils';
1819

1920
test('androidInput.swipe should start from the given point', async ({ androidDevice }) => {
2021
const context = await androidDevice.launchBrowser();
@@ -24,7 +25,7 @@ test('androidInput.swipe should start from the given point', async ({ androidDev
2425
// pipeline, independent of the CDP connection used by setContent() above. Wait for
2526
// the new content to actually be composited and presented on the device screen,
2627
// otherwise the swipe can land on the previous (blank) frame and never scroll anything.
27-
await page.evaluate(() => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve))));
28+
await rafraf(page);
2829
await androidDevice.input.swipe({ x: 250, y: 1500 }, [{ x: 250, y: 500 }], 30);
2930
await expect.poll(() => page.evaluate(() => window.scrollY)).toBeGreaterThan(0);
3031
await context.close();

0 commit comments

Comments
 (0)