forked from openlp/openlp
Fix incorrect menu link
lp:~trb143/openlp/fixes245 (revision 2670) [SUCCESS] https://ci.openlp.io/job/Branch-01-Pull/1898/ [SUCCESS] https://ci.openlp.io/job/Branch-02-Functional-Tests/1809/ [SUCCESS] https://ci.openlp.io/job/Branch-03-Interface-Tests/1748/ [SUCCESS] https://ci.openlp.io/job/Branch-04a-Windows_Functional_Tests/1484/ [SUCCESS] https://ci.openlp.io/job/Branch-04b-Windows_Interface_Tests/1074/ [SUCCESS] https://ci.openlp.io/job/Branch-05a-Code_Analysis/1142/ [SUCCESS] https://... bzr-revno: 2669
This commit is contained in:
commit
4cb992fbd7
@ -189,7 +189,7 @@ class Ui_MainWindow(object):
|
|||||||
triggers=self.service_manager_contents.on_load_service_clicked)
|
triggers=self.service_manager_contents.on_load_service_clicked)
|
||||||
self.file_save_item = create_action(main_window, 'fileSaveItem', icon=':/general/general_save.png',
|
self.file_save_item = create_action(main_window, 'fileSaveItem', icon=':/general/general_save.png',
|
||||||
can_shortcuts=True, category=UiStrings().File,
|
can_shortcuts=True, category=UiStrings().File,
|
||||||
triggers=self.service_manager_contents.save_file)
|
triggers=self.service_manager_contents.decide_save_method)
|
||||||
self.file_save_as_item = create_action(main_window, 'fileSaveAsItem', can_shortcuts=True,
|
self.file_save_as_item = create_action(main_window, 'fileSaveAsItem', can_shortcuts=True,
|
||||||
category=UiStrings().File,
|
category=UiStrings().File,
|
||||||
triggers=self.service_manager_contents.save_file_as)
|
triggers=self.service_manager_contents.save_file_as)
|
||||||
|
@ -22,13 +22,18 @@
|
|||||||
"""
|
"""
|
||||||
Package to test the openlp.core.ui.firsttimeform package.
|
Package to test the openlp.core.ui.firsttimeform package.
|
||||||
"""
|
"""
|
||||||
from unittest.mock import patch
|
from unittest import TestCase
|
||||||
|
|
||||||
from openlp.core.ui.aboutform import AboutForm
|
from openlp.core.ui.aboutform import AboutForm
|
||||||
|
|
||||||
|
from tests.functional import patch
|
||||||
|
from tests.helpers.testmixin import TestMixin
|
||||||
|
|
||||||
|
|
||||||
|
class TestAboutForm(TestCase, TestMixin):
|
||||||
|
|
||||||
@patch('openlp.core.ui.aboutform.get_application_version')
|
@patch('openlp.core.ui.aboutform.get_application_version')
|
||||||
def test_create_about_form(mocked_get_application_version):
|
def test_create_about_form(self, mocked_get_application_version):
|
||||||
"""
|
"""
|
||||||
Test creating an about form
|
Test creating an about form
|
||||||
"""
|
"""
|
||||||
@ -41,9 +46,8 @@ def test_create_about_form(mocked_get_application_version):
|
|||||||
# THEN: The correct version information should be in the dialog
|
# THEN: The correct version information should be in the dialog
|
||||||
assert 'OpenLP 3.1.1 build 3000' in about_form.about_text_edit.toPlainText()
|
assert 'OpenLP 3.1.1 build 3000' in about_form.about_text_edit.toPlainText()
|
||||||
|
|
||||||
|
|
||||||
@patch('openlp.core.ui.aboutform.webbrowser')
|
@patch('openlp.core.ui.aboutform.webbrowser')
|
||||||
def test_on_volunteer_button_clicked(mocked_webbrowser):
|
def test_on_volunteer_button_clicked(self, mocked_webbrowser):
|
||||||
"""
|
"""
|
||||||
Test that clicking on the "Volunteer" button opens a web page.
|
Test that clicking on the "Volunteer" button opens a web page.
|
||||||
"""
|
"""
|
||||||
@ -55,3 +59,16 @@ def test_on_volunteer_button_clicked(mocked_webbrowser):
|
|||||||
|
|
||||||
# THEN: A web browser is opened
|
# THEN: A web browser is opened
|
||||||
mocked_webbrowser.open_new.assert_called_with('http://openlp.org/en/contribute')
|
mocked_webbrowser.open_new.assert_called_with('http://openlp.org/en/contribute')
|
||||||
|
|
||||||
|
def test_about_form_date_test(self):
|
||||||
|
"""
|
||||||
|
Test that the copyright date is included correctly
|
||||||
|
"""
|
||||||
|
# GIVEN: A correct application date
|
||||||
|
# WHEN: The about form is created
|
||||||
|
about_form = AboutForm(None)
|
||||||
|
license_text = about_form.license_text_edit.toPlainText()
|
||||||
|
|
||||||
|
# THEN: The date should be in the text twice.
|
||||||
|
self.assertTrue(license_text.count('2017', 0) == 2,
|
||||||
|
"The text string should be added twice to the license string")
|
||||||
|
Loading…
Reference in New Issue
Block a user