summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-08-05 09:26:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-11 00:07:09 +0100
commita1629a2b26064a7ab2ac62b9a2d88339d3b3c871 (patch)
tree5c82e3f1c200d9d44d0adce75fc22cf9d2efccb3 /bitbake
parentcae9e6f695be744688a5bacce6b49f2db26cbc37 (diff)
downloadpoky-a1629a2b26064a7ab2ac62b9a2d88339d3b3c871.tar.gz
bitbake: toaster: tests test_new_project_page Catch button not enabled exception
When using firefox and selenium we get an exception generated when a disabled button click is attempted. This should happen in the test but we need to catch the exception to make sure it doesn't cause the test to fail. [YOCTO #10056] (Bitbake rev: 06f74fe91f8e162f49a4e856a62a97093b48262a) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/tests/browser/test_new_project_page.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/tests/browser/test_new_project_page.py b/bitbake/lib/toaster/tests/browser/test_new_project_page.py
index 1b038acb96..77e5f15267 100644
--- a/bitbake/lib/toaster/tests/browser/test_new_project_page.py
+++ b/bitbake/lib/toaster/tests/browser/test_new_project_page.py
@@ -22,6 +22,7 @@
22from django.core.urlresolvers import reverse 22from django.core.urlresolvers import reverse
23from tests.browser.selenium_helpers import SeleniumTestCase 23from tests.browser.selenium_helpers import SeleniumTestCase
24from selenium.webdriver.support.ui import Select 24from selenium.webdriver.support.ui import Select
25from selenium.common.exceptions import InvalidElementStateException
25 26
26from orm.models import Project, Release, BitbakeVersion 27from orm.models import Project, Release, BitbakeVersion
27 28
@@ -102,7 +103,10 @@ class TestNewProjectPage(SeleniumTestCase):
102 103
103 # Try and click it anyway, if it submits we'll have a new project in 104 # Try and click it anyway, if it submits we'll have a new project in
104 # the db and assert then 105 # the db and assert then
105 self.click("#create-project-button") 106 try:
107 self.click("#create-project-button")
108 except InvalidElementStateException:
109 pass
106 110
107 self.assertTrue( 111 self.assertTrue(
108 (Project.objects.filter(name=project_name).count() == 1), 112 (Project.objects.filter(name=project_name).count() == 1),