def test_actions_make_submenus_before_and_after(self):

        action_sets = [
            ActionSet(
                actions = [
                    Action(
                        class_name = 'File',
                        path       = 'MenuBar/File/New',
                        after      = 'Folder'
                    ),

                    Action(
                        class_name = 'Project',
                        path       = 'MenuBar/File/New',
                        before     = 'Folder'
                    ),

                    Action(
                        class_name = 'Folder',
                        path       = 'MenuBar/File/New',
                    ),
                ]
            )
        ]

        # Create a builder containing the action set.
        builder = DummyActionManagerBuilder(action_sets=action_sets)

        # Create a menu bar manager for the 'MenuBar'.
        menu_manager = builder.create_menu_bar_manager('MenuBar')

        # Make sure the 'File' menu got added to the 'additions' group of the
        # menubar.
        self.assertEqual(1, len(menu_manager.groups))

        additions = menu_manager.find_group('additions')
        self.assertEqual('File', additions.items[0].id)

        # Make sure the 'New' sub-menu got added to the 'additions' group
        # of the 'File' menu.
        menu = menu_manager.find_item('File')
        additions = menu.find_group('additions')

        self.assertEqual('New', additions.items[0].id)

        # Make sure the new 'Folder' and 'File' actions got added to the
        # 'additions' group of the 'New' menu.
        menu = menu_manager.find_item('File/New')
        additions = menu.find_group('additions')

        ids = [item.id for item in additions.items]
        self.assertEqual(['Project', 'Folder', 'File'], ids)

        return
actions make submenus before and after
dataset/ETHPy150Open enthought/envisage/envisage/ui/action/tests/action_manager_builder_test_case.py/ActionManagerBuilderTestCase.test_actions_make_submenus_before_and_after