diff options
-rw-r--r-- | bitbake/lib/toaster/tests/functional/functional_helpers.py | 6 | ||||
-rw-r--r-- | bitbake/lib/toaster/tests/functional/test_functional_basic.py | 15 |
2 files changed, 14 insertions, 7 deletions
diff --git a/bitbake/lib/toaster/tests/functional/functional_helpers.py b/bitbake/lib/toaster/tests/functional/functional_helpers.py index a7a3459630..e28f2024f5 100644 --- a/bitbake/lib/toaster/tests/functional/functional_helpers.py +++ b/bitbake/lib/toaster/tests/functional/functional_helpers.py | |||
@@ -216,3 +216,9 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase): | |||
216 | 'The project release is not defined') | 216 | 'The project release is not defined') |
217 | 217 | ||
218 | return project_id | 218 | return project_id |
219 | |||
220 | def load_projects_page_helper(self): | ||
221 | self.wait_until_present('#projectstable') | ||
222 | # Need to wait for some data in the table too | ||
223 | self.wait_until_present('td[class="updated"]') | ||
224 | |||
diff --git a/bitbake/lib/toaster/tests/functional/test_functional_basic.py b/bitbake/lib/toaster/tests/functional/test_functional_basic.py index c73a278f6c..d5c9708617 100644 --- a/bitbake/lib/toaster/tests/functional/test_functional_basic.py +++ b/bitbake/lib/toaster/tests/functional/test_functional_basic.py | |||
@@ -20,6 +20,7 @@ from tests.functional.utils import get_projectId_from_url | |||
20 | class FuntionalTestBasic(SeleniumFunctionalTestCase): | 20 | class FuntionalTestBasic(SeleniumFunctionalTestCase): |
21 | """Basic functional tests for Toaster""" | 21 | """Basic functional tests for Toaster""" |
22 | project_id = None | 22 | project_id = None |
23 | project_url = None | ||
23 | 24 | ||
24 | def setUp(self): | 25 | def setUp(self): |
25 | super(FuntionalTestBasic, self).setUp() | 26 | super(FuntionalTestBasic, self).setUp() |
@@ -29,7 +30,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): | |||
29 | # testcase (1515) | 30 | # testcase (1515) |
30 | def test_verify_left_bar_menu(self): | 31 | def test_verify_left_bar_menu(self): |
31 | self.get(reverse('all-projects')) | 32 | self.get(reverse('all-projects')) |
32 | self.wait_until_present('#projectstable', poll=10) | 33 | self.load_projects_page_helper() |
33 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() | 34 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() |
34 | self.wait_until_present('#config-nav') | 35 | self.wait_until_present('#config-nav') |
35 | self.assertTrue(self.element_exists('#config-nav'),'Configuration Tab does not exist') | 36 | self.assertTrue(self.element_exists('#config-nav'),'Configuration Tab does not exist') |
@@ -82,7 +83,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): | |||
82 | # testcase (1516) | 83 | # testcase (1516) |
83 | def test_review_configuration_information(self): | 84 | def test_review_configuration_information(self): |
84 | self.get(reverse('all-projects')) | 85 | self.get(reverse('all-projects')) |
85 | self.wait_until_present('#projectstable', poll=10) | 86 | self.load_projects_page_helper() |
86 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() | 87 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() |
87 | project_URL=self.get_URL() | 88 | project_URL=self.get_URL() |
88 | 89 | ||
@@ -131,7 +132,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): | |||
131 | # testcase (1517) | 132 | # testcase (1517) |
132 | def test_verify_machine_information(self): | 133 | def test_verify_machine_information(self): |
133 | self.get(reverse('all-projects')) | 134 | self.get(reverse('all-projects')) |
134 | self.wait_until_present('#projectstable', poll=10) | 135 | self.load_projects_page_helper() |
135 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() | 136 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() |
136 | 137 | ||
137 | self.wait_until_visible('#machine-section') | 138 | self.wait_until_visible('#machine-section') |
@@ -149,7 +150,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): | |||
149 | # testcase (1518) | 150 | # testcase (1518) |
150 | def test_verify_most_built_recipes_information(self): | 151 | def test_verify_most_built_recipes_information(self): |
151 | self.get(reverse('all-projects')) | 152 | self.get(reverse('all-projects')) |
152 | self.wait_until_present('#projectstable', poll=10) | 153 | self.load_projects_page_helper() |
153 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() | 154 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() |
154 | self.wait_until_present('#config-nav') | 155 | self.wait_until_present('#config-nav') |
155 | project_URL=self.get_URL() | 156 | project_URL=self.get_URL() |
@@ -166,7 +167,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): | |||
166 | # testcase (1519) | 167 | # testcase (1519) |
167 | def test_verify_project_release_information(self): | 168 | def test_verify_project_release_information(self): |
168 | self.get(reverse('all-projects')) | 169 | self.get(reverse('all-projects')) |
169 | self.wait_until_present('#projectstable', poll=10) | 170 | self.load_projects_page_helper() |
170 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() | 171 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() |
171 | self.wait_until_visible('#project-release-title') | 172 | self.wait_until_visible('#project-release-title') |
172 | self.assertTrue(re.search("Yocto Project master",self.driver.find_element(By.ID, "project-release-title").text), 'No project release title information in project detail page') | 173 | self.assertTrue(re.search("Yocto Project master",self.driver.find_element(By.ID, "project-release-title").text), 'No project release title information in project detail page') |
@@ -174,7 +175,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): | |||
174 | # testcase (1520) | 175 | # testcase (1520) |
175 | def test_verify_layer_information(self): | 176 | def test_verify_layer_information(self): |
176 | self.get(reverse('all-projects')) | 177 | self.get(reverse('all-projects')) |
177 | self.wait_until_present('#projectstable', poll=10) | 178 | self.load_projects_page_helper() |
178 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() | 179 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() |
179 | self.wait_until_present('#config-nav') | 180 | self.wait_until_present('#config-nav') |
180 | project_URL=self.get_URL() | 181 | project_URL=self.get_URL() |
@@ -210,7 +211,7 @@ class FuntionalTestBasic(SeleniumFunctionalTestCase): | |||
210 | # testcase (1521) | 211 | # testcase (1521) |
211 | def test_verify_project_detail_links(self): | 212 | def test_verify_project_detail_links(self): |
212 | self.get(reverse('all-projects')) | 213 | self.get(reverse('all-projects')) |
213 | self.wait_until_present('#projectstable', poll=10) | 214 | self.load_projects_page_helper() |
214 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() | 215 | self.find_element_by_link_text_in_table('projectstable', 'selenium-project').click() |
215 | self.wait_until_present('#config-nav') | 216 | self.wait_until_present('#config-nav') |
216 | project_URL=self.get_URL() | 217 | project_URL=self.get_URL() |