Skip to content

Commit 3aa71df

Browse files
authored
test: update copilot page elements (#14612)
1 parent bfab5b0 commit 3aa71df

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/rerun.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ jobs:
130130
run: |
131131
npm run setup
132132
133+
- name: Switch M365 account
134+
run: |
135+
username='${{ env.M365_USERNAME }}'
136+
echo "M365_ACCOUNT_NAME=$username" >> $GITHUB_ENV
137+
133138
- name: Clean resource
134139
if: always()
135140
run: |

packages/tests/src/utils/playwrightOperation.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,20 @@ export async function initCopilotPage(
429429
try {
430430
await page?.waitForSelector(`span:has-text("Agents")`);
431431
console.log("[success] copilot loaded");
432+
try {
433+
console.log("Click All agents button:");
434+
const seeMore = await page?.waitForSelector(
435+
`button[aria-label='All agents']`
436+
);
437+
await seeMore.click();
438+
console.log("Loaded more agents:");
439+
} catch {
440+
console.log("No All agents button:");
441+
}
432442
try {
433443
console.log("Click See more button:");
434444
const seeMore = await page?.waitForSelector(
435-
`div[aria-label='See more']`
445+
`button:has-text('See more')`
436446
);
437447
await seeMore.click();
438448
console.log("Loaded more agents:");
@@ -1750,7 +1760,7 @@ export async function validatePrompt(
17501760
try {
17511761
console.log("start to verify prompt");
17521762
const contenteditableSpan = await page?.waitForSelector(
1753-
'span[aria-label="Chat Input"]'
1763+
'span[aria-label="Message Copilot"]'
17541764
);
17551765
await contenteditableSpan?.click();
17561766
await contenteditableSpan.fill(options?.prompt || "list repairs");

0 commit comments

Comments
 (0)