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 ubuntu_ui_extras.browser.tests import BrowserTestCaseBase
17
class TestErrorSheet(BrowserTestCaseBase):
19
"""Tests the error message functionality."""
22
super(TestErrorSheet, self).setUp()
25
def test_invalid_url_triggers_error_message(self):
26
error = self.main_window.get_error_sheet()
27
self.assertThat(error.visible, Equals(False))
28
self.go_to_url("htpp://invalid")
29
self.assertThat(error.visible, Eventually(Equals(True)))