[gnome-continuous-yocto/gnomeostree-3.28-rocko: 916/8267] bitbake: toaster: selenium tests Fix all_projects page and sample tests



commit 000d724312b57d8c737593cb9e05aba2cf9c7d5f
Author: Michael Wood <michael g wood intel com>
Date:   Fri Jun 10 17:54:37 2016 +0100

    bitbake: toaster: selenium tests Fix all_projects page and sample tests
    
    Fix the selectors after changes made for bootstrap3 and table links being
    removed.
    
    (Bitbake rev: fccc8869dc465b49f236c15a9aa14b7d06694b8e)
    
    Signed-off-by: Michael Wood <michael g wood intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 .../tests/browser/test_all_projects_page.py        |   13 ++++++++-----
 bitbake/lib/toaster/tests/browser/test_sample.py   |    2 +-
 2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/bitbake/lib/toaster/tests/browser/test_all_projects_page.py 
b/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
index ed8e620..44da640 100644
--- a/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
+++ b/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
@@ -93,7 +93,7 @@ class TestAllProjectsPage(SeleniumTestCase):
         """
         url = reverse('all-projects')
         self.get(url)
-        self.wait_until_visible('#no-results-projectstable')
+        self.wait_until_visible('#empty-state-projectstable')
 
         rows = self.find_all('#projectstable tbody tr')
         self.assertEqual(len(rows), 0, 'should be no projects displayed')
@@ -122,12 +122,13 @@ class TestAllProjectsPage(SeleniumTestCase):
         self._add_non_default_project()
 
         self.get(reverse('all-projects'))
+        self.wait_until_visible("#projectstable tr")
 
         # find the row for the default project
         default_project_row = self._get_row_for_project(self.default_project.name)
 
         # check the release text for the default project
-        selector = 'span[data-project-field="release"] span.muted'
+        selector = 'span[data-project-field="release"] span.text-muted'
         element = default_project_row.find_element_by_css_selector(selector)
         text = element.text.strip()
         self.assertEqual(text, 'Not applicable',
@@ -137,7 +138,7 @@ class TestAllProjectsPage(SeleniumTestCase):
         other_project_row = self._get_row_for_project(self.project.name)
 
         # check the link in the release cell for the other project
-        selector = 'span[data-project-field="release"] a'
+        selector = 'span[data-project-field="release"]'
         element = other_project_row.find_element_by_css_selector(selector)
         text = element.text.strip()
         self.assertEqual(text, self.release.name,
@@ -156,11 +157,13 @@ class TestAllProjectsPage(SeleniumTestCase):
 
         self.get(reverse('all-projects'))
 
+        self.wait_until_visible("#projectstable tr")
+
         # find the row for the default project
         default_project_row = self._get_row_for_project(self.default_project.name)
 
         # check the machine cell for the default project
-        selector = 'span[data-project-field="machine"] span.muted'
+        selector = 'span[data-project-field="machine"] span.text-muted'
         element = default_project_row.find_element_by_css_selector(selector)
         text = element.text.strip()
         self.assertEqual(text, 'Not applicable',
@@ -170,7 +173,7 @@ class TestAllProjectsPage(SeleniumTestCase):
         other_project_row = self._get_row_for_project(self.project.name)
 
         # check the link in the machine cell for the other project
-        selector = 'span[data-project-field="machine"] a'
+        selector = 'span[data-project-field="machine"]'
         element = other_project_row.find_element_by_css_selector(selector)
         text = element.text.strip()
         self.assertEqual(text, self.MACHINE_NAME,
diff --git a/bitbake/lib/toaster/tests/browser/test_sample.py 
b/bitbake/lib/toaster/tests/browser/test_sample.py
index 7bb8b97..20ec53c 100644
--- a/bitbake/lib/toaster/tests/browser/test_sample.py
+++ b/bitbake/lib/toaster/tests/browser/test_sample.py
@@ -37,5 +37,5 @@ class TestSample(SeleniumTestCase):
     def test_landing_page_has_brand(self):
         url = reverse('landing')
         self.get(url)
-        brand_link = self.find('span.brand a')
+        brand_link = self.find('.toaster-navbar-brand a.brand')
         self.assertEqual(brand_link.text.strip(), 'Toaster')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]