test: unflake webview tests (#6644)

We close webviews after each test, for the safe `webViews().length` assertions.
This commit is contained in:
Dmitry Gozman 2021-05-18 20:22:00 -07:00 committed by GitHub
parent 475a417dfc
commit e804d16dce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,10 @@
import { androidTest as test, expect } from './androidTest';
test.afterEach(async ({ androidDevice }) => {
await androidDevice.shell('am force-stop org.chromium.webview_shell');
});
test('androidDevice.webView', async function({ androidDevice }) {
expect(androidDevice.webViews().length).toBe(0);
await androidDevice.shell('am start org.chromium.webview_shell/.WebViewBrowserActivity');