def test_events_icalendar_export(self, mozwebqa): events_page = Events(mozwebqa) events_page.go_to_events_page() response = requests.get(events_page.events_icalendar_export_button_url) icalendar = Calendar.from_ical(response.text) icalendar_events_count = len(filter(lambda c: c.name == 'VEVENT', icalendar.walk())) Assert.equal(icalendar_events_count, events_page.event_items_count)
def test_events_icalendar_export(self, mozwebqa): events_page = Events(mozwebqa) events_page.go_to_events_page() response = requests.get(events_page.events_icalendar_export_button_url) icalendar = Calendar.from_ical(response.text) icalendar_events_count = len( filter(lambda c: c.name == 'VEVENT', icalendar.walk())) Assert.equal(icalendar_events_count, events_page.event_items_count)
def test_filter_results_by_owner(self, mozwebqa): query = u'John Giannelos' events_page = Events(mozwebqa) events_page.go_to_events_page() events_page.filter_for(query) Assert.equal(u'John Giannelos', events_page.event_profile_owner_text)
def test_events_table_is_visible(self, mozwebqa): events_page = Events(mozwebqa) events_page.go_to_events_page() Assert.true(events_page.is_events_table_visible)
def test_filter_results_by_location(self, mozwebqa): query = u'Greece' events_page = Events(mozwebqa) events_page.go_to_events_page() events_page.filter_for(query) Assert.contains(u'Greece', events_page.event_profile_location_text)
def test_advanced_options_are_visible(self, mozwebqa): events_page = Events(mozwebqa) events_page.go_to_events_page() events_page.click_advanced_options() Assert.true(events_page.is_advanced_search_form_visible) Assert.true(events_page.is_events_icalendar_export_button_visible)
def test_events_timeline_is_visible(self, mozwebqa): events_page = Events(mozwebqa) events_page.go_to_events_page() events_page.click_timeline() events_page.wait_for_page_to_load() Assert.true(events_page.is_events_timeline_visible)
def click_events_link(self): self.selenium.find_element(*self._events_locator).click() from pages.events import Events return Events(self.testsetup)