def setUp(self):
        # create an org prior to registration. Bug in Code
        # added to pass CI
        create_organization()

        # country created so that phone number can be checked
        create_country()
    def setUp(self):
        # create an org prior to registration. Bug in Code
        # added to pass CI
        create_organization()

        # country created so that phone number can be checked
        create_country()
Esempio n. 3
0
 def setUp(self):
     """
     Method consists of statements to be executed before
     start of each test.
     """
     create_organization()
     # country created so that phone number can be checked
     create_country()
Esempio n. 4
0
 def setUp(self):
     """
     Method consists of statements to be executed before
     start of each test.
     """
     create_organization()
     # country created so that phone number can be checked
     create_country()
Esempio n. 5
0
 def test_check_report_volunteer(self):
     self.report_page.go_to_admin_report()
     country = create_country()
     state = create_state()
     city = create_city()
     credentials = {
         'username': '******',
         'first_name': 'VOLUNTEER-FIRST-NAME',
         'last_name': 'volunteer-last-name',
         'address': 'volunteer-address',
         'city': city,
         'state': state,
         'country': country,
         'phone_number': '9999999999',
         'email': '*****@*****.**'
     }
     org_name = 'volunteer-organization'
     org_obj = create_organization_with_details(org_name)
     vol = create_volunteer_with_details(credentials, org_obj)
     register_past_event_utility()
     register_past_job_utility()
     shift = register_past_shift_utility()
     start = datetime.time(hour=10, minute=0)
     end = datetime.time(hour=11, minute=0)
     logged_shift = log_hours_with_details(vol, shift, start, end)
     create_report_with_details(vol, logged_shift)
     report_page = self.report_page
     report_page.get_page(self.live_server_url,
                          PageUrls.administrator_report_page)
     self.assertEqual(report_page.get_volunteer_name(),
                      'VOLUNTEER-FIRST-NAME volunteer-last-name')
Esempio n. 6
0
 def setUp(self):
     """
     Method consists of statements to be executed before
     start of each test.
     """
     self.country = create_country()
     self.state = create_state()
     self.city = create_city()
Esempio n. 7
0
    def setUp(self):
        event = {
            'name': 'event',
            'start_date': '2015-02-05',
            'end_date': '2015-05-05',
            'description': 'event-description',
            'address': 'address',
            'venue': 'venue'
        }
        self.event_1 = create_event_with_details(event)
        country = create_country()
        state = create_state()
        city = create_city()
        self.event_1.city = city
        self.event_1.state = state
        self.event_1.country = country
        self.event_1.save()
        self.expected_result_one = {
            'event_name': 'event',
            'start_date': '2015-02-05',
            'end_date': '2015-05-05',
            'description': 'event-description',
            'address': 'address',
            'city': 'Roorkee',
            'state': 'Uttarakhand',
            'country': 'India',
            'venue': 'venue'
        }

        event = {
            'name': 'eventq',
            'start_date': '2050-02-05',
            'end_date': '2050-05-05',
            'description': 'eventq-description',
            'address': 'addressq',
            'venue': 'venueq'
        }
        self.event_2 = create_event_with_details(event)
        country2 = create_second_country()
        state2 = create_second_state()
        city2 = create_second_city()
        self.event_2.city = city2
        self.event_2.state = state2
        self.event_2.country = country2
        self.event_2.save()
        self.expected_result_two = {
            'event_name': 'eventq',
            'start_date': '2050-02-05',
            'end_date': '2050-05-05',
            'description': 'eventq-description',
            'address': 'addressq',
            'city': 'Bothell',
            'state': 'Washington',
            'country': 'United States',
            'venue': 'venueq'
        }
Esempio n. 8
0
    def test_check_volunteer_reports(self):
        search_page = self.search_page
        search_page.live_server_url = self.live_server_url

        country = create_country()
        state = create_state()
        city = create_city()
        credentials_1 = {
            'username': '******',
            'first_name': 'volunteer-first-name',
            'last_name': 'VOLUNTEER-LAST-NAME',
            'address': 'volunteer-address',
            'city': city,
            'state': state,
            'country': country,
            'phone_number': '9999999999',
            'email': '*****@*****.**'
        }
        org_name = 'volunteer-organization'
        org_obj = create_organization_with_details(org_name)
        vol = create_volunteer_with_details(credentials_1, org_obj)

        register_past_event_utility()
        register_past_job_utility()
        shift = register_past_shift_utility()
        start = datetime.time(hour=10, minute=0)
        end = datetime.time(hour=11, minute=0)
        logged_shift = log_hours_with_details(vol, shift, start, end)
        report = create_report_with_details(vol, logged_shift)
        report.confirm_status = 1
        report.save()

        search_page.navigate_to_volunteer_search_page()
        search_page.submit_form()

        self.assertEqual(
            search_page.element_by_xpath(self.elements.VIEW_REPORTS).text,
            'View')
        search_page.element_by_xpath(self.elements.VIEW_REPORTS +
                                     '//a').click()
        self.assertEqual(
            search_page.remove_i18n(self.driver.current_url),
            self.live_server_url + PageUrls.volunteer_history_page +
            str(vol.id))
        self.verify_report_details('1')
Esempio n. 9
0
 def create_volunteer():
     country = create_country()
     state = create_state()
     city = create_city()
     vol = {
         'username': "******",
         'first_name': "Son",
         'last_name': "Goku",
         'address': "Kame House",
         'city': city,
         'state': state,
         'country': country,
         'phone_number': "9999999999",
         'email': "*****@*****.**"
     }
     org_name = 'Google'
     org_obj = create_organization_with_details(org_name)
     return create_volunteer_with_details(vol, org_obj)
Esempio n. 10
0
    def setUp(self):
        """
        Method consists of statements to be executed before
        start of each test
        """
        e1 = create_event_with_details(self.event_1)
        e2 = create_event_with_details(self.event_2)
        country = create_country()
        state = create_state()
        city = create_city()
        e1.city = city
        e1.state = state
        e1.country = country
        e1.save()

        create_admin()
        city_name = 'Bothell'
        second_city = get_city_by_name(city_name)
        state_name = 'Washington'
        second_state = get_state_by_name(state_name)
        country_name = 'United States'
        second_country = get_country_by_name(country_name)
        e2.city = second_city
        e2.state = second_state
        e2.country = second_country
        e2.save()
        job_1 = {
            'name': 'job-name',
            'start_date': '2050-06-10',
            'end_date': '2050-06-11',
            'description': 'job-description',
            'event': e1
        }
        job_2 = {
            'name': 'job-nameq',
            'start_date': '2050-05-15',
            'end_date': '2050-05-20',
            'description': 'job-description',
            'event': e2
        }
        j1 = create_job_with_details(job_1)
        j2 = create_job_with_details(job_2)
        self.login_admin()
        self.wait_for_home_page()
Esempio n. 11
0
 def setUp(self):
     """
     Method consists of statements to be executed before
     start of each test.
     """
     country = create_country()
     state = create_state()
     city = create_city()
     vol = {
         'username': '******',
         'first_name': "Son",
         'last_name': "Goku",
         'address': "Kame House",
         'city': city,
         'state': state,
         'country': country,
         'phone_number': "9999999999",
         'email': "*****@*****.**"
     }
     org_name = 'Detective'
     org_obj = create_organization_with_details(org_name)
     self.volunteer_1 = create_volunteer_with_details(vol, org_obj)
     self.login_correctly()
Esempio n. 12
0
def setUpModule():
    """
    Creates events, jobs and shifts which can be reused by multiple test classes
    """

    global e1, e2, e3, e4, e5
    global j1, j2, j3, j4, j5
    global s1, s2, s3, s4
    global city, state, country

    country = create_country()
    state = create_state()
    city = create_city()
    event_1 = {
        'name': "Open Source Event",
        'start_date': "2012-10-22",
        'end_date': "2012-10-23",
        'description': 'event-description',
        'address': 'event-address',
        'venue': 'event-venue'
    }
    event_2 = {
        'name': "Python Event",
        'start_date': "2013-11-12",
        'end_date': "2013-11-13",
        'description': 'event-description',
        'address': 'event-address',
        'venue': 'event-venue'
    }
    event_3 = {
        'name': "Django Event",
        'start_date': "2015-07-02",
        'end_date': "2015-07-03",
        'description': 'event-description',
        'address': 'event-address',
        'venue': 'event-venue'
    }
    event_4 = {
        'name': "Systers Event",
        'start_date': "2015-07-25",
        'end_date': "2015-08-08",
        'description': 'event-description',
        'address': 'event-address',
        'venue': 'event-venue'
    }
    event_5 = {
        'name': "Anita Borg Event",
        'start_date': "2015-07-07",
        'end_date': "2015-07-08",
        'description': 'event-description',
        'address': 'event-address',
        'venue': 'event-venue'
    }

    e1 = create_event_with_details(event_1)
    e2 = create_event_with_details(event_2)
    e3 = create_event_with_details(event_3)
    e4 = create_event_with_details(event_4)
    e5 = create_event_with_details(event_5)

    job_1 = {
        'name': "Software Developer",
        'start_date': "2012-10-22",
        'end_date': "2012-10-23",
        'description': "A software job",
        'event': e1
    }
    job_2 = {
        'name': "Systems Administrator",
        'start_date': "2013-11-12",
        'end_date': "2013-11-13",
        'description': "A systems administrator job",
        'event': e2
    }
    job_3 = {
        'name': "Backend Dev",
        'start_date': "2012-10-8",
        'end_date': "2012-10-16",
        'description': "A java developer job",
        'event': e4
    }

    job_4 = {
        'name': "Instructor",
        'start_date': "2012-10-22",
        'end_date': "2012-10-23",
        'description': "",
        'event': e4
    }
    job_5 = {
        'name': "Instructor",
        'start_date': "2012-10-22",
        'end_date': "2012-10-23",
        'description': "",
        'event': e3
    }

    j1 = create_job_with_details(job_1)
    j2 = create_job_with_details(job_2)
    j3 = create_job_with_details(job_3)
    j4 = create_job_with_details(job_4)
    j5 = create_job_with_details(job_5)

    # shifts with limited, plenty and no slots
    shift_1 = {
        'date': "2012-10-23",
        'start_time': "9:00",
        'end_time': "15:00",
        'max_volunteers': 1,
        'job': j1,
        'address': 'shift-address',
        'venue': 'shift-venue'
    }
    shift_2 = {
        'date': "2012-10-23",
        'start_time': "10:00",
        'end_time': "16:00",
        'max_volunteers': 2,
        'job': j1,
        'address': 'shift-address',
        'venue': 'shift-venue'
    }
    shift_3 = {
        'date': "2012-11-12",
        'start_time': "12:00",
        'end_time': "18:00",
        'max_volunteers': 4,
        'job': j2,
        'address': 'shift-address',
        'venue': 'shift-venue'
    }
    shift_4 = {
        'date': "2012-10-23",
        'start_time': "10:00",
        'end_time': "18:00",
        'max_volunteers': 1,
        'job': j4,
        'address': 'shift-address',
        'venue': 'shift-venue'
    }

    s1 = create_shift_with_details(shift_1)
    s2 = create_shift_with_details(shift_2)
    s3 = create_shift_with_details(shift_3)
    s4 = create_shift_with_details(shift_4)
Esempio n. 13
0
    def test_volunteer_country_field(self):
        """
        Test volunteer search form using the country field of the volunteers.
        """
        search_page = self.search_page
        search_page.live_server_url = self.live_server_url
        search_page.navigate_to_volunteer_search_page()

        country = create_country()
        state = create_state()
        city = create_city()
        credentials_1 = {
            'username': '******',
            'first_name': 'volunteer-first-name',
            'last_name': 'volunteer-last-name',
            'address': 'volunteer-address',
            'city': city,
            'state': state,
            'country': country,
            'phone_number': '9999999999',
            'email': '*****@*****.**'
        }

        org_name = 'volunteer-organization'
        org_obj = create_organization_with_details(org_name)
        volunteer_1 = create_volunteer_with_details(credentials_1, org_obj)

        country_name = 'United States'
        state_name = 'Washington'
        city_name = 'Bothell'
        second_country = get_country_by_name(country_name)
        second_state = get_state_by_name(state_name)
        second_city = get_city_by_name(city_name)
        credentials_2 = {
            'username': '******',
            'first_name': 'volunteer-first-nameq',
            'last_name': 'volunteer-last-nameq',
            'address': 'volunteer-addressq',
            'city': second_city,
            'state': second_state,
            'country': second_country,
            'phone_number': '9999999999',
            'email': '*****@*****.**'
        }

        org_name = 'volunteer-organizationq'
        org_obj = create_organization_with_details(org_name)
        volunteer_2 = create_volunteer_with_details(credentials_2, org_obj)

        expected_result_one = [
            'volunteer-first-name', 'volunteer-last-name', 'volunteer-address',
            'Roorkee,', 'Uttarakhand,', 'India', 'Uttarakhand,', 'India',
            'India', 'volunteer-organization', '9999999999',
            '*****@*****.**', 'View'
        ]

        expected_result_two = [
            'volunteer-first-nameq', 'volunteer-last-nameq',
            'volunteer-addressq', 'Bothell,', 'Washington,', 'United',
            'States', 'Washington,', 'United', 'States', 'United', 'States',
            'volunteer-organizationq', '9999999999',
            '*****@*****.**', 'View'
        ]

        search_page.search_country_field('India')
        search_page.submit_form()
        search_results = search_page.get_search_results()
        result = search_page.get_results_list(search_results)
        self.assertEqual(len(result), 1)
        self.assertTrue(expected_result_one in result)

        search_page.search_country_field('United States')
        search_page.submit_form()
        search_results = search_page.get_search_results()
        result = search_page.get_results_list(search_results)

        self.assertEqual(len(result), 1)
        self.assertTrue(expected_result_two in result)

        search_page.search_country_field('vol-')
        search_page.submit_form()

        self.assertRaisesRegexp(NoSuchElementException,
                                'Unable to locate element: //table//tbody',
                                search_page.get_search_results)

        search_page.search_country_field('volunteer-fail-test')
        search_page.submit_form()

        self.assertRaisesRegexp(NoSuchElementException,
                                'Unable to locate element: //table//tbody',
                                search_page.get_search_results)

        search_page.search_country_field('!@#$%^&*()_')
        search_page.submit_form()
        self.assertNotEqual(search_page.get_help_block(), None)
Esempio n. 14
0
    def test_volunteer_valid_organization_field(self):
        """
        Test volunteer search form using the
        organization field of the volunteers.
        """
        search_page = self.search_page
        search_page.live_server_url = self.live_server_url

        country = create_country()
        state = create_state()
        city = create_city()
        credentials_1 = {
            'username': '******',
            'first_name': 'volunteer-first-name',
            'last_name': 'volunteer-last-name',
            'address': 'volunteer-address',
            'city': city,
            'state': state,
            'country': country,
            'phone_number': '9999999999',
            'email': '*****@*****.**'
        }
        org_name = 'volunteer-organization'
        org_obj = create_organization_with_details(org_name)
        volunteer_1 = create_volunteer_with_details(credentials_1, org_obj)

        credentials_2 = {
            'username': '******',
            'first_name': 'volunteer-first-nameq',
            'last_name': 'volunteer-last-nameq',
            'address': 'volunteer-addressq',
            'city': city,
            'state': state,
            'country': country,
            'phone_number': '9999999999',
            'email': '*****@*****.**'
        }

        org_name = 'volunteer-organizationq'
        org_obj = create_organization_with_details(org_name)
        volunteer_2 = create_volunteer_with_details(credentials_2, org_obj)

        expected_result_one = [
            'volunteer-first-name', 'volunteer-last-name', 'volunteer-address',
            'Roorkee,', 'Uttarakhand,', 'India', 'Uttarakhand,', 'India',
            'India', 'volunteer-organization', '9999999999',
            '*****@*****.**', 'View'
        ]

        expected_result_two = [
            'volunteer-first-nameq', 'volunteer-last-nameq',
            'volunteer-addressq', 'Roorkee,', 'Uttarakhand,', 'India',
            'Uttarakhand,', 'India', 'India', 'volunteer-organizationq',
            '9999999999', '*****@*****.**', 'View'
        ]

        search_page.navigate_to_volunteer_search_page()
        search_page.search_organization_field('volunteer')
        search_page.submit_form()
        search_results = search_page.get_search_results()
        result = search_page.get_results_list(search_results)

        self.assertEqual(len(result), 2)
        self.assertTrue(expected_result_one in result)
        self.assertTrue(expected_result_two in result)

        search_page.navigate_to_volunteer_search_page()
        search_page.search_organization_field('v')
        search_page.submit_form()
        search_results = search_page.get_search_results()
        result = search_page.get_results_list(search_results)

        self.assertEqual(len(result), 2)
        self.assertTrue(expected_result_one in result)
        self.assertTrue(expected_result_two in result)
Esempio n. 15
0
    def test_intersection_of_all_fields(self):
        """
        Test volunteer search form using multiple fields of the volunteers.
        """
        search_page = self.search_page
        search_page.live_server_url = self.live_server_url

        country = create_country()
        state = create_state()
        city = create_city()
        credentials_1 = {
            'username': '******',
            'first_name': 'volunteer-first-name',
            'last_name': 'volunteer-last-name',
            'address': 'volunteer-address',
            'city': city,
            'state': state,
            'country': country,
            'phone_number': '9999999999',
            'email': '*****@*****.**'
        }

        org_name = 'volunteer-organization'
        org_obj = create_organization_with_details(org_name)
        volunteer_1 = create_volunteer_with_details(credentials_1, org_obj)

        credentials_2 = {
            'username': '******',
            'first_name': 'volunteer-first-nameq',
            'last_name': 'volunteer-last-nameq',
            'address': 'volunteer-addressq',
            'city': city,
            'state': state,
            'country': country,
            'phone_number': '9999999999',
            'email': '*****@*****.**'
        }

        org_name = 'volunteer-organizationq'
        org_obj = create_organization_with_details(org_name)
        volunteer_2 = create_volunteer_with_details(credentials_2, org_obj)

        search_page.navigate_to_volunteer_search_page()

        search_page.search_first_name_field('volunteer')
        search_page.search_last_name_field('volunteer')
        search_page.search_city_field('Roorkee')
        search_page.search_state_field('Uttarakhand')
        search_page.search_country_field('India')
        search_page.search_organization_field('volunteer')
        search_page.submit_form()
        search_results = search_page.get_search_results()
        result = search_page.get_results_list(search_results)

        register_event_utility()
        register_job_utility()
        shift = register_shift_utility()
        register_volunteer_for_shift_utility(shift, volunteer_1)
        register_volunteer_for_shift_utility(shift, volunteer_2)

        expected_result_one = [
            'volunteer-first-name', 'volunteer-last-name', 'volunteer-address',
            'Roorkee,', 'Uttarakhand,', 'India', 'Uttarakhand,', 'India',
            'India', 'volunteer-organization', '9999999999',
            '*****@*****.**', 'View'
        ]

        expected_result_two = [
            'volunteer-first-nameq', 'volunteer-last-nameq',
            'volunteer-addressq', 'Roorkee,', 'Uttarakhand,', 'India',
            'Uttarakhand,', 'India', 'India', 'volunteer-organizationq',
            '9999999999', '*****@*****.**', 'View'
        ]

        search_page.navigate_to_volunteer_search_page()
        search_page.search_first_name_field('volunteer')
        search_page.search_last_name_field('volunteer')
        search_page.search_city_field('Roorkee')
        search_page.search_state_field('Uttarakhand')
        search_page.search_country_field('India')
        search_page.search_organization_field('volunteer')
        search_page.search_event_field('event')
        search_page.search_job_field('job')
        search_page.submit_form()
        search_results = search_page.get_search_results()
        result = search_page.get_results_list(search_results)
        self.assertEqual(len(result), 2)
        self.assertTrue(expected_result_one in result)
        self.assertTrue(expected_result_two in result)

        search_page.search_first_name_field('volunteer')
        search_page.search_country_field('wrong-country')
        search_page.search_organization_field('org')
        search_page.submit_form()
        self.assertRaisesRegexp(NoSuchElementException,
                                'Unable to locate element: //table//tbody',
                                search_page.get_search_results)

        search_page.search_last_name_field('volunteer')
        search_page.search_city_field('wrong-city')
        search_page.submit_form()
        self.assertRaisesRegexp(NoSuchElementException,
                                'Unable to locate element: //table//tbody',
                                search_page.get_search_results)
Esempio n. 16
0
    def test_event_country_field(self):
        """
        Test search results for event country field
        """
        search_page = self.search_page
        search_page.live_server_url = self.live_server_url
        search_page.navigate_to_event_search_page()

        credentials_1 = {
            'name': 'event-name',
            'start_date': '2015-01-01',
            'end_date': '2015-03-01',
            'description': 'event-description',
            'address': 'event-address',
            'venue': 'event-venue'
        }

        country = create_country()
        event_1 = create_event_with_details(credentials_1)
        event_1.country = country
        event_1.save()

        credentials_2 = {
            'name': 'event-nameq',
            'start_date': '2015-02-01',
            'end_date': '2015-04-01',
            'description': 'event-description',
            'address': 'event-address',
            'venue': 'event-venue'
        }

        country_name = 'United States'
        second_country = get_country_by_name(country_name)
        event_2 = create_event_with_details(credentials_2)
        event_2.country = second_country
        event_2.save()

        expected_result_one = [
            'event-name', 'Jan.', '1,', '2015', 'March',
            '1,', '2015', 'Details', 'Edit', 'Delete'
        ]
        expected_result_two = [
            'event-nameq', 'Feb.', '1,', '2015', 'April',
            '1,', '2015', 'Details', 'Edit', 'Delete'
        ]

        search_page.search_country_field('India')
        search_page.submit_form()
        search_results = search_page.get_search_results()
        result = search_page.get_results_list(search_results)
        self.assertEqual(len(result), 1)
        self.assertTrue(expected_result_one in result)

        search_page.search_country_field('United States')
        search_page.submit_form()
        search_results = search_page.get_search_results()
        result = search_page.get_results_list(search_results)
        self.assertEqual(len(result), 1)
        self.assertTrue(expected_result_two in result)

        search_page.search_country_field('eve-')
        search_page.submit_form()
        self.assertRaisesRegexp(NoSuchElementException,
                                'Unable to locate element: //table//tbody',
                                search_page.get_search_results)

        search_page.search_country_field('event-fail-test')
        search_page.submit_form()
        self.assertRaisesRegexp(NoSuchElementException,
                                'Unable to locate element: //table//tbody',
                                search_page.get_search_results)

        search_page.search_country_field('!@#$%^&*()_')
        search_page.submit_form()
        self.assertNotEqual(search_page.get_help_block(), None)
Esempio n. 17
0
    def test_intersection_of_all_fields(self):
        """
        Test search results for different combinations of
        event name, start date, end date, city, state, country and job
        """
        search_page = self.search_page
        search_page.live_server_url = self.live_server_url

        credentials_1 = {
            'name': 'event-name',
            'start_date': '2015-01-01',
            'end_date': '2015-03-01',
            'description': 'event-description',
            'address': 'event-address',
            'venue': 'event-venue'
        }

        country = create_country()
        state = create_state()
        city = create_city()
        event_1 = create_event_with_details(credentials_1)
        event_1.country = country
        event_1.state = state
        event_1.city = city
        event_1.save()
        job = {
            'name': 'job',
            'start_date': '2015-02-01',
            'end_date': '2015-02-15',
            'description': 'descriptionq',
            'event': event_1
        }
        job_1 = create_job_with_details(job)

        credentials_2 = {
            'name': 'event-nameq',
            'start_date': '2015-02-01',
            'end_date': '2015-04-01',
            'description': 'event-description',
            'address': 'event-address',
            'venue': 'event-venue'
        }
        event_2 = create_event_with_details(credentials_2)
        country_name = 'United States'
        state_name = 'Washington'
        city_name = 'Bothell'
        second_country = get_country_by_name(country_name)
        second_state = get_state_by_name(state_name)
        second_city = get_city_by_name(city_name)
        event_2.country = second_country
        event_2.state = second_state
        event_2.city = second_city
        event_2.save()
        job = {
            'name': 'jobq',
            'start_date': '2015-02-02',
            'end_date': '2015-02-15',
            'description': 'job-description',
            'event': event_2
        }
        job_2 = create_job_with_details(job)

        expected_result_one = [
            'event-name', 'Jan.', '1,', '2015', 'March',
            '1,', '2015', 'Details', 'Edit', 'Delete'
        ]
        expected_result_two = [
            'event-nameq', 'Feb.', '1,', '2015', 'April',
            '1,', '2015', 'Details', 'Edit', 'Delete'
        ]
        search_page.navigate_to_event_search_page()

        search_page.search_name_field('event')
        search_page.search_start_date_field('2015-01-01')
        search_page.search_end_date_field('2015-04-01')
        search_page.search_state_field('Uttarakhand')
        search_page.search_country_field('India')
        search_page.search_job_field('job')
        search_page.submit_form()
        search_results = search_page.get_search_results()
        result = search_page.get_results_list(search_results)
        self.assertTrue(expected_result_one in result)

        search_page.search_name_field('event')
        search_page.search_country_field('wrong-country')
        search_page.search_job_field(job_1.id)
        search_page.submit_form()
        self.assertRaisesRegexp(NoSuchElementException,
                                'Unable to locate element: //table//tbody',
                                search_page.get_search_results)

        search_page.search_state_field('event')
        search_page.search_city_field('wrong-city')
        search_page.submit_form()
        self.assertRaisesRegexp(NoSuchElementException,
                                'Unable to locate element: //table//tbody',
                                search_page.get_search_results)