Open kegsay opened 1 year ago
MAS use case:
Although I would expand "give me a logged in user and access token" to "create a user, start a session for user and stop session". Not sure if Complement has tests regarding device deletion when a user logs out, but that's the kind of thing I would like to make sure still works as expected with MAS
Matrix has many moving parts. Tests typically only care about one single moving part at a time e.g send a message, create a room, upload OTKs. The setup code that happens to get to the point where we can test that moving part is for the most part, boilerplate. Complement has to date provided helper functions in
client
to do this sort of thing, failing the test if the boilerplate fails e.gclient.CreateRoom
. However, this then fixes the test into a certain way to setup the test. This is "okay" in that it is clear what is happening, but it limits the ability to do smoke tests:There are several projects which would benefit from smoke testing:
These could "reasonably" be split into 3 interfaces:
There may be more. Smoke testing in this way is error-prone. Some tests will fail due to this setup in flakey ways, e.g:
However, there is real value in being able to run a sanity check like this, even if it isn't fully reliable (read: likely not in CI).