Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #3051 race condition for waitForFileChooser() fix + fixed wkd test #3114

Merged
merged 3 commits into from Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions .vscode/launch.json
Expand Up @@ -10,7 +10,8 @@
"args": [
"build/test/test/source/test.js",
"CONSUMER-MOCK",
"--pool-size=1"
"--pool-size=1",
"--debug"
],
"skipFiles": [
"<node_internals>/**/*.js"
Expand All @@ -24,7 +25,8 @@
"program": "${workspaceFolder}/node_modules/ava/profile.js",
"args": [
"build/test/test/source/test.js",
"CONSUMER-LIVE-GMAIL"
"CONSUMER-LIVE-GMAIL",
"--debug"
],
"skipFiles": [
"<node_internals>/**/*.js"
Expand Down
4 changes: 3 additions & 1 deletion test/source/tests/compose.ts
Expand Up @@ -187,6 +187,8 @@ export const defineComposeTests = (testVariant: TestVariant, testWithBrowser: Te
const inboxPage = await browser.newPage(t, TestUrls.extensionInbox('test.ci.compose@org.flowcrypt.com'));
const composeFrame = await InboxPageRecipe.openAndGetComposeFrame(inboxPage);
await composeFrame.waitAndFocus('@action-attach-files');
// workaround for https://github.com/puppeteer/puppeteer/issues/6040
await (inboxPage.page as any)._client.send('Page.setInterceptFileChooserDialog', { enabled: true });
await Promise.all([
inboxPage.page.waitForFileChooser(), // must be called before the file chooser is launched
inboxPage.press('Enter')
Expand Down Expand Up @@ -668,7 +670,7 @@ export const defineComposeTests = (testVariant: TestVariant, testWithBrowser: Te
const composePage = await ComposePageRecipe.openStandalone(t, browser, 'compose');
await ComposePageRecipe.fillMsg(composePage, { to: 'test-wkd@metacode.biz' }, 'should find pubkey from WKD directly');
await composePage.waitForContent('.email_address.has_pgp', 'test-wkd@metacode.biz');
expect(await composePage.attr('.email_address.has_pgp', 'title')).to.contain('92C4 E784 1B3A FF74');
expect(await composePage.attr('.email_address.has_pgp', 'title')).to.contain('5B7A BE66 0D5C 62A6 07FE 2448 716B 1776 4E3F CACA');
}));

ava.default('timeouts when searching WKD - used to never time out', testWithBrowser('compose', async (t, browser) => {
Expand Down