diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-08 13:36:27 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-10-09 13:04:30 +0100 |
| commit | 48b72c2f5147f6306ee25312a69900f38a15ccb7 (patch) | |
| tree | f00ed67069d0082dc4f7fb7f10467286e062620c | |
| parent | fb35cf26f0865e99af079da92a497d1664ee7caa (diff) | |
| download | poky-48b72c2f5147f6306ee25312a69900f38a15ccb7.tar.gz | |
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>
| -rw-r--r-- | bitbake/lib/toaster/tests/functional/test_project_page.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/tests/functional/test_project_page.py b/bitbake/lib/toaster/tests/functional/test_project_page.py index 0e36b44ffd..deb26812ea 100644 --- a/bitbake/lib/toaster/tests/functional/test_project_page.py +++ b/bitbake/lib/toaster/tests/functional/test_project_page.py | |||
| @@ -719,16 +719,16 @@ class TestProjectPage(SeleniumFunctionalTestCase): | |||
| 719 | remove_layer_btn.click() | 719 | remove_layer_btn.click() |
| 720 | self.wait_until_visible('#change-notification', poll=2) | 720 | self.wait_until_visible('#change-notification', poll=2) |
| 721 | change_notification = self.find('#change-notification') | 721 | change_notification = self.find('#change-notification') |
| 722 | self.assertTrue( | 722 | self.assertIn( |
| 723 | f'You have removed 1 layer from your project' in str(change_notification.text) | 723 | f'You have removed 1 layer from your project', str(change_notification.text) |
| 724 | ) | 724 | ) |
| 725 | # check add layer button works, 18 is the random layer id | 725 | # check add layer button works, 18 is the random layer id |
| 726 | add_layer_btn = self.find('#add-remove-layer-btn') | 726 | add_layer_btn = self.find('#add-remove-layer-btn') |
| 727 | add_layer_btn.click() | 727 | add_layer_btn.click() |
| 728 | self.wait_until_visible('#change-notification') | 728 | self.wait_until_visible('#change-notification') |
| 729 | change_notification = self.find('#change-notification') | 729 | change_notification = self.find('#change-notification') |
| 730 | self.assertTrue( | 730 | self.assertIn( |
| 731 | f'You have added 1 layer to your project' in str(change_notification.text) | 731 | f'You have added 1 layer to your project', str(change_notification.text) |
| 732 | ) | 732 | ) |
| 733 | # check tabs(layers, recipes, machines) are displayed | 733 | # check tabs(layers, recipes, machines) are displayed |
| 734 | tabs = self.find_all('.nav-tabs li') | 734 | tabs = self.find_all('.nav-tabs li') |
