Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 6544DE0049A; Tue, 2 Aug 2016 07:50:46 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.192.174 listed in list.dnswl.org] Received: from mail-pf0-f174.google.com (mail-pf0-f174.google.com [209.85.192.174]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 12D93E0043B for ; Tue, 2 Aug 2016 07:50:41 -0700 (PDT) Received: by mail-pf0-f174.google.com with SMTP id h186so67031932pfg.3 for ; Tue, 02 Aug 2016 07:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=+2R15TS8uS/FLgv+oVeVROcFkwwChnLa64xHahlWSCs=; b=1KEhPvMEzfX1XiUJI+YEmZOL7lC80T+IIAE0gbjtNJXa88cf71vyBcU6uSgMu1Z2lh nl486YOHYrxZYW3+2jYe6ojEPIF/AyPLA+tOtLJg0bcgqQgIgd1XgZs0TZK1Ce8waRAc XvspmiJFI4Y30w22IhjYx+DCOSuwXWXWLwOCLQjcMq1Qzn9hBF+3oKba5I07iqytyrlM mIGK3foxUKcLJyECGp9rewsmdf0/ivHiEy3/anhM52EAoTKYeMCzsDzZGiqh6nx1KgJI kTPYYcu5x0eKwwS/J0R/iCaSWDe1/t6IEqXVsbuenJaDYPDPHjNt4Y2dUKJGv9UYcyTn j51w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+2R15TS8uS/FLgv+oVeVROcFkwwChnLa64xHahlWSCs=; b=JY5Pt3olo+o0+D++Nhozj5B6eKyOM0ynv3WAOrDq1peNEJetDXt082FuuBIi9Vv6MX 6GZjuKf42EM12MgTOQRDn45LrtxTi0zuUomnB/Cfnb34YC4AAoJ4H03OX8QOm8lOHC5r Mxvfdj3H8dv5SwzBxFRiMHsFLjC1nf3xKvUnL+a7Rie7fkzGHkveXM1Cbn9Ckx4qK/gK lZU2X9oo/T9GIKq0C3fdZwVAOWaXN/15HOOo2JcnDOpRHFcxoll/gvmzb3QX2QAndoNa vTFTvYzRtaHlUuPHMas2Y0JG/aPbQ6TSYWkPN37emNmkIESjMJd6tUd8hBHWhY64v7Y/ +mAw== X-Gm-Message-State: AEkoouv9RAUiZkpbE1S8bM/kPvXnJ3gpPKaFSZiqsgSGdwlA90NxjH+UTqD4rN6BgnKau8Cr X-Received: by 10.98.58.73 with SMTP id h70mr105780774pfa.125.1470149438414; Tue, 02 Aug 2016 07:50:38 -0700 (PDT) Received: from orion.ger.corp.intel.com (fmdmzpr02-ext.fm.intel.com. [192.55.55.37]) by smtp.gmail.com with ESMTPSA id d3sm5537410pfk.37.2016.08.02.07.50.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Aug 2016 07:50:37 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Tue, 2 Aug 2016 15:50:31 +0100 Message-Id: <1470149431-16854-1-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [PATCH] toaster: tests test_new_project_page Catch button not enabled exception X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2016 14:50:46 -0000 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] Signed-off-by: Michael Wood --- bitbake/lib/toaster/tests/browser/test_new_project_page.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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..77e5f15 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 @@ from django.core.urlresolvers import reverse from tests.browser.selenium_helpers import SeleniumTestCase from selenium.webdriver.support.ui import Select +from selenium.common.exceptions import InvalidElementStateException from orm.models import Project, Release, BitbakeVersion @@ -102,7 +103,10 @@ class TestNewProjectPage(SeleniumTestCase): # 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") + try: + self.click("#create-project-button") + except InvalidElementStateException: + pass self.assertTrue( (Project.objects.filter(name=project_name).count() == 1), -- 2.7.4