Skip to content

Commit

Permalink
wait longer for @action-step0 and @action-step1
Browse files Browse the repository at this point in the history
  • Loading branch information
limonte committed Nov 7, 2021
1 parent 7999b26 commit 20d6d7c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions test/source/browser/controllable.ts
Expand Up @@ -293,8 +293,6 @@ abstract class ControllableBase {
e.message === 'Node is either not clickable or not an HTMLElement' ||
e.message === 'Node is detached from document'
) {
console.log(selector);
console.log(await (this.target as Page).screenshot({ encoding: 'base64' }));
// maybe the node just re-rendered?
if (!retryErrs || i === 3) {
e.stack = `[clicking(${selector}) failed because element quickly disappeared, consider adding retryErrs]\n` + e.stack;
Expand Down
4 changes: 2 additions & 2 deletions test/source/tests/gmail.ts
Expand Up @@ -51,7 +51,7 @@ export const defineGmailTests = (testVariant: TestVariant, testWithBrowser: Test
if (params.offline) {
await composeBox.page.setOfflineMode(true); // go offline mode
}
await Util.sleep(4); // the draft isn't being saved if start typing without this delay
await Util.sleep(5); // the draft isn't being saved if start typing without this delay
await composeBox.type('@input-body', content, true);
if (params.offline) {
await ComposePageRecipe.waitWhenDraftIsSavedLocally(composeBox);
Expand Down Expand Up @@ -253,7 +253,7 @@ export const defineGmailTests = (testVariant: TestVariant, testWithBrowser: Test
await gmailPage.waitAndClick('#fc_offline_drafts a');
// compose draft 2 should be first in list as drafts are sorted by date descending
const draft = await pageHasSecureDraft(gmailPage, 'compose draft 2');
await Util.sleep(4); // the draft isn't being saved if start typing without this delay
await Util.sleep(5); // the draft isn't being saved if start typing without this delay
await draft.type('@input-body', 'trigger saving a draft to the cloud', true);
await ComposePageRecipe.waitWhenDraftIsSaved(draft);
// after draft 2 is saved to the cloud, it should be removed from offline drafts
Expand Down
8 changes: 4 additions & 4 deletions test/source/tests/page-recipe/setup-page-recipe.ts
Expand Up @@ -108,9 +108,9 @@ export class SetupPageRecipe extends PageRecipe {
) {
if (!noPrvCreateOrgRule) {
if (usedPgpBefore) {
await settingsPage.waitAndClick('@action-step0foundkey-choose-manual-enter', { retryErrs: true });
await settingsPage.waitAndClick('@action-step0foundkey-choose-manual-enter', { timeout: 30000, retryErrs: true });
} else {
await settingsPage.waitAndClick('@action-step1easyormanual-choose-manual-enter', { retryErrs: true });
await settingsPage.waitAndClick('@action-step1easyormanual-choose-manual-enter', { timeout: 30000, retryErrs: true });
}
}
key = key || Config.key(keyTitle);
Expand Down Expand Up @@ -284,9 +284,9 @@ export class SetupPageRecipe extends PageRecipe {
private static createBegin = async (settingsPage: ControllablePage, keyTitle: string, { key, usedPgpBefore = false }: { key?: { passphrase: string }, usedPgpBefore?: boolean } = {}) => {
const k = key || Config.key(keyTitle);
if (usedPgpBefore) {
await settingsPage.waitAndClick('@action-step0foundkey-choose-manual-create');
await settingsPage.waitAndClick('@action-step0foundkey-choose-manual-create', { timeout: 30000 });
} else {
await settingsPage.waitAndClick('@action-step1easyormanual-choose-manual-create', { retryErrs: true });
await settingsPage.waitAndClick('@action-step1easyormanual-choose-manual-create', { timeout: 30000, retryErrs: true });
}
await settingsPage.waitAndType('@input-step2bmanualcreate-passphrase-1', k.passphrase);
await settingsPage.waitAndType('@input-step2bmanualcreate-passphrase-2', k.passphrase);
Expand Down

0 comments on commit 20d6d7c

Please sign in to comment.