Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 79B45E0034A; Thu, 29 Sep 2016 08:16:30 -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: * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [74.125.82.41 listed in list.dnswl.org] * -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 Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 079EFE0034A for ; Thu, 29 Sep 2016 08:16:26 -0700 (PDT) Received: by mail-wm0-f41.google.com with SMTP id b130so138603750wmc.0 for ; Thu, 29 Sep 2016 08:16:25 -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=eAo50ZMjkmxi1esUMB74Ud75zrAOiPYlj+QOxbG0G8/qjObPTHmmj7EG4aRqWg2Zqt 3nHowLc+biobPTl9Kl1Ny49gFDOwPilYD/Xr7xawqGFTcNkaAARlYXzm4IIBvjiYbneU B5ZSc54ctQodhXnM5L2Tng39lJqpIXl0MyxxPnDW0njf5GpULDsUvqvlEIFGr6f1bXzG fure2u5YlzyFzE+MVbtCO67VWHXivTWHULRwmgmEnA8QMDS3ONw7qWEChdsDZTNR8+fh sneMbt/qAeasfvOz55VSYuw1+9yQbubQow4KMar2VrxW8jwKp1X9np2sdNUj1I9ya+dn kDLQ== 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=S3oSN8Yf3gjX4YpO3H1pqJ7/FcUO1Vl4lrUc3GQ8yXcZIusJJub6RH83ZaA2fvPnA7 SSzFMebYYjuEbzP1oKmVtc/iNj9E1no9ZbbzxVifQH/eDAdEE4bpMRW/FWD9DnDGOBp2 mTmN6Q0Oq1jPNCkOMOFX/Xdo/apMeG51ql7yIsGOB4LbVDEQ+QYG9emHYfLVJgSSIGHG dpWUfI+kJp88uhpzZ14N/4sYxMwNps0bwF9P4ZgHSkAUkzMWkej8F3JFRAElYDnE9hSY qinChAKlvKyu8NNw9QPLx6YWeMYzJ5SHu4zHENLX0AiHalM+rOy9JGo9zGocuRUc6Fpe vqKA== X-Gm-Message-State: AA6/9RmefydvvIJYfTgaO/rH+jZeLdksE2JnJ1/qD3zV2Tw4Rriu+8gWMHcQ65KpcFHz5ZcB X-Received: by 10.28.113.80 with SMTP id m77mr3450334wmc.18.1475162184199; Thu, 29 Sep 2016 08:16:24 -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 e2sm14754135wjn.11.2016.09.29.08.16.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Sep 2016 08:16:23 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Thu, 29 Sep 2016 16:16:14 +0100 Message-Id: <1475162174-31647-2-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1475162174-31647-1-git-send-email-michael.g.wood@intel.com> References: <1475162174-31647-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH v2 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:16:30 -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