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

chore(e2e): add test for add connection failures COMPASS-8009 COMPASS-8091 #6028

Merged
merged 10 commits into from
Jul 16, 2024

Conversation

lerouxb
Copy link
Contributor

@lerouxb lerouxb commented Jul 16, 2024

Also when adding a connection and it fails to connect the toast now shows up.

...cloneDeep(connectionInfo),
}).then(() => setIsConnectionFormOpen(false));
setIsConnectionFormOpen(false);
void _onConnect(connectionInfo).then(() => {
Copy link
Contributor Author

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 () {
Copy link
Contributor Author

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.

@lerouxb lerouxb force-pushed the e2e-multiple-errors branch from 1c14d33 to ca7033c Compare July 16, 2024 14:05
@lerouxb lerouxb force-pushed the e2e-multiple-errors branch from ca7033c to 56e0deb Compare July 16, 2024 14:07
Copy link
Contributor

@paula-stacho paula-stacho left a 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!

@lerouxb lerouxb merged commit a3228d9 into main Jul 16, 2024
26 of 29 checks passed
@lerouxb lerouxb deleted the e2e-multiple-errors branch July 16, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants