1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3
# Copyright (C) 2013, 2014 Canonical Ltd
5
# This program is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License version 3 as
7
# published by the Free Software Foundation.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License
15
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18
Calendar app autopilot tests for the agenda view.
21
from __future__ import absolute_import
25
from calendar_app.tests import CalendarAppTestCaseWithVcard
27
from calendar_app import data
29
logger = logging.getLogger(__name__)
32
class TestAgendaView(CalendarAppTestCaseWithVcard):
35
super(TestAgendaView, self).setUp()
36
self.agenda_view = self.app.main_view.go_to_agenda_view()
38
def test_selecting_event_opens_it(self):
39
test_event = data.Event.make_unique()
41
new_event_page = self.app.main_view.go_to_new_event()
42
new_event_page.add_event(test_event)
44
self.agenda_view.open_event(test_event.name)
45
event_details_page = self.app.main_view.get_event_details()
46
event_details = event_details_page.get_event_information()
48
self.assertEquals(event_details.name, test_event.name)
49
self.assertEquals(event_details.description, test_event.description)
50
self.assertEquals(event_details.calendar, test_event.calendar)
51
self.assertEquals(event_details.location, test_event.location)
52
self.assertEquals(event_details.guests, test_event.guests)