Skip to content

Commit

Permalink
feat: add regenerate cases
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Feb 2, 2024
1 parent b65c5de commit ee3742a
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@ if (Cypress.env('DASHBOARDS_ASSISTANT_ENABLED')) {

// should have a suggestion section
cy.get(`[aria-label="chat suggestions"]`).should('be.length', 1);

// Click regenerate button
cy.get(`button[title="regenerate message"]`).click();

// The previous message should be gone
cy.get(`button[title="regenerate message"]`).should('be.length', 0);

// suggestions should be gone
cy.get(`[aria-label="chat suggestions"]`).should('be.length', 0);

// wait for 1 second
cy.wait(1000);

// The regenrate message should be there
cy.contains(
'The indices in your cluster are the names listed in the response obtained from using a tool to get information about the OpenSearch indices.'
);

// should have a suggestion section
cy.get(`[aria-label="chat suggestions"]`).should('be.length', 1);
});
});
});
Expand Down

0 comments on commit ee3742a

Please sign in to comment.