1
# -*- coding: utf-8 -*-
3
# Copyright 2013 Canonical
5
# This program is free software: you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 3, as published
7
# by the Free Software Foundation.
9
from __future__ import absolute_import
11
from testtools.matchers import Equals
12
from autopilot.matchers import Eventually
14
from webbrowser_app.tests import StartOpenLocalPageTestCaseBase
17
class TestErrorSheet(StartOpenLocalPageTestCaseBase):
19
"""Tests the error message functionality."""
21
def test_invalid_url_triggers_error_message(self):
22
error = self.main_window.get_error_sheet()
23
self.assertThat(error.visible, Equals(False))
24
self.go_to_url("htpp://invalid")
25
self.assertThat(error.visible, Eventually(Equals(True)))