mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
bitbake: toaster/tests: Improve a test to give better debug output
"False is not True" is not a helpful error messgae. "XXX not in YYY" is much more helpful. Tweak the test to give more meaninful failure messages using assertIn rather than assertTrue. (Bitbake rev: 6292b5a81ce1f3cf35980d0f669a1b52f3c56695) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -719,16 +719,16 @@ class TestProjectPage(SeleniumFunctionalTestCase):
|
||||
remove_layer_btn.click()
|
||||
self.wait_until_visible('#change-notification', poll=2)
|
||||
change_notification = self.find('#change-notification')
|
||||
self.assertTrue(
|
||||
f'You have removed 1 layer from your project' in str(change_notification.text)
|
||||
self.assertIn(
|
||||
f'You have removed 1 layer from your project', str(change_notification.text)
|
||||
)
|
||||
# check add layer button works, 18 is the random layer id
|
||||
add_layer_btn = self.find('#add-remove-layer-btn')
|
||||
add_layer_btn.click()
|
||||
self.wait_until_visible('#change-notification')
|
||||
change_notification = self.find('#change-notification')
|
||||
self.assertTrue(
|
||||
f'You have added 1 layer to your project' in str(change_notification.text)
|
||||
self.assertIn(
|
||||
f'You have added 1 layer to your project', str(change_notification.text)
|
||||
)
|
||||
# check tabs(layers, recipes, machines) are displayed
|
||||
tabs = self.find_all('.nav-tabs li')
|
||||
|
||||
Reference in New Issue
Block a user