]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: Update tests to reflect front end changes
authorMichael Wood <michael.g.wood@intel.com>
Thu, 6 Oct 2016 00:08:54 +0000 (17:08 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Oct 2016 10:41:48 +0000 (11:41 +0100)
 - 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

(Bitbake rev: 80f377ebcffd01dbe393ccffb999df4b04552f8a)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
bitbake/lib/toaster/tests/browser/test_project_page.py
bitbake/lib/toaster/toastergui/tests.py

index 72b6f60c2116150c8780b062022cce50125b24de..6392d1efb6e85c02d1ef612c744a2faef9c6c554 100644 (file)
@@ -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"):
index 786bef1c6ea3fbf31924a0d1ae3f008cd0f30281..018646332418ba05277b35d7aa38aac8bf26c1c7 100644 (file)
@@ -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)
index 050861159abda93c67604fa32771d3a0e8758def..2b5894f74383767a3420d9d90175e4b9bd5a72af 100644 (file)
@@ -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)