stakwork / sphinx-ios

Client app for communication over the lightning network.
MIT License
18 stars 11 forks source link

[Tests] Create UI tests on the Chat view using XCUITest #380

Open tomastiminskas opened 10 months ago

tomastiminskas commented 10 months ago

Context

The Chat view is one of the most important views of the Sphinx app. UI Test coverage needs to be added in this view.

Note: Use branch test-flight

Files involved: NewChatViewController.swift Chat.storyboard

The goal is to test some basic UI interactions in the Chat view and their expected results.

  1. Add new test target to the project, XCUITest framework and any additional configuration needed to start adding UI tests.
  2. Implement the following test cases
patgarner commented 10 months ago

Please assign this one to me :)

patgarner commented 9 months ago

@tomastiminskas Are there dummy accounts with existing chats i should use as part of the test setup for these tests?

I presume you'll want these tests to run as part of the normal operation of the app (not as isolated components, etc.) and that these tests shouldn't require special configuration based on who is running them.

If I should set up some dummy accounts and associated chats with everything necessary to test this functionality, how would I go about setting up the dummy accounts?

tomastiminskas commented 9 months ago

@patgarner you are right about that. I guess those test items that would need a dummy account are the ones related to interactions with specific message type rows.

For those you can create a tribe on your account (with no members) and send those needed messages for the tests. Then you can detail in this tickets the needed messages and order for the tests to success. All the rest of the test items related to top and bottom bars of the chat view shouldn't need a dummy account or chat to success.

If you run into issues with the message type tests let's start with all the rest