Skip to content

Commit 1db4d2b

Browse files
committed
fix ai suggestion tests
1 parent 4d4200c commit 1db4d2b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

x-pack/platform/plugins/shared/streams_app/test/scout/ui/tests/data_management/data_routing/ai_suggestions_editing_validation.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ test.describe('Stream data routing - AI suggestions editing validation', { tag:
6767
await expect(page.getByText('Stream name is required', { exact: false })).toBeVisible();
6868
});
6969

70-
// TODO - the message just changed but how to get the LLM to work in the test
7170
test('should show error when editing suggestion with name containing dots', async ({ page }) => {
7271
const streamName = getStreamName(MOCK_SUGGESTION_INFO.name);
7372
await clickSuggestionEditButton(page, streamName);
@@ -78,7 +77,9 @@ test.describe('Stream data routing - AI suggestions editing validation', { tag:
7877
await nameInput.fill('test.name');
7978

8079
await expect(
81-
page.getByText('Stream name cannot contain the "." character', { exact: false })
80+
page.getByText('The child stream logs.test does not exist. Please create it first.', {
81+
exact: false,
82+
})
8283
).toBeVisible();
8384
});
8485

x-pack/platform/plugins/shared/streams_app/test/scout/ui/tests/data_management/data_routing/ai_suggestions_interactions.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,17 @@ test.describe('Stream data routing - AI suggestions interactions', { tag: ['@ess
9292
await expect(page.getByTestId('streamsAppReviewPartitioningSuggestionsCallout')).toBeVisible();
9393
});
9494

95-
// TODO - the message just changed but how to get the LLM to work in the test
96-
test('should update suggestion name when editing and accepting', async ({ page }) => {
95+
test('should update suggestion name when editing and accepting', async ({
96+
page,
97+
pageObjects,
98+
}) => {
9799
const originalStreamName = getStreamName(MOCK_SUGGESTIONS_MULTIPLE[0].name);
98100
await clickSuggestionEditButton(page, originalStreamName);
99101

100102
const nameInput = page.getByTestId('streamsAppRoutingStreamEntryNameField');
101103
await expect(nameInput).toBeVisible();
102104

103-
await nameInput.fill('debug');
105+
await pageObjects.streams.fillRoutingRuleName('debug');
104106

105107
const acceptButton = page.getByTestId('streamsAppStreamDetailRoutingUpdateAndAcceptButton');
106108
await expect(acceptButton).toBeEnabled();

0 commit comments

Comments
 (0)