-
Notifications
You must be signed in to change notification settings - Fork 188
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): port auto-connect tests for multiple connections COMPASS-8010 #6121
Conversation
await browser | ||
.$(Selectors.ConnectionToastErrorText) | ||
.waitForDisplayed(waitOptions); | ||
return await browser.$(Selectors.LGToastTitle).getText(); |
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.
This was accidentally returning the toast body text (which is always the same) and not the toast title text. Nothing cared about it yet.
@@ -15,26 +15,19 @@ import path from 'path'; | |||
import { promises as fs } from 'fs'; | |||
|
|||
const connectionStringSuccess = 'mongodb://127.0.0.1:27091/test'; | |||
const connectionNameSuccess = connectionNameFromString(connectionStringSuccess); | |||
const connectionStringSuccessTitle = '127.0.0.1:27091'; | |||
const connectionNameSuccess = 'Success'; |
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.
Much of the confusion is that we name this connection string as the favorite "Success" in the connections file and then it gets that name, but we also often just pass this string on the command line and then it gets the auto-generated name.
.$(Selectors.SidebarTitle) | ||
.getText(); | ||
expect(sidebarTitle).to.eq(expectedTitle); | ||
if (!TEST_MULTIPLE_CONNECTIONS) { |
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.
In case anyone notices: There is no else necessary because in MC world waitForConnectionResult already checks that the exact connectionName was connected and there is no sidebar title that changes accordingly.
@@ -179,6 +176,10 @@ describe('Automatically connecting from the command line', function () { | |||
{ connectionStatus: 'failure' } | |||
); | |||
expect(error).to.include('Authentication failed'); | |||
if (TEST_MULTIPLE_CONNECTIONS) { |
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.
In single connection world you land on the connection form, so there's no else necessary.
); | ||
expect(connectionItems).to.have.lengthOf(0); | ||
|
||
await browser |
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.
I think this is now actually the first and only test for the initial empty sidebar state. We always use the small plus button, never the big add button that only shows up in that case.
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.
I should actually change the time to first query test to use that button.. But in a different PR.
No description provided.