-
Notifications
You must be signed in to change notification settings - Fork 192
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(e2e): add test for add connection failures COMPASS-8009 COMPASS-8091 #6028
Conversation
...cloneDeep(connectionInfo), | ||
}).then(() => setIsConnectionFormOpen(false)); | ||
setIsConnectionFormOpen(false); | ||
void _onConnect(connectionInfo).then(() => { |
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.
We weren't using all the same code for new connections as when connecting to existing saved connections which meant that errors weren't caught and the toast didn't appear.
@@ -299,6 +300,29 @@ describe('Connection string', function () { | |||
} | |||
}); | |||
|
|||
it('fails for authentication errors', async function () { |
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.
We didn't actually have any tests for failed connections except in auto-connect.test.ts for connecting from the CLI, so we didn't notice before that the toast never showed up.
packages/compass-e2e-tests/helpers/commands/connect-with-connection-string.ts
Outdated
Show resolved
Hide resolved
packages/compass-e2e-tests/helpers/commands/wait-for-connection-result.ts
Outdated
Show resolved
Hide resolved
1c14d33
to
ca7033c
Compare
ca7033c
to
56e0deb
Compare
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, thank you for the fix!
Also when adding a connection and it fails to connect the toast now shows up.