summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/tests/browser/test_builddashboard_page.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py b/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py
index cdb0616235..14e77a31d6 100644
--- a/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py
+++ b/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py
@@ -48,6 +48,10 @@ class TestBuildDashboardPage(SeleniumTestCase):
48 started_on=now, 48 started_on=now,
49 completed_on=now) 49 completed_on=now)
50 50
51 self.build3 = Build.objects.create(project=project,
52 started_on=now,
53 completed_on=now)
54
51 # exception 55 # exception
52 msg1 = 'an exception was thrown' 56 msg1 = 'an exception was thrown'
53 self.exception_message = LogMessage.objects.create( 57 self.exception_message = LogMessage.objects.create(
@@ -71,6 +75,11 @@ class TestBuildDashboardPage(SeleniumTestCase):
71 layer=layer, build=self.build1 75 layer=layer, build=self.build1
72 ) 76 )
73 77
78 # non-image recipes related to a build, for testing the new custom
79 # image button
80 layer_version2 = Layer_Version.objects.create(layer=layer,
81 build=self.build3)
82
74 # image recipes 83 # image recipes
75 self.image_recipe1 = Recipe.objects.create( 84 self.image_recipe1 = Recipe.objects.create(
76 name='recipeA', 85 name='recipeA',
@@ -248,3 +257,14 @@ class TestBuildDashboardPage(SeleniumTestCase):
248 ] 257 ]
249 258
250 self._check_labels_in_modal(modal, expected_recipes) 259 self._check_labels_in_modal(modal, expected_recipes)
260
261 def test_new_custom_image_button_no_image(self):
262 """
263 Check that a build which builds non-image recipes doesn't show
264 the new custom image button on the dashboard.
265 """
266 self._get_build_dashboard(self.build3)
267 selector = '[data-role="new-custom-image-trigger"]'
268 self.assertFalse(self.element_exists(selector),
269 'new custom image button should not show for builds which ' \
270 'don\'t have any image recipes')