From f7b33d01125deb11a12407d4685553ec3a216322 Mon Sep 17 00:00:00 2001 From: Patryk Kopycinski Date: Mon, 16 Dec 2024 14:49:37 +0100 Subject: [PATCH 1/4] Update converations.cy.ts --- .../cypress/e2e/ai_assistant/conversations.cy.ts | 9 +++++---- .../security_solution_cypress/cypress/tasks/assistant.ts | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/ai_assistant/conversations.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/ai_assistant/conversations.cy.ts index 4d87cce1fdaa8..3cad0aea84251 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/ai_assistant/conversations.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/ai_assistant/conversations.cy.ts @@ -10,6 +10,7 @@ import { RULE_MANAGEMENT_CONTEXT_DESCRIPTION, } from '@kbn/security-solution-plugin/public/detections/pages/detection_engine/rules/translations'; import { EXPLAIN_THEN_SUMMARIZE_SUGGEST_INVESTIGATION_GUIDE_NON_I18N } from '@kbn/security-solution-plugin/public/assistant/content/prompts/user/translations'; +import { NEW_CHAT } from '@kbn/elastic-assistant/impl/assistant/conversations/conversation_sidepanel/translations'; import { assertConnectorSelected, assertNewConversation, @@ -19,7 +20,7 @@ import { createNewChat, selectConversation, assertMessageSent, - assertConversationTitle, + assertNotConversationTitle, typeAndSendMessage, assertErrorResponse, selectRule, @@ -145,15 +146,15 @@ describe('AI Assistant Conversations', { tags: ['@ess', '@serverless'] }, () => assertConnectorSelected(bedrockConnectorAPIPayload.name); assertMessageSent('goodbye'); }); - it('Correctly creates and titles new conversations, and allows title updates', () => { + it.only('Correctly creates and titles new conversations, and allows title updates', () => { visitGetStartedPage(); openAssistant(); createNewChat(); - assertNewConversation(false, 'New chat'); + assertNewConversation(false, NEW_CHAT); assertConnectorSelected(azureConnectorAPIPayload.name); typeAndSendMessage('hello'); assertMessageSent('hello'); - assertConversationTitle('Unexpected API Error: - Connection error.'); + assertNotConversationTitle(NEW_CHAT); updateConversationTitle('Something else'); }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/assistant.ts b/x-pack/test/security_solution_cypress/cypress/tasks/assistant.ts index 5f030c61de65a..0c18721fbb39f 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/assistant.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/assistant.ts @@ -176,6 +176,9 @@ export const assertNewConversation = (isWelcome: boolean, title: string) => { export const assertConversationTitle = (title: string) => cy.get(CONVERSATION_TITLE + ' h2').should('have.text', title); +export const assertNotConversationTitle = (title: string) => + cy.get(CONVERSATION_TITLE + ' h2').should('not.have.text', title); + export const assertSystemPromptSent = (message: string) => { cy.get(CONVERSATION_MESSAGE).eq(0).should('contain', message); }; From 38a11cf1fe4e8140a03d565ec3ca663616687975 Mon Sep 17 00:00:00 2001 From: Patryk Kopycinski Date: Mon, 16 Dec 2024 14:50:43 +0100 Subject: [PATCH 2/4] unskip --- .../cypress/e2e/ai_assistant/conversations.cy.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/ai_assistant/conversations.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/ai_assistant/conversations.cy.ts index 111b1284a45d9..3604c8f407477 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/ai_assistant/conversations.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/ai_assistant/conversations.cy.ts @@ -48,8 +48,7 @@ import { } from '../../screens/ai_assistant'; import { visit, visitGetStartedPage } from '../../tasks/navigation'; -// Failing: See https://github.com/elastic/kibana/issues/204167 -describe.skip('AI Assistant Conversations', { tags: ['@ess', '@serverless'] }, () => { +describe('AI Assistant Conversations', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { deleteConnectors(); deleteConversations(); @@ -147,7 +146,7 @@ describe.skip('AI Assistant Conversations', { tags: ['@ess', '@serverless'] }, ( assertConnectorSelected(bedrockConnectorAPIPayload.name); assertMessageSent('goodbye'); }); - it.only('Correctly creates and titles new conversations, and allows title updates', () => { + it('Correctly creates and titles new conversations, and allows title updates', () => { visitGetStartedPage(); openAssistant(); createNewChat(); From 328d0502159207533ec703420840dd7e5054dcd8 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:19:53 +0000 Subject: [PATCH 3/4] [CI] Auto-commit changed files from 'node scripts/lint_ts_projects --fix' --- x-pack/test/security_solution_cypress/cypress/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/test/security_solution_cypress/cypress/tsconfig.json b/x-pack/test/security_solution_cypress/cypress/tsconfig.json index b117f42efceae..2de45e2052436 100644 --- a/x-pack/test/security_solution_cypress/cypress/tsconfig.json +++ b/x-pack/test/security_solution_cypress/cypress/tsconfig.json @@ -45,5 +45,6 @@ "@kbn/repo-info", "@kbn/elastic-assistant-common", "@kbn/cloud-security-posture-common", + "@kbn/elastic-assistant", ] } From 0b828935d4eae803759f63df1f68677535af3a25 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:50:17 +0000 Subject: [PATCH 4/4] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- .../public/legacy/embeddable/visualize_embeddable.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/plugins/visualizations/public/legacy/embeddable/visualize_embeddable.tsx b/src/plugins/visualizations/public/legacy/embeddable/visualize_embeddable.tsx index e343fd535a85e..1f631f30f8eb5 100644 --- a/src/plugins/visualizations/public/legacy/embeddable/visualize_embeddable.tsx +++ b/src/plugins/visualizations/public/legacy/embeddable/visualize_embeddable.tsx @@ -22,11 +22,7 @@ import type { DataView } from '@kbn/data-views-plugin/public'; import { Warnings } from '@kbn/charts-plugin/public'; import { hasUnsupportedDownsampledAggregationFailure } from '@kbn/search-response-warnings'; import { Adapters } from '@kbn/inspector-plugin/public'; -import { - Embeddable, - EmbeddableInput, - EmbeddableOutput, -} from '@kbn/embeddable-plugin/public'; +import { Embeddable, EmbeddableInput, EmbeddableOutput } from '@kbn/embeddable-plugin/public'; import { SavedObjectEmbeddableInput } from '@kbn/embeddable-plugin/common'; import { ExpressionAstExpression,