Skip to content

Commit 2722115

Browse files
authored
Fix live tests (#6232)
* use consumer-local build for live tests * fix live chat test
1 parent 750c84f commit 2722115

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

test/source/tests/gmail.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -748,21 +748,21 @@ export const defineGmailTests = (testVariant: TestVariant, testWithBrowser: Test
748748
// 1. Verify buttons on the newest message (usually expanded by default)
749749
await Util.sleep(3);
750750
let messages = await gmailPage.target.$$('[role="listitem"] .adn.ads');
751-
const newestMessage = messages[messages.length - 1];
751+
const newestMessage = messages[messages.length - 1];
752752
const newestMenuBtn = await newestMessage.$('[aria-label="More message options"]');
753753
await newestMenuBtn?.click();
754754
await Util.sleep(1);
755-
755+
756756
await gmailPage.waitAll('.action_reply_message_button');
757757
const collapsedMessage = await gmailPage.target.$('[role="listitem"] .adf.ads');
758758
if (collapsedMessage) {
759-
await collapsedMessage.click();
760-
await Util.sleep(2);
759+
await collapsedMessage.click();
760+
await Util.sleep(2);
761761
}
762762

763763
// Now find the 3-dot menu on this expanded older message.
764764
// After expansion, it should have .adn.ads class active/visible.
765-
765+
766766
messages = await gmailPage.target.$$('[role="listitem"] .adn.ads');
767767
const olderExpandedMessage = messages[0];
768768
const olderMenuBtn = await olderExpandedMessage.$('[aria-label="More message options"]');

test/source/tests/tooling/browser-recipe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export class BrowserRecipe {
8181
// close announcement about updated UI
8282
await context.waitAndClick('.fKz7Od', { delay: 1 });
8383
}
84-
await context.waitAny(['a.gb_de', 'a.gb_Vc', 'a.gb_he']); // Google hangout logo
84+
await context.waitAll('button.jVwmLb'); // new chat button
8585
return googleChatPage;
8686
};
8787

test/source/util/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export const getParsedCliParams = () => {
3030
if (!testGroup) {
3131
testGroup = process.argv.includes('UNIT-TESTS') ? 'UNIT-TESTS' : process.argv.includes('FLAKY-GROUP') ? 'FLAKY-GROUP' : 'STANDARD-GROUP';
3232
}
33-
const buildDir = join(ROOT_DIR, `build/chrome-${(testVariant === 'CONSUMER-LIVE-GMAIL' ? 'CONSUMER' : testVariant).toLowerCase()}`);
33+
const buildVariant = testVariant === 'CONSUMER-LIVE-GMAIL' ? 'CONSUMER-LOCAL' : testVariant;
34+
const buildDir = join(ROOT_DIR, `build/chrome-${buildVariant.toLowerCase()}`);
3435
const poolSizeArg = process.argv.find(a => a.startsWith('--pool-size='));
3536
const poolSize = poolSizeArg ? parseInt(poolSizeArg.split('=')[1], 10) : undefined;
3637
const poolSizeOne = poolSize === 1;

0 commit comments

Comments
 (0)