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

Conversation

jfperusse-bhvr
Copy link
Contributor

This fixes a potential failure in the second chat_profiles test as it is not currently waiting after changing the model to GPT-4.

This test was constantly failing for me on the latest main without the added wait.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Oct 22, 2024
@dokterbob
Copy link
Collaborator

image

The tests already take a long time, I would prefer if instead of an arbitrary 1s wait you could wait for whatever it is that needs to happen before being able to submit.

For example, through an alias to intercept HTTP events:
https://docs.cypress.io/api/commands/wait#Alias

Or using a get() for whatever is necessary to determine if we're ready to submit.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Oct 31, 2024
@jfperusse-bhvr
Copy link
Contributor Author

Updated to wait on the chat-input field to be disabled and enabled again, instead of waiting for 1 second. This seems to work fine locally after testing 10+ times.

Copy link
Collaborator

@dokterbob dokterbob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, instead of 1s extra, one less 1s wait in E2E tests!

Thanks @jfperusse-bhvr!

@dokterbob dokterbob added the e2e-tests Has E2E tests label Nov 6, 2024
@dokterbob dokterbob merged commit aa146db into Chainlit:main Nov 7, 2024
17 checks passed
@jfperusse-bhvr jfperusse-bhvr deleted the fix/chat-profiles-test branch November 7, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e-tests Has E2E tests size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants