Package com.example.breeze_seas
Class JoinEventTest
java.lang.Object
com.example.breeze_seas.JoinEventTest
Test for the
Event Joining functionality.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JoinEventTest
public JoinEventTest()
-
-
Method Details
-
setup
Sets up the test environment before every test case.- Throws:
InterruptedException- if synchronization latches time out.
-
cleanup
Performs final cleanup of the Firestore environment after test completion.- Throws:
InterruptedException- if cleanup synchronization fails.
-
testJoinWaitingList
Verifies the complete UI-to-Database flow for joining an event. LaunchesEventDetailsFragmentin an initial state. Mocks the Fragment backstack to prevent errors. Populates ViewModels with a mockUserandEvent. Transitions the fragment to RESUMED and uses Espresso to click "Join". Confirms the Terms invalid input: '&' Conditions dialog and accepts it. Queries the real Firestore sub-collection to verify the user exists with "waiting" status.- Throws:
InterruptedException- if the background Firestore write or latches time out.
-