diff options
author | Alassane Yattara <alassane.yattara@savoirfairelinux.com> | 2023-11-21 14:51:29 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-23 12:06:06 +0000 |
commit | 3d2d2901574b38b0e8d2efc95facdd1b78692a76 (patch) | |
tree | b23e2869073acd7c255c34a1de9b845b4350d028 | |
parent | 2eb70a30d94ac82316870d9a0d01a75400c7eb13 (diff) | |
download | poky-3d2d2901574b38b0e8d2efc95facdd1b78692a76.tar.gz |
bitbake: toaster/tests: Add UI TestCase - Test project page section images
BUILD IMAGE RECIPES: toastergui/project/{id}/images/
Test project page section images
- Check image recipes are displayed
- Check search input
- Check image recipe build button works
- Check image recipe table features(show/hide column, pagination)
(Bitbake rev: 9aa0aad6812730d4ffaa9b3adfae041176274475)
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py | 41 |
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) | ||