-
Notifications
You must be signed in to change notification settings - Fork 180
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
chore(compass-e2e-tests): add generative query ai e2e tests with mock server COMPASS-6978 #4728
chore(compass-e2e-tests): add generative query ai e2e tests with mock server COMPASS-6978 #4728
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left one comment, but feel free to ignore it if it doesn't make sense to you
// Check that the request was made with the correct parameters. | ||
const requests = getRequests(); | ||
expect(requests.length).to.equal(1); | ||
expect(requests[0].content.userInput).to.equal(testUserInput); | ||
expect(requests[0].content.collectionName).to.equal('numbers'); | ||
expect(requests[0].content.databaseName).to.equal('test'); | ||
expect(requests[0].content.schema).to.exist; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to keep it, but this is something we already cover with functional tests and I don't think redundancy is needed here. From our e2e tests I would mostly expect testing that the UI is correctly handling user interactions
I know that we do a similar thing for analytics, but this is not something we usually cover with unit / functional, so there it makes more sense to check specifically what got pushed to the backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I'll remove those extra checks in another pr to avoid another test ci run.
COMPASS-6978
Starts a mock server, opens the ai input, enters a prompt, runs it, ensures that the query populates and is runnable. These tests use environment variables to skip the Atlas login. We might want to actually sign into Atlas as part of the end to end test, at least in evergreen. I can make a follow up ticket or do it here depending on how folks feel.