Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id D0A46E00D44; Thu, 29 Sep 2016 08:03:13 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE 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.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [74.125.82.44 listed in list.dnswl.org] Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 5A494E00D29 for ; Thu, 29 Sep 2016 08:03:10 -0700 (PDT) Received: by mail-wm0-f44.google.com with SMTP id w72so32584071wmf.1 for ; Thu, 29 Sep 2016 08:03:09 -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:in-reply-to:references; bh=fuvfQ1qyrUyQY5VgYwh5I30/PsSAGk8lRa94m4Hs6+g=; b=YrF2tXgtLyqxL0G1Mg10Fr6hDOxTVQI52dHrQK0/MJa3JUo/e+Zf3sg1KklrzQz9JT yMide46H5YTxvSlD43xTp1r6GV3hiWvvlrW/jd+A7QlO0iz7yaevk6kLIO3zxiDC12Em 4SxwA3BWqaOCMNumdxQZ+4eBvKqDJO8IXdV38tYQIdF6vD2ymZ+DyoaWjDpL23JBauce fZifCPEV14GxsGR6wxmj43V/av4XH0AEtfpIRjXoghTo+52L0IfZhJd+3ZhieNeY5VNY tP5jw6urtWBHOJ67BLJYOoZJk3ia7Pi4j/KWIIRhchtR1RaOm3VhcZZ6htEvwbu9eI+y N69w== 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:in-reply-to :references; bh=fuvfQ1qyrUyQY5VgYwh5I30/PsSAGk8lRa94m4Hs6+g=; b=VfN3mrBpovr9z4aOUfaRKHg7n1Nicd6RXvZcvoJWYoA/z4xijTVmnYI3pKN3CRXuOo Wsxg7PQ2SY5vqtD0J4LbJ/xhU8KPwkLt8LFbBrRk6N/kpD/bwu8SGIiZHProPxWAYVMS /yCfYDpE0AFBWkHbHnf5Td5WaTJbdTqf29BlzgqnPSuNiGQ0p+8Ba0WiWiw/Y/5+5G6F eblRrxPHYMuHhiUOn22MhDreSZibU4uYC8T33UpCbrzvQYuxxNbOUWH/Q+2DIX4ZuIyH lYrGx9ruYIoVDEKTyPN6SSkMT+P4xjQPrOpdbitvi+0nE775MIMSYNLEalyvB4RybynE 3beA== X-Gm-Message-State: AA6/9RmpCIDUSsGpZlFAQ3IP+3LMDIDIofaSzRbuLMfxb+NmyydT2bQpfW9kiXPv8Na75LaD X-Received: by 10.28.26.203 with SMTP id a194mr3476263wma.27.1475161388756; Thu, 29 Sep 2016 08:03:08 -0700 (PDT) Received: from orion.home (host31-48-249-102.range31-48.btcentralplus.com. [31.48.249.102]) by smtp.gmail.com with ESMTPSA id z17sm15027513wmz.23.2016.09.29.08.03.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Sep 2016 08:03:08 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Thu, 29 Sep 2016 16:03:05 +0100 Message-Id: <1475161385-30443-2-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475161385-30443-1-git-send-email-michael.g.wood@intel.com> References: <1475161385-30443-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 2/2] toaster: Update tests to reflect front end changes 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: Thu, 29 Sep 2016 15:03:13 -0000 - Browser test we changed the project heading access to use the class name - Update toastergui unit test for additional gotoUrl property - On faster browsers we had a race for layer details inputs being visible Signed-off-by: Michael Wood --- bitbake/lib/toaster/tests/browser/test_layerdetails_page.py | 4 ++++ bitbake/lib/toaster/tests/browser/test_project_page.py | 2 +- bitbake/lib/toaster/toastergui/tests.py | 8 +++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py b/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py index 72b6f60..6392d1e 100644 --- a/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py +++ b/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py @@ -91,6 +91,10 @@ class TestLayerDetailsPage(SeleniumTestCase): for btn in self.find_all("dd .glyphicon-edit"): btn.click() + # Wait for the inputs to become visible + self.wait_until_visible("#layer-git input[type=text]") + self.wait_until_visible("dd textarea") + # Edit each value for inputs in self.find_all("#layer-git input[type=text]") + \ self.find_all("dd textarea"): diff --git a/bitbake/lib/toaster/tests/browser/test_project_page.py b/bitbake/lib/toaster/tests/browser/test_project_page.py index 786bef1..0186463 100644 --- a/bitbake/lib/toaster/tests/browser/test_project_page.py +++ b/bitbake/lib/toaster/tests/browser/test_project_page.py @@ -55,5 +55,5 @@ class TestProjectPage(SeleniumTestCase): self.get(url) # check that we get a project page with the correct heading - project_name = self.find('#project-name').text.strip() + project_name = self.find('.project-name').text.strip() self.assertEqual(project_name, self.CLI_BUILDS_PROJECT_NAME) diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py index 0508611..2b5894f 100644 --- a/bitbake/lib/toaster/toastergui/tests.py +++ b/bitbake/lib/toaster/toastergui/tests.py @@ -248,7 +248,13 @@ class ViewTests(TestCase): url = reverse('xhr_customrecipe_id', args=(recipe.id,)) response = self.client.delete(url) self.assertEqual(response.status_code, 200) - self.assertEqual(json.loads(response.content.decode('utf-8')), {"error": "ok"}) + + gotoUrl = reverse('projectcustomimages', args=(self.project.pk,)) + + self.assertEqual(json.loads(response.content.decode('utf-8')), + {"error": "ok", + "gotoUrl": gotoUrl}) + # try to delete not-existent recipe url = reverse('xhr_customrecipe_id', args=(recipe.id,)) response = self.client.delete(url) -- 2.7.4