summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/tests
diff options
context:
space:
mode:
authorAlassane Yattara <alassane.yattara@savoirfairelinux.com>2023-11-21 14:51:28 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-23 12:06:06 +0000
commit2eb70a30d94ac82316870d9a0d01a75400c7eb13 (patch)
tree2f7b648d083367d01c2f1543f13c2a0f45c53127 /bitbake/lib/toaster/tests
parenta303b37bd6699193d69fd983b768c7fecf8ee782 (diff)
downloadpoky-2eb70a30d94ac82316870d9a0d01a75400c7eb13.tar.gz
bitbake: toaster/tests: Add UI TestCase - Test project page tab "New custom image"
Test project page tab "New custom image" when no custom image (Bitbake rev: fd8fe1d3b25679032a43c1dd25a945318e573cef) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/tests')
-rw-r--r--bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py31
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 )