~ps-jenkins/ubuntu-ui-extras/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/autopilot/ubuntu_ui_extras/browser/tests/test_errorsheet.py

  • Committer: Ugo Riboni
  • Date: 2013-07-02 19:40:38 UTC
  • Revision ID: ugo.riboni@canonical.com-20130702194038-v9l2q3v2xxjjxn8v
Remove all browser work and leave only an example component and skeleton build system

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
#
3
 
# Copyright 2013 Canonical
4
 
#
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.
8
 
 
9
 
from __future__ import absolute_import
10
 
 
11
 
from testtools.matchers import Equals
12
 
from autopilot.matchers import Eventually
13
 
 
14
 
from ubuntu_ui_extras.browser.tests import BrowserTestCaseBase
15
 
 
16
 
 
17
 
class TestErrorSheet(BrowserTestCaseBase):
18
 
 
19
 
    """Tests the error message functionality."""
20
 
 
21
 
    def setUp(self):
22
 
        super(TestErrorSheet, self).setUp()
23
 
        self.open_html_page()
24
 
 
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)))