Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing wait in chat_profiles test #1468

Merged
merged 5 commits into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions cypress/e2e/chat_profiles/spec.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ describe('Chat profiles', () => {
cy.get('[data-test="select-item:GPT-4"]').click();
cy.get('#confirm').click();

cy.wait(1000);
cy.get('#chat-input').should('have.attr', 'disabled');
cy.get('#chat-input').should('not.have.attr', 'disabled');
cy.get('#starter-ask-for-help').should('exist').click();

cy.get('.step')
Expand Down Expand Up @@ -78,7 +79,9 @@ describe('Chat profiles', () => {
cy.get('#chat-profile-selector').parent().click();

// Force hover over GPT-4 profile to show description
cy.get('[data-test="select-item:GPT-4"]').trigger('mouseover', { force: true });
cy.get('[data-test="select-item:GPT-4"]').trigger('mouseover', {
force: true
});

// Wait for the popover to appear and check its content
cy.get('#chat-profile-description').within(() => {
Expand Down Expand Up @@ -111,6 +114,8 @@ describe('Chat profiles', () => {

// Select GPT-4 profile
cy.get('[data-test="select-item:GPT-4"]').click();
cy.get('#chat-input').should('have.attr', 'disabled');
cy.get('#chat-input').should('not.have.attr', 'disabled');

// Verify the profile has been changed
submitMessage('hello');
Expand All @@ -121,6 +126,5 @@ describe('Chat profiles', () => {
'contain',
'starting chat with admin using the GPT-4 chat profile'
);

});
});