[oe-commits] [bitbake] 06/06: toaster: Update tests to reflect front end changes
git at git.openembedded.org
git at git.openembedded.org
Thu Oct 6 10:44:10 UTC 2016
rpurdie pushed a commit to branch master
in repository bitbake.
commit 80f377ebcffd01dbe393ccffb999df4b04552f8a
Author: Michael Wood <michael.g.wood at intel.com>
AuthorDate: Wed Oct 5 17:08:54 2016 -0700
toaster: Update tests to reflect front end changes
- 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 <michael.g.wood at intel.com>
Signed-off-by: bavery <brian.avery at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/toaster/tests/browser/test_layerdetails_page.py | 4 ++++
lib/toaster/tests/browser/test_project_page.py | 2 +-
lib/toaster/toastergui/tests.py | 8 +++++++-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/lib/toaster/tests/browser/test_layerdetails_page.py b/lib/toaster/tests/browser/test_layerdetails_page.py
index 72b6f60..6392d1e 100644
--- a/lib/toaster/tests/browser/test_layerdetails_page.py
+++ b/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/lib/toaster/tests/browser/test_project_page.py b/lib/toaster/tests/browser/test_project_page.py
index 786bef1..0186463 100644
--- a/lib/toaster/tests/browser/test_project_page.py
+++ b/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/lib/toaster/toastergui/tests.py b/lib/toaster/toastergui/tests.py
index 0508611..2b5894f 100644
--- a/lib/toaster/toastergui/tests.py
+++ b/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)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list