Skip to content

Commit 07e25c4

Browse files
feat: add regenerate cases (#1027) (#1047)
* feat: add regenerate cases Signed-off-by: SuZhou-Joe <[email protected]> * feat: optimize cases Signed-off-by: SuZhou-Joe <[email protected]> --------- Signed-off-by: SuZhou-Joe <[email protected]> (cherry picked from commit ad6faec) Co-authored-by: SuZhou-Joe <[email protected]>
1 parent 831e5be commit 07e25c4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

cypress/integration/plugins/dashboards-assistant/chatbot_agent_framework_spec.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,23 @@ if (Cypress.env('DASHBOARDS_ASSISTANT_ENABLED')) {
4242

4343
// should have a suggestion section
4444
cy.get(`[aria-label="chat suggestions"]`).should('be.length', 1);
45+
46+
// Click regenerate button
47+
cy.get(`button[title="regenerate message"]`).click();
48+
49+
// The previous message and the regenerate button should be gone
50+
cy.get(`button[title="regenerate message"]`).should('be.length', 0);
51+
52+
// suggestions should be gone
53+
cy.get(`[aria-label="chat suggestions"]`).should('be.length', 0);
54+
55+
// The regenrate message should be there
56+
cy.contains(
57+
'The indices in your cluster are the names listed in the response obtained from using a tool to get information about the OpenSearch indices.'
58+
);
59+
60+
// should have a suggestion section
61+
cy.get(`[aria-label="chat suggestions"]`).should('be.length', 1);
4562
});
4663
});
4764
});

0 commit comments

Comments
 (0)