summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py b/bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py
index c6d952fde0..598a805540 100644
--- a/bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py
+++ b/bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py
@@ -380,3 +380,44 @@ class TestProjectConfigTab(SeleniumFunctionalTestCase):
380 link_create_custom_image.text 380 link_create_custom_image.text
381 ) 381 )
382 ) 382 )
383
384 def test_project_page_image_recipe(self):
385 """ Test project page section images
386 - Check image recipes are displayed
387 - Check search input
388 - Check image recipe build button works
389 - Check image recipe table features(show/hide column, pagination)
390 """
391 # navigate to the project page
392 url = reverse("project", args=(1,))
393 self.get(url)
394 self.wait_until_visible('#config-nav')
395
396 # navigate to "Images section"
397 images_section = self._get_config_nav_item(3)
398 images_section.click()
399 self.wait_until_visible('#imagerecipestable')
400 rows = self.find_all('#imagerecipestable tbody tr')
401 self.assertTrue(len(rows) > 0)
402
403 # Test search input
404 self.wait_until_visible('#search-input-imagerecipestable')
405 recipe_input = self.find('#search-input-imagerecipestable')
406 recipe_input.send_keys('core-image-minimal')
407 self.find('#search-submit-imagerecipestable').click()
408 rows = self.find_all('#imagerecipestable tbody tr')
409 self.assertTrue(len(rows) > 0)
410
411 # Test build button
412 image_to_build = rows[0]
413 build_btn = image_to_build.find_element(
414 By.XPATH,
415 '//td[@class="add-del-layers"]'
416 )
417 build_btn.click()
418 self._wait_until_build('parsing starting cloning')
419 lastest_builds = self.driver.find_elements(
420 By.XPATH,
421 '//div[@id="latest-builds"]/div'
422 )
423 self.assertTrue(len(lastest_builds) > 0)