← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~alisonken1/openlp/projector-string-standards into lp:openlp

 

Ken Roberts has proposed merging lp:~alisonken1/openlp/projector-string-standards into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~alisonken1/openlp/projector-string-standards/+merge/287982

Spelling - Add plural "projectors" to multiple-selected projector tooltip descriptions
String Standards  - Add period after tooltip descriptions
Tests - Added projector status_change test

--------------------------------
lp:~alisonken1/openlp/projector-string-standards (revision 2627)
[SUCCESS] https://ci.openlp.io/job/Branch-01-Pull/1307/
[SUCCESS] https://ci.openlp.io/job/Branch-02-Functional-Tests/1229/
[SUCCESS] https://ci.openlp.io/job/Branch-03-Interface-Tests/1168/
[SUCCESS] https://ci.openlp.io/job/Branch-04a-Windows_Functional_Tests/1003/
[SUCCESS] https://ci.openlp.io/job/Branch-04b-Windows_Interface_Tests/594/
[SUCCESS] https://ci.openlp.io/job/Branch-05a-Code_Analysis/660/
[FAILURE] https://ci.openlp.io/job/Branch-05b-Test_Coverage/529/
Stopping after failure

-- 
Your team OpenLP Core is requested to review the proposed merge of lp:~alisonken1/openlp/projector-string-standards into lp:openlp.
=== modified file 'openlp/core/ui/projector/manager.py'
--- openlp/core/ui/projector/manager.py	2015-12-31 22:46:06 +0000
+++ openlp/core/ui/projector/manager.py	2016-03-03 18:34:07 +0000
@@ -83,60 +83,60 @@
         self.one_toolbar.add_toolbar_action('new_projector',
                                             text=translate('OpenLP.ProjectorManager', 'Add Projector'),
                                             icon=':/projector/projector_new.png',
-                                            tooltip=translate('OpenLP.ProjectorManager', 'Add a new projector'),
+                                            tooltip=translate('OpenLP.ProjectorManager', 'Add a new projector.'),
                                             triggers=self.on_add_projector)
         # Show edit/delete when projector not connected
         self.one_toolbar.add_toolbar_action('edit_projector',
                                             text=translate('OpenLP.ProjectorManager', 'Edit Projector'),
                                             icon=':/general/general_edit.png',
-                                            tooltip=translate('OpenLP.ProjectorManager', 'Edit selected projector'),
+                                            tooltip=translate('OpenLP.ProjectorManager', 'Edit selected projector.'),
                                             triggers=self.on_edit_projector)
         self.one_toolbar.add_toolbar_action('delete_projector',
                                             text=translate('OpenLP.ProjectorManager', 'Delete Projector'),
                                             icon=':/general/general_delete.png',
-                                            tooltip=translate('OpenLP.ProjectorManager', 'Delete selected projector'),
+                                            tooltip=translate('OpenLP.ProjectorManager', 'Delete selected projector.'),
                                             triggers=self.on_delete_projector)
         # Show source/view when projector connected
         self.one_toolbar.add_toolbar_action('source_view_projector',
                                             text=translate('OpenLP.ProjectorManager', 'Select Input Source'),
                                             icon=':/projector/projector_hdmi.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Choose input source on selected projector'),
+                                                              'Choose input source on selected projector.'),
                                             triggers=self.on_select_input)
         self.one_toolbar.add_toolbar_action('view_projector',
                                             text=translate('OpenLP.ProjectorManager', 'View Projector'),
                                             icon=':/system/system_about.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'View selected projector information'),
+                                                              'View selected projector information.'),
                                             triggers=self.on_status_projector)
         self.one_toolbar.addSeparator()
         self.one_toolbar.add_toolbar_action('connect_projector',
                                             text=translate('OpenLP.ProjectorManager',
-                                                           'Connect to selected projector'),
+                                                           'Connect to selected projector.'),
                                             icon=':/projector/projector_connect.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Connect to selected projector'),
+                                                              'Connect to selected projector.'),
                                             triggers=self.on_connect_projector)
         self.one_toolbar.add_toolbar_action('connect_projector_multiple',
                                             text=translate('OpenLP.ProjectorManager',
                                                            'Connect to selected projectors'),
                                             icon=':/projector/projector_connect_tiled.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Connect to selected projector'),
+                                                              'Connect to selected projectors.'),
                                             triggers=self.on_connect_projector)
         self.one_toolbar.add_toolbar_action('disconnect_projector',
                                             text=translate('OpenLP.ProjectorManager',
                                                            'Disconnect from selected projectors'),
                                             icon=':/projector/projector_disconnect.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Disconnect from selected projector'),
+                                                              'Disconnect from selected projector.'),
                                             triggers=self.on_disconnect_projector)
         self.one_toolbar.add_toolbar_action('disconnect_projector_multiple',
                                             text=translate('OpenLP.ProjectorManager',
                                                            'Disconnect from selected projector'),
                                             icon=':/projector/projector_disconnect_tiled.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Disconnect from selected projector'),
+                                                              'Disconnect from selected projectors.'),
                                             triggers=self.on_disconnect_projector)
         self.one_toolbar.addSeparator()
         self.one_toolbar.add_toolbar_action('poweron_projector',
@@ -144,26 +144,26 @@
                                                            'Power on selected projector'),
                                             icon=':/projector/projector_power_on.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Power on selected projector'),
+                                                              'Power on selected projector.'),
                                             triggers=self.on_poweron_projector)
         self.one_toolbar.add_toolbar_action('poweron_projector_multiple',
                                             text=translate('OpenLP.ProjectorManager',
                                                            'Power on selected projector'),
                                             icon=':/projector/projector_power_on_tiled.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Power on selected projector'),
+                                                              'Power on selected projectors.'),
                                             triggers=self.on_poweron_projector)
         self.one_toolbar.add_toolbar_action('poweroff_projector',
                                             text=translate('OpenLP.ProjectorManager', 'Standby selected projector'),
                                             icon=':/projector/projector_power_off.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Put selected projector in standby'),
+                                                              'Put selected projector in standby.'),
                                             triggers=self.on_poweroff_projector)
         self.one_toolbar.add_toolbar_action('poweroff_projector_multiple',
                                             text=translate('OpenLP.ProjectorManager', 'Standby selected projector'),
                                             icon=':/projector/projector_power_off_tiled.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Put selected projector in standby'),
+                                                              'Put selected projectors in standby.'),
                                             triggers=self.on_poweroff_projector)
         self.one_toolbar.addSeparator()
         self.one_toolbar.add_toolbar_action('blank_projector',
@@ -175,24 +175,24 @@
                                             triggers=self.on_blank_projector)
         self.one_toolbar.add_toolbar_action('blank_projector_multiple',
                                             text=translate('OpenLP.ProjectorManager',
-                                                           'Blank selected projector screen'),
+                                                           'Blank selected projectors screen'),
                                             icon=':/projector/projector_blank_tiled.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Blank selected projector screen'),
+                                                              'Blank selected projectors screen.'),
                                             triggers=self.on_blank_projector)
         self.one_toolbar.add_toolbar_action('show_projector',
                                             text=translate('OpenLP.ProjectorManager',
                                                            'Show selected projector screen'),
                                             icon=':/projector/projector_show.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Show selected projector screen'),
+                                                              'Show selected projector screen.'),
                                             triggers=self.on_show_projector)
         self.one_toolbar.add_toolbar_action('show_projector_multiple',
                                             text=translate('OpenLP.ProjectorManager',
                                                            'Show selected projector screen'),
                                             icon=':/projector/projector_show_tiled.png',
                                             tooltip=translate('OpenLP.ProjectorManager',
-                                                              'Show selected projector screen'),
+                                                              'Show selected projectors screen.'),
                                             triggers=self.on_show_projector)
         self.layout.addWidget(self.one_toolbar)
         self.projector_one_widget = QtWidgets.QWidgetAction(self.one_toolbar)

=== modified file 'tests/functional/openlp_core_lib/test_projector_pjlink1.py'
--- tests/functional/openlp_core_lib/test_projector_pjlink1.py	2016-02-28 10:26:38 +0000
+++ tests/functional/openlp_core_lib/test_projector_pjlink1.py	2016-03-03 18:34:07 +0000
@@ -26,6 +26,7 @@
 from unittest import TestCase
 
 from openlp.core.lib.projector.pjlink1 import PJLink1
+from openlp.core.lib.projector.constants import E_PARAMETER, ERROR_STRING
 
 from tests.functional import patch
 from tests.resources.projector.data import TEST_PIN, TEST_SALT, TEST_CONNECT_AUTHENTICATE
@@ -74,3 +75,20 @@
         # THEN: Projector class should be set with proper value
         self.assertEquals(pjlink.pjlink_class, '1',
                           'Non-standard class reply should have set proper class')
+
+    @patch.object(pjlink_test, 'change_status')
+    def status_change_test(self, mock_change_status):
+        """
+        Test process_command call with ERR2 (Parameter) status
+        """
+        # GIVEN: Test object
+        pjlink = pjlink_test
+
+        # WHEN: process_command is called with "ERR2" status from projector
+        pjlink.process_command('POWR', 'ERR2')
+
+        # THEN: change_status should have called change_status with E_UNDEFINED
+        #       as first parameter
+        mock_change_status.called_with(E_PARAMETER,
+                                       'change_status should have been called with "{}"'.format(
+                                           ERROR_STRING[E_PARAMETER]))


Follow ups