From 0cd687502f4c920971b92582eb37e5cbe352b36f Mon Sep 17 00:00:00 2001 From: ayachensiyuan <67082457+ayachensiyuan@users.noreply.github.com> Date: Fri, 1 Dec 2023 11:03:57 +0800 Subject: [PATCH] test: adjust sample contact exporter case change (#10467) * test: adjust sample case change --------- Co-authored-by: v-ivanchen_microsoft --- packages/tests/scripts/randomCases.json | 4 ++-- packages/tests/src/utils/playwrightOperation.ts | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/tests/scripts/randomCases.json b/packages/tests/scripts/randomCases.json index 1020c00815..c33f64ace4 100644 --- a/packages/tests/scripts/randomCases.json +++ b/packages/tests/scripts/randomCases.json @@ -20,7 +20,6 @@ "sample-localdebug-proactive-message", "sample-localdebug-assistant-dashboard", "basic-tab-debug-upgrade-debug", - "basic-tab-upgrade-debug", "bot-debug-upgrade-debug", "bot-upgrade-debug" ] @@ -67,7 +66,8 @@ "sample-localdebug-bot-sso", "sample-localdebug-dice-roller", "sample-localdebug-chef-bot", - "sample-localdebug-large-scale-notification" + "sample-localdebug-large-scale-notification", + "basic-tab-upgrade-debug" ] }, { diff --git a/packages/tests/src/utils/playwrightOperation.ts b/packages/tests/src/utils/playwrightOperation.ts index eb38209ef3..68cd9740a6 100644 --- a/packages/tests/src/utils/playwrightOperation.ts +++ b/packages/tests/src/utils/playwrightOperation.ts @@ -1744,7 +1744,7 @@ export async function validateContact( await frame?.waitForSelector(`div:has-text("${options?.displayName}")`); }); - page.waitForTimeout(1000); + await page.waitForTimeout(10000); // verify add person await addPerson(frame, options?.displayName || ""); @@ -1984,10 +1984,12 @@ export async function addPerson( displayName: string ): Promise { console.log(`add person: ${displayName}`); - const input = await frame?.waitForSelector("input#people-picker-input"); + const input = await frame?.waitForSelector("input#control"); await input?.click(); await input?.type(displayName); - const item = await frame?.waitForSelector(`span:has-text("${displayName}")`); + const item = await frame?.waitForSelector( + `ul#suggestions-list div:has-text("${displayName}")` + ); await item?.click(); await frame?.waitForSelector( `div.table-area div.line1:has-text("${displayName}")` @@ -2000,7 +2002,7 @@ export async function delPerson( ): Promise { console.log(`delete person: ${displayName}`); await frame?.waitForSelector( - `li div.details.small div:has-text("${displayName}")` + `li.selected-list-item div:has-text("${displayName}")` ); const closeBtn = await frame?.waitForSelector('li div[role="button"]');