You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of the latest tests added are comprehensive, but a bit hard to read and brittle in the sense that changes on the components themselves may require lots of changes to fix the tests. An initial solution to this would be aliases on the component IDs, so that we only need to change the Cypress check in one place:
We could have cy.seedDb(), cy.cleanUp() functions to make sure all E2E tests have the required data before running (via API calls). A good idea is to seed with data that we know won't be present normally and then delete it after the E2E tests.
A suggestion by @andypols which comes in handy here:
[...] I just needed a user to test with, so I used the existing mechanism (#1022). Personally, I prefer having a dedicated testing service that can create and delete test users, repos, etc., so you can use something like cy.ensureUserExists(email, isAdmin, ...) for setup. That way, it's behaviorally separate from the app itself and doesn't depend on anything needing to be run first.
Database integration testing using in-memory or local (ephemeral) instances of the databases we support such as local Mongodb. As we add more database engines, this will become more and more difficult to manage. Again, I believe a lot of this can be accomplished with a simple refactoring of the various dependent layers between the proxy, service and db layers. It was also written pre-ESM and relied on mutable exports. We should clean this up with some dependency injection or better modularity.
Authentication integration testing. Passport has a mock strategy that may be usable if we restructure the authentication layers to pass that in via parameter so that testing becomes simpler.
There are lot of inter-module calls and imports/exports that make these layers difficult to test. I propose they be refactored to assist with integration & e2e testing.
E2E testing should always be using a live setup such as what is being proposed via #1165 including real test git repos so we can validate the actual proxying logic instead of relying on excessive mocking.
Activity
coopernetes commentedon Dec 2, 2025
To add:
There are lot of inter-module calls and imports/exports that make these layers difficult to test. I propose they be refactored to assist with integration & e2e testing.
E2E testing should always be using a live setup such as what is being proposed via #1165 including real test git repos so we can validate the actual proxying logic instead of relying on excessive mocking.
kriswest commentedon Apr 20, 2026
Closing to rethink once the refreshed UI is in:
We're expecting to have to re-vamp the cyprus tests as part of #1507 anyway... and teh new E2E tests are better at a full integration test