So, if we want to start application with existing data folder, this data folder should be present in the location in advance, before the test starts
I think , a solution here could be that we mark tests that use predefined data somehow, and then we create if condition for startaut function to recognise some flag - if the tests do need data in advance (we create it and put into repository), then execute command with certain hardcoded path (where the data folder lives) , else create new account (new data folder with random name as we have now)
maybe we can fix something here
if user_data is not None:
user_data.copy_to(self.app_data / 'data')
All the tests with predefined user data are not working with this data. New accounts are created instead. That has to be fixed.
Examples:
https://github.com/status-im/desktop-qa-automation/blob/229471cee3e6c006880457c526617414c67e454f/tests/messages/test_messaging_group_chat.py
https://github.com/status-im/desktop-qa-automation/blob/229471cee3e6c006880457c526617414c67e454f/tests/communities/test_communities_pin_and_unpin_messages.py
The local db for account is stored in local_run_results folder (when running tests locally) This is being taken from this
-d
parameter here https://github.com/status-im/desktop-qa-automation/blob/229471cee3e6c006880457c526617414c67e454f/driver/aut.py#L118So, if we want to start application with existing data folder, this data folder should be present in the location in advance, before the test starts
I think , a solution here could be that we mark tests that use predefined data somehow, and then we create if condition for startaut function to recognise some flag - if the tests do need data in advance (we create it and put into repository), then execute command with certain hardcoded path (where the data folder lives) , else create new account (new data folder with random name as we have now)
maybe we can fix something here
https://github.com/status-im/desktop-qa-automation/blob/229471cee3e6c006880457c526617414c67e454f/driver/aut.py#L27