Exemplo n.º 1
0
    def test_rides_appear_in_my_rides(self, ride_factory: fixture,
                                      service: fixture) -> None:
        """Build an API ride, then check that the ride appears in the Upcoming tab."""
        ride: dict = ride_factory.create(account_ride=True, service=service)

        self.rides.visit()

        row = self.rides.rides_list.surface_ride_row(ride['ride_id'])
        assert row.ride_id == ride['ride_id']
Exemplo n.º 2
0
    def test_forgot_password__failure__no_account_found(
            self, user_factory: fixture) -> None:
        """Input an invalid email address, then check for a failure state.

        :param user_factory: A factory for generating user data.
        """
        user: User = user_factory.create(email=fake.email())

        self.forgot_password.visit()

        self.forgot_password.wait_for_page_to_load()
        self.forgot_password.fill_forgot_password_form(user)
        self.forgot_password.submit_button.click()

        assert MESSAGES.AUTH.USER_NOT_FOUND in self.forgot_password.errors.error_messages
Exemplo n.º 3
0
    def test_forgot_password__failure__min_email_entered(
            self, user_factory: fixture) -> None:
        """Input an invalid email address, then check for a failure state.

        :param user_factory: A factory for generating user data.
        """
        user: User = user_factory.create(email='')

        self.forgot_password.visit()

        self.forgot_password.wait_for_page_to_load()
        self.forgot_password.fill_forgot_password_form(user)
        self.forgot_password.submit_button.click()

        assert MESSAGES.AUTH.NO_EMAIL in self.forgot_password.errors.error_messages