hoprnet / myne-chat

https://app.myne.chat
MIT License
3 stars 5 forks source link

Smart mocks (0.2.1) #102

Closed 0xjjpa closed 6 months ago

0xjjpa commented 2 years ago

Background

This initiative was an exploration exercise with @ReinhardSchmidt about better onboarding, described in #61, which became an epic of its own. Since to provide the best experience we require to do some tooling work around the mocks, this now became an epic of its own.

Is your feature related to a problem?

Right now, our mocks server replies back whatever is being sent to. This makes testing features like verify a bit hard, since we would need to parse back that reply within our tests.

Describe the feature you'd like

Our mock server should be able to send back a verified response on demand when a verified message is sent, both on request and after a message has been sent

Describe alternatives you've considered

Currently, we have a /sign endpoint that signs the message before being sent, but we have no way to verify the message in the client w/o being the signer ourselves, which creates overhead in our tests.

Due to the already existing overhead on our end-to-end tests, it would be better to have the mock server reply with a verified message itself we can check against its PeerId. This needs to be done in two ways: whenever we check verify in our message so we get a verified reply of whatever message we are sending, and via the sendRandom endpoint which we can trigger in our tests to then do the check ourselves and not only in the UI level.

Additional context

See #62. Tests are already created in #101, we only need to add verification on the server functionality so the app showcases the right UI which we can verify in the tests.

Tasks

0xjjpa commented 2 years ago

The credentials needed to deploy these improvements to HOPR Services AG infrastructure had been encrypted for jjperezaguinaga via Keybase, and can be seen here.

-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.1.13
Comment: https://keybase.io/crypto

wcFMAwNb8z3+Y3/3AQ//V43iXiFSwEcvRmsyKo5n9dCcIYc3dsEVM3r5aIJhv4aJ
MozBIuMHzepUrfry3vwgq060SEEJU5nHsmrZHAC2mBL9e87wH7HxO/lAQfzsGlSV
vFF3VwQTEIUaD4xpzwXzjhVcxavTigwLAcSIlqtv7PXb4+4+2kJ9VNJeyPzXK7QV
o1uagvGAWgIblVHgH/cHrZD23sOjOVS9Vp69048rssm3lIsK1Z5G3Fz17/0wuI9t
nkQV0vezTngQiXbYoCvcAljPKxmL3SCq3bam3lrrWbJfeNR1du2eXxb762h7YvKP
iDfHupw5xFu67/uD85eZQXAGfwNg6sKT776v0eBQrF4sGDjITEELWt/3lhHMqCdS
9FZ8SUziIUGgJwzh8aI7shjcwFH2EExZpDYbhO2mHkSPq0UKcpj11CCW13Ci6PtM
sDQ/1I1kF9nVPnefqSEhLHlsb6thHYbfuvIIhH1SrSbu34UwDnMxlIcJjmbBqchE
4WiWyThK9WNd9bqV6dNOJ6TtJDhCFJoi40MDD2PgK5tpTMO6DmS3rKEHaVNnvCGB
U1hDjF65CFMX2m28LxeXHT8BPy4QTxwD+VPqtbQjTHnxOPhvXckcCbNc/2ZOJmSZ
drv0uIAkK8KWrmcAUDdbe5KInHNEVu4+nOemYCMmPIuhgfgIr+pK5ipukvVui+3S
mAG1D8gSB6eT5ME1IMhISqm7N1pkc0HJEuO3pWHBAW9Hf0B9tSN8tHY/Bn9a0DPo
zGLpfF1/tXNkSG/s63QZbGA7Kp/iBDX2FxN7GhUhuyytE1bIhoO0bkie0H9HEsXi
ehHny3vnar2Oo97PCIwIJuEYKtMlK2xf/LDVmk4K9Cj6Hl65o6jTor5Rcd4EZi4h
U54C3QwoDEb+
=YMYX
-----END PGP MESSAGE-----
mjadach-iv commented 6 months ago

Closing issue as the myne-chat project is closed for the time being. Will need to reopen if we will be updating the repo.