[Toaster] [PATCH 1/2][v2] toaster-tests: remove click on disabled element in test

Elliot Smith elliot.smith at intel.com
Fri Jun 17 08:49:11 PDT 2016


On Firefox 47, attempting to click on the "Submit" button in
the test which attempts to create a project with a duplicate name
fails, as the button is not enabled if the name is a duplicate. This
also causes the test to fail.

Remove the call to the click() method which causes the test to fail.

Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 bitbake/lib/toaster/tests/browser/test_new_project_page.py | 8 ++------
 1 file changed, 2 insertions(+), 6 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 1b038ac..180a690 100644
--- a/bitbake/lib/toaster/tests/browser/test_new_project_page.py
+++ b/bitbake/lib/toaster/tests/browser/test_new_project_page.py
@@ -80,7 +80,7 @@ class TestNewProjectPage(SeleniumTestCase):
         """
         Should not be able to create a new project whose name is the same
         as an existing project
-       """
+        """
 
         project_name = "dupproject"
 
@@ -100,10 +100,6 @@ class TestNewProjectPage(SeleniumTestCase):
         self.assertTrue(("Project names must be unique" in element.text),
                         "Did not find unique project name error message")
 
-        # Try and click it anyway, if it submits we'll have a new project in
-        # the db and assert then
-        self.click("#create-project-button")
-
         self.assertTrue(
             (Project.objects.filter(name=project_name).count() == 1),
-            "New project not found in database")
+            "New project not found in database")
\ No newline at end of file
-- 
2.7.4



More information about the toaster mailing list