Class JoinEventTest

java.lang.Object
com.example.breeze_seas.JoinEventTest

public class JoinEventTest extends Object
Test for the Event Joining functionality.
  • Constructor Details

    • JoinEventTest

      public JoinEventTest()
  • Method Details

    • setup

      public void setup() throws InterruptedException
      Sets up the test environment before every test case.
      Throws:
      InterruptedException - if synchronization latches time out.
    • cleanup

      public void cleanup() throws InterruptedException
      Performs final cleanup of the Firestore environment after test completion.
      Throws:
      InterruptedException - if cleanup synchronization fails.
    • testJoinWaitingList

      public void testJoinWaitingList() throws InterruptedException
      Verifies the complete UI-to-Database flow for joining an event. Launches EventDetailsFragment in an initial state. Mocks the Fragment backstack to prevent errors. Populates ViewModels with a mock User and Event. 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.