From fb16caf1920d70690433bc2234ed26c0d792f41d Mon Sep 17 00:00:00 2001 From: yoyoyohamapi <8338436+yoyoyohamapi@users.noreply.github.com> Date: Wed, 14 May 2025 02:05:45 +0000 Subject: [PATCH] fix(core): ai find-actions falky (#12257) ## Summary by CodeRabbit - **Tests** - Updated test assertions to use case-insensitive matching for verifying displayed text, improving test reliability across different text casing scenarios. > Close AF-2616 --- .../e2e/ai-action/find-actions.spec.ts | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/affine-cloud-copilot/e2e/ai-action/find-actions.spec.ts b/tests/affine-cloud-copilot/e2e/ai-action/find-actions.spec.ts index 1878b711c..909a231b2 100644 --- a/tests/affine-cloud-copilot/e2e/ai-action/find-actions.spec.ts +++ b/tests/affine-cloud-copilot/e2e/ai-action/find-actions.spec.ts @@ -22,9 +22,9 @@ Compare and Select Flights` const todos = await answer.locator('affine-list').all(); const expectedTexts = [ - 'Choose a Booking Platform', - 'Enter Travel Details', - 'Compare and Select Flights', + /Choose a Booking Platform/i, + /Enter Travel Details/i, + /Compare and Select Flights/i, ]; await Promise.all( @@ -55,9 +55,9 @@ Compare and Select Flights` const { answer, responses } = await findActions(); const todos = await answer.locator('affine-list').all(); const expectedTexts = [ - 'Choose a Booking Platform', - 'Enter Travel Details', - 'Compare and Select Flights', + /Choose a Booking Platform/i, + /Enter Travel Details/i, + /Compare and Select Flights/i, ]; await Promise.all( todos.map(async (todo, index) => { @@ -87,9 +87,9 @@ Compare and Select Flights` const { answer, responses } = await findActions(); const todos = await answer.locator('affine-list').all(); const expectedTexts = [ - 'Choose a Booking Platform', - 'Enter Travel Details', - 'Compare and Select Flights', + /Choose a Booking Platform/i, + /Enter Travel Details/i, + /Compare and Select Flights/i, ]; await Promise.all( todos.map(async (todo, index) => { @@ -128,9 +128,9 @@ Compare and Select Flights` const todos = await panelAnswer.locator('affine-list').all(); const expectedTexts = [ - 'Choose a Booking Platform', - 'Enter Travel Details', - 'Compare and Select Flights', + /Choose a Booking Platform/i, + /Enter Travel Details/i, + /Compare and Select Flights/i, ]; await Promise.all( todos.map(async (todo, index) => {