Publish the coverage report, plus bug fixes.

- Default theme level to Global, as per #48
- Make song delete message make more sense, fixes #64
- Publish the coverate report to OpenLP's GitLab page
This commit is contained in:
Raoul Snyman 2019-10-10 15:26:56 +00:00 committed by Tim Bentley
parent 4172838a3e
commit ff1b2dab63
3 changed files with 21 additions and 4 deletions

View File

@ -1,6 +1,7 @@
stages: stages:
- lint - lint
- test - test
- deploy
lint: lint:
stage: lint stage: lint
@ -17,6 +18,9 @@ test-debian:
- sh scripts/generate_resources.sh - sh scripts/generate_resources.sh
script: script:
- xvfb-run -s '-screen 0 1024x768x24' pytest-3 --color=no --disable-warnings --ignore tests/functional/openlp_plugins/presentations/test_pdfcontroller.py --cov openlp --cov-report term --cov-report html - xvfb-run -s '-screen 0 1024x768x24' pytest-3 --color=no --disable-warnings --ignore tests/functional/openlp_plugins/presentations/test_pdfcontroller.py --cov openlp --cov-report term --cov-report html
artifacts:
paths:
- htmlcov
test-ubuntu: test-ubuntu:
stage: test stage: test
@ -53,3 +57,16 @@ test-macos:
- python3 -m pytest --color=no --disable-warnings - python3 -m pytest --color=no --disable-warnings
only: only:
- master@openlp/openlp - master@openlp/openlp
pages:
stage: deploy
script:
- mv htmlcov public
artifacts:
paths:
- public
expire_in: 30 days
dependencies:
- test-debian
only:
- master@openlp/openlp

View File

@ -226,7 +226,7 @@ class Settings(QtCore.QSettings):
'themes/last directory': None, 'themes/last directory': None,
'themes/last directory export': None, 'themes/last directory export': None,
'themes/last directory import': None, 'themes/last directory import': None,
'themes/theme level': ThemeLevel.Song, 'themes/theme level': ThemeLevel.Global,
'themes/wrap footer': False, 'themes/wrap footer': False,
'user interface/live panel': True, 'user interface/live panel': True,
'user interface/live splitter geometry': QtCore.QByteArray(), 'user interface/live splitter geometry': QtCore.QByteArray(),

View File

@ -509,12 +509,12 @@ class SongMediaItem(MediaManagerItem):
Remove a song from the list and database Remove a song from the list and database
""" """
if check_item_selected(self.list_view, UiStrings().SelectDelete): if check_item_selected(self.list_view, UiStrings().SelectDelete):
items = self.list_view.selectedIndexes() items = self.list_view.selectedItems()
if QtWidgets.QMessageBox.question( if QtWidgets.QMessageBox.question(
self, UiStrings().ConfirmDelete, self, UiStrings().ConfirmDelete,
translate('SongsPlugin.MediaItem', translate('SongsPlugin.MediaItem',
'Are you sure you want to delete the "{items:d}" ' 'Are you sure you want to delete the following songs?') +
'selected song(s)?').format(items=len(items)), '\n\n- {songs}'.format(songs='\n- '.join([item.text() for item in items])),
defaultButton=QtWidgets.QMessageBox.Yes) == QtWidgets.QMessageBox.No: defaultButton=QtWidgets.QMessageBox.Yes) == QtWidgets.QMessageBox.No:
return return
self.application.set_busy_cursor() self.application.set_busy_cursor()