diff options
| author | Elliot Smith <elliot.smith@intel.com> | 2016-07-12 15:54:57 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-19 08:56:52 +0100 |
| commit | 8ccf8392aa07c14b99f946585f27aff8f2e425de (patch) | |
| tree | 1f7ba4a83e7c84cac57c1ea8fc9ab2ec5da9b786 /bitbake | |
| parent | db5426b0794c65f69efe34273fe98823e2a655d7 (diff) | |
| download | poky-8ccf8392aa07c14b99f946585f27aff8f2e425de.tar.gz | |
bitbake: toaster-tests: new custom image button shouldn't show for non-image builds
[YOCTO #9514]
(Bitbake rev: 9bc014d89434400c1493fa9f07ce3a51d37dab51)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
| -rw-r--r-- | bitbake/lib/toaster/tests/browser/test_builddashboard_page.py | 20 |
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') | ||
