chore: fix the "Add contact to group" integrationt test

pull/2756/head
Audric Ackermann 2 years ago
parent a7e8c4a31d
commit 37639077a1

@ -9,8 +9,10 @@ const config: PlaywrightTestConfig = {
testDir: './ts/test/automation', testDir: './ts/test/automation',
testIgnore: '*.js', testIgnore: '*.js',
outputDir: './ts/test/automation/test-results', outputDir: './ts/test/automation/test-results',
retries: 1, retries: process.env.PLAYWRIGHT_RETRIES_COUNT
repeatEach: 1, ? toNumber(process.env.PLAYWRIGHT_RETRIES_COUNT)
: 1,
workers: toNumber(process.env.PLAYWRIGHT_WORKER_COUNT) || 1, workers: toNumber(process.env.PLAYWRIGHT_WORKER_COUNT) || 1,
reportSlowTests: null, reportSlowTests: null,
}; };

@ -5,7 +5,6 @@ import {
clickOnElement, clickOnElement,
clickOnMatchingText, clickOnMatchingText,
clickOnTestIdWithText, clickOnTestIdWithText,
doesTextIncludeString,
typeIntoInput, typeIntoInput,
waitForControlMessageWithText, waitForControlMessageWithText,
waitForMatchingText, waitForMatchingText,
@ -70,7 +69,8 @@ sessionTestFourWindows('Add contact to group', async ([windowA, windowB, windowC
'module-conversation__user__profile-name', 'module-conversation__user__profile-name',
testGroup.userName testGroup.userName
); );
await doesTextIncludeString(windowD, 'control-message', 'You joined the group.'); const emptyStateGroupText = `You have no messages from ${testGroup.userName}. Send a message to start the conversation!`;
await waitForTestIdWithText(windowD, 'empty-conversation-notification', emptyStateGroupText);
}); });
sessionTestThreeWindows('Change group name', async ([windowA, windowB, windowC]) => { sessionTestThreeWindows('Change group name', async ([windowA, windowB, windowC]) => {

@ -161,7 +161,7 @@ export async function doesTextIncludeString(window: Page, dataTestId: string, te
if (builtSelector) { if (builtSelector) {
console.info('Text found:', text); console.info('Text found:', text);
} else { } else {
throw new Error(`Text not found: , ${text}`); throw new Error(`Text not found: "${text}"`);
} }
} }

Loading…
Cancel
Save