We have a lot of test cases we need to automate. While we work on getting those made we maintain this list of known cases you might want to test. You do not need to test all of these for every PR - use your best judgement.
This is not an exhaustive list by any means. As you find weird edge cases please add them here.
We have some unit tests but not much. Usually we prefer to just unit test helper/utils that have a more simple input <-> output format and are easy to test.
Our E2E tests are currently in the playwright-tests directory. The goal is eventually this becomes a stand alone project within the Estuary organization. As these tests are trully testing the entire application and not just the UI.
You will want to test a solid combination of different connectors that all can trigger different edges cases. You can also fake these locally my altering the Endpoint and Resource Configs. However, this will make saving them not work.
- requires no
endpointconfig (???) - allows oAuth for authentication (Google Sheets)
- uses a
descriminatorfor aanyOfofoneOf(???)
- returns a single binding (HelloWorld)
- returns several bindings (Postgres)
- returns inferred schema (WebHook)
- returns TONS of bindings to check performance (Postgres w/ table that has +1k tables)
- supports
deltaUpdatesonly (???) - supports
targetSchemaonly (???) - supports both
deltaUpdatestargetSchema(???) - supports neither
deltaUpdatestargetSchema(Amazon S3 Parquet)
During create you will need to worry about when you are editing with just local state stored in the browser vs when you are actually updating the draft spec. Normally you are updating the draft if there is a Test and Save cta visible in the header.
- happy path save
- edit collection
schema(justschemaandread/writeones)
Captures are slightly more straight forward as they do not have a draft until things are discovered. So you do not need to worry as much about testing these and then clicking next like Materializations.
- edit collection keys
- edit and then re-discover
- failed discover
- rename field on collection
Materializations have a draft right away. However, we do not auto generate the spec so there is still a next cta showing like when you enter Capture.
You will want to test all these before AND after clicking next cta.
- happy path save with
materializecta - happy path save but WITHOUT bindings
- refresh field select
- set field select
groupBy - setting
source.capture - adding bindings
- setting
sourcedefaults and adding bindings - removing bindings
- happy path save with old collection using trial storage
You will want to do all the same testing as you do on Create - but just in the edit flow. During edit the user can also reload at anytime - so make sure you test with reloading at different times and ensuring your changes are still there and things are hydrating correctly
- happy path edit and save
- edit
endpointconfig backfilla single bindingbackfillall bindings
There are some connectors that require special handling and have been known to break our assumptions.
If you are adding this kind of handling ensure you add a comment with some details on why it is added so we can more easily find them in the future.
Pydantic is a Python tool that is used by the Connectors team. It tends to output schemas that are technically correct but written in a manner that seems a bit "off" from how a person might write them. The main thing that has cause bugs before is how Pydantic handles oneOf, anyOf, and discriminator.
These connectors can be found here and should always be included in your testing.
You can also find a lot of the special handling by just seraching for Pydantic in the code.