Motivation
Currently, tests that require firebase interactions are extremely flaky (e.g. for testing the interaction with entries in the dashboard component). For data seeding, they rely on creating postings and responses through clicks in the corresponding components. Instead, we should have a central utility that manages all interactions with firebase, namely:
- posting help entries (ask-for-help collection)
- creating responses (ask-for-help collection)
- reporting entries (reported-posts collection)
- marking entries as solved (solved-posts collection)
This utility can then be reused in the components where we interact with firebase. Finally, it can be used to easily seed the collections for testing.
Motivation
Currently, tests that require firebase interactions are extremely flaky (e.g. for testing the interaction with entries in the dashboard component). For data seeding, they rely on creating postings and responses through clicks in the corresponding components. Instead, we should have a central utility that manages all interactions with firebase, namely:
This utility can then be reused in the components where we interact with firebase. Finally, it can be used to easily seed the collections for testing.