diff options
| author | Alassane Yattara <alassane.yattara@savoirfairelinux.com> | 2023-11-29 23:54:13 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-02 18:04:23 +0000 |
| commit | 5cd899da3944f2f3f2035f1b2e21593419c26689 (patch) | |
| tree | 8ccc5f0d11fe0184961d68373ec526b3c45ce5e0 /bitbake | |
| parent | 00fb8ffca382cab9f6f093a26c836564757dbe91 (diff) | |
| download | poky-5cd899da3944f2f3f2035f1b2e21593419c26689.tar.gz | |
bitbake: toaster/tests: Added distro page TestCase
Test distros page
- Check if title "Compatible distros" is displayed
- Check search input
- Check "Add layer" button works
- Check distro table feature(show/hide column, pagination)
(Bitbake rev: 8b56af0837e9f09f13d6892c1aa1d82ecd5ef87d)
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
| -rw-r--r-- | bitbake/lib/toaster/tests/functional/test_project_page.py | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/tests/functional/test_project_page.py b/bitbake/lib/toaster/tests/functional/test_project_page.py index 47dec1d9e5..dd33e80256 100644 --- a/bitbake/lib/toaster/tests/functional/test_project_page.py +++ b/bitbake/lib/toaster/tests/functional/test_project_page.py | |||
| @@ -644,3 +644,54 @@ class TestProjectPage(SeleniumFunctionalTestCase): | |||
| 644 | self._navigate_to_config_nav('layerstable', 6) | 644 | self._navigate_to_config_nav('layerstable', 6) |
| 645 | # check show rows(pagination) | 645 | # check show rows(pagination) |
| 646 | self._mixin_test_table_show_rows(table_selector='layerstable') | 646 | self._mixin_test_table_show_rows(table_selector='layerstable') |
| 647 | |||
| 648 | def test_distro_page(self): | ||
| 649 | """ Test distros page | ||
| 650 | - Check if title "Compatible distros" is displayed | ||
| 651 | - Check search input | ||
| 652 | - Check "Add layer" button works | ||
| 653 | - Check distro table feature(show/hide column, pagination) | ||
| 654 | """ | ||
| 655 | self._navigate_to_config_nav('distrostable', 7) | ||
| 656 | # check title "Compatible distros" is displayed | ||
| 657 | self.assertTrue("Compatible Distros" in self.get_page_source()) | ||
| 658 | # Test search input | ||
| 659 | input_text='poky-altcfg' | ||
| 660 | self._mixin_test_table_search_input( | ||
| 661 | input_selector='search-input-distrostable', | ||
| 662 | input_text=input_text, | ||
| 663 | searchBtn_selector='search-submit-distrostable', | ||
| 664 | table_selector='distrostable' | ||
| 665 | ) | ||
| 666 | # check "Add distro" button works | ||
| 667 | rows = self.find_all('#distrostable tbody tr') | ||
| 668 | distro_to_add = rows[0] | ||
| 669 | add_btn = distro_to_add.find_element( | ||
| 670 | By.XPATH, | ||
| 671 | '//td[@class="add-del-layers"]' | ||
| 672 | ) | ||
| 673 | add_btn.click() | ||
| 674 | self.wait_until_visible('#change-notification', poll=2) | ||
| 675 | change_notification = self.find('#change-notification') | ||
| 676 | self.assertTrue( | ||
| 677 | f'You have changed the distro to: {input_text}' in change_notification.text | ||
| 678 | ) | ||
| 679 | # check distro table feature(show/hide column, pagination) | ||
| 680 | self._navigate_to_config_nav('distrostable', 7) | ||
| 681 | column_list = [ | ||
| 682 | 'description', | ||
| 683 | 'templatefile', | ||
| 684 | 'layer_version__get_vcs_reference', | ||
| 685 | 'layer_version__layer__name', | ||
| 686 | ] | ||
| 687 | self._mixin_test_table_edit_column( | ||
| 688 | 'distrostable', | ||
| 689 | 'edit-columns-button', | ||
| 690 | [f'checkbox-{column}' for column in column_list] | ||
| 691 | ) | ||
| 692 | self._navigate_to_config_nav('distrostable', 7) | ||
| 693 | # check show rows(pagination) | ||
| 694 | self._mixin_test_table_show_rows( | ||
| 695 | table_selector='distrostable', | ||
| 696 | to_skip=[150] | ||
| 697 | ) | ||
