test: fix locator-misc-1 tests on Android (#7985)

This commit is contained in:
Max Schmitt 2021-08-04 20:11:17 +02:00 committed by GitHub
parent 3b0856da18
commit b88199d93e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 13 deletions

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { contextTest as it, expect } from '../config/browserTest';
import { test as it, expect } from './pageTest';
import path from 'path';
it('should hover', async ({ page, server }) => {
@ -92,15 +92,3 @@ it('should upload the file', async ({page, server, asset}) => {
await input.setInputFiles(filePath);
expect(await page.evaluate(e => (e as HTMLInputElement).files[0].name, await input.elementHandle())).toBe('file-to-upload.txt');
});
it.describe('tap group', () => {
it.use({ hasTouch: true });
it('should send all of the correct events', async ({ page }) => {
await page.setContent(`
<div id="a" style="background: lightblue; width: 50px; height: 50px">a</div>
<div id="b" style="background: pink; width: 50px; height: 50px">b</div>
`);
await page.locator('#a').tap();
await page.locator('#b').tap();
});
});

View File

@ -200,3 +200,14 @@ async function trackEvents(target: ElementHandle) {
});
return eventsHandle;
}
it.describe('locators', () => {
it('should send all of the correct events', async ({ page }) => {
await page.setContent(`
<div id="a" style="background: lightblue; width: 50px; height: 50px">a</div>
<div id="b" style="background: pink; width: 50px; height: 50px">b</div>
`);
await page.locator('#a').tap();
await page.locator('#b').tap();
});
});