Skip to content

Conversation

lerouxb
Copy link
Contributor

@lerouxb lerouxb commented Mar 3, 2022

For each connection we test this will:

  • Insert the connection string and make sure that the form reflects it
  • then reset the form again, set all those form fields and make sure we get the same connection string back out.

This should do several things:

  • tests the parsing of valid connection strings and filling of the form
  • tests all the "happy paths" of inserting things in the form
  • will alert us if any of the selectors we use in the tests have to be changed

This PR doesn't perform the actual connect at the end yet. The plan is to gradually change the connection strings (and expected resulting form state) over to real connections that we can connect to. Starting with things we can test locally and against atlas, then to all the docker machines we have available and so on. We could then also easily disable the connect parts based on which environment variables are set. ie. only test against docker images on ubuntu for now, etc.

This also doesn't test warnings and errors yet. Just the known happy paths.

I tried to hit every possible form field. This is not a complete cartesian product of every possible combination of state. We can easily expand it over time if this misses anything important.

@lerouxb
Copy link
Contributor Author

lerouxb commented Mar 3, 2022

Aaand after merging in main I just noticed that one or two selectors already has to be changed. Will fix in a moment..

@lerouxb lerouxb changed the title E2E connection form tests chore(e2e): connection form tests COMPASS-5338 Mar 3, 2022
@lerouxb
Copy link
Contributor Author

lerouxb commented Mar 3, 2022

The failures seem to be old flakes.

@lerouxb lerouxb requested a review from mcasimir March 3, 2022 12:26
await element.setValue(value);
const actualValue = await element.getValue();
if (actualValue !== value) {
console.log(actualValue, '!==', value);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Trying to debug this. Some race condition where sometimes it appends the connection string on at the end rather than clearing it first. Just leaving this console.log in to keep an eye on it.

@lerouxb lerouxb merged commit 54a679e into main Mar 3, 2022
@lerouxb lerouxb deleted the e2e-connection-form branch March 3, 2022 14: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