diff options
| -rw-r--r-- | bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py | 31 |
1 files changed, 31 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 14a859a13a..c6d952fde0 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 | |||
| @@ -349,3 +349,34 @@ class TestProjectConfigTab(SeleniumFunctionalTestCase): | |||
| 349 | self.assertTrue( | 349 | self.assertTrue( |
| 350 | 'meta-fake' in str(layers_list_items[-1].text) | 350 | 'meta-fake' in str(layers_list_items[-1].text) |
| 351 | ) | 351 | ) |
| 352 | |||
| 353 | def test_project_page_custom_image_no_image(self): | ||
| 354 | """ Test project page tab "New custom image" when no custom image """ | ||
| 355 | # navigate to the project page | ||
| 356 | url = reverse("project", args=(1,)) | ||
| 357 | self.get(url) | ||
| 358 | |||
| 359 | # navigate to "Custom image" tab | ||
| 360 | custom_image_section = self._get_config_nav_item(2) | ||
| 361 | custom_image_section.click() | ||
| 362 | self.wait_until_visible('#empty-state-customimagestable') | ||
| 363 | |||
| 364 | # Check message when no custom image | ||
| 365 | self.assertTrue( | ||
| 366 | "You have not created any custom images yet." in str( | ||
| 367 | self.find('#empty-state-customimagestable').text | ||
| 368 | ) | ||
| 369 | ) | ||
| 370 | div_empty_msg = self.find('#empty-state-customimagestable') | ||
| 371 | link_create_custom_image = div_empty_msg.find_element( | ||
| 372 | By.TAG_NAME, 'a') | ||
| 373 | self.assertTrue( | ||
| 374 | f"/toastergui/project/1/newcustomimage" in str( | ||
| 375 | link_create_custom_image.get_attribute('href') | ||
| 376 | ) | ||
| 377 | ) | ||
| 378 | self.assertTrue( | ||
| 379 | "Create your first custom image" in str( | ||
| 380 | link_create_custom_image.text | ||
| 381 | ) | ||
| 382 | ) | ||
