Skip to content

Commit

Permalink
Fix: splash screen removal (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Dec 29, 2023
2 parents 1137edc + 10c4d25 commit 2b80aa0
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 14 deletions.
2 changes: 1 addition & 1 deletion qgis_deployment_toolbelt/profiles/qgis_ini_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def set_splash_screen(
pass

# make sure that the file exists
if isinstance(ini_file, Path) and ini_file.exists() and switch:
if isinstance(ini_file, Path) and ini_file.exists():
# open
cfg_parser = self.cfg_parser()
cfg_parser.read(ini_file, encoding="UTF8")
Expand Down
14 changes: 1 addition & 13 deletions tests/fixtures/scenarios/good_scenario_sample.qdt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
settings:
DEBUG: false
LOCAL_WORK_DIR: ~/.cache/qgis-deployment-toolbelt/Oslandia/
LOCAL_WORK_DIR: ~/.cache/qgis-deployment-toolbelt/tests/
QGIS_EXE_PATH:
linux: /usr/bin/qgis
mac: /usr/bin/qgis
Expand Down Expand Up @@ -69,15 +69,3 @@ steps:
with:
action: create_or_restore
strict: false

- name: Create report
uses: telemetry-manager
with:
action: send
module: sentry

- name: Send log
uses: telemetry-manager
with:
action: send
module: sentry
58 changes: 58 additions & 0 deletions tests/fixtures/scenarios/good_scenario_splash_screen_remove.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This is a sample of a YAML file for the QGIS Deployment Toolbelt scenario.
# For now, it's more a roadmap than a real description of what it's implemented.

metadata:
title: "Test scenario removing splash screens"
id: sample-scenario-good-splash-removal
description: >-
Test scenario with splash screen removing
settings:
DEBUG: false
LOCAL_WORK_DIR: ~/.cache/qgis-deployment-toolbelt/tests/
QGIS_EXE_PATH:
linux: /usr/bin/qgis
mac: /usr/bin/qgis
windows: "%PROGRAMFILES%/QGIS/3_22/bin/qgis-bin.exe"
SCENARIO_VALIDATION: true

steps:
- name: Synchronize QGIS profiles from remote location
uses: qprofiles-manager
with:
action: download
source: https://gitlab.com/charente-eaux/ocarhy/profils-qgis.git
protocol: git
branch: main

- name: Download plugins
uses: qplugins-downloader
with:
force: false
threads: 5

- name: Synchronize plugins
uses: qplugins-synchronizer
with:
action: create_or_restore
profile_ref: downloaded
source: ~/.cache/qgis-deployment-toolbelt/plugins

- name: Create shortcuts for profiles
uses: shortcuts-manager
with:
action: create_or_restore
include:
- profile: oslandia
label: "QGIS - Profil Oslandia"
additional_arguments: "--noversioncheck"
desktop: true
start_menu: true
icon: "qgis_icon_oslandia.ico"
qgis_path: "%PROGRAMFILES%\\QGIS\\3_22\\bin\\qgis-bin.exe"

- name: Set splash screen
uses: splash-screen-manager
with:
action: remove
strict: false
83 changes: 83 additions & 0 deletions tests/fixtures/scenarios/good_scenario_with_unexisting_jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# This is a sample of a YAML file for the QGIS Deployment Toolbelt scenario.
# For now, it's more a roadmap than a real description of what it's implemented.

metadata:
title: "Sample scenario of QGIS Deployment Toolbelt"
id: sample-scenario-good
description: >-
This is an example a scenario YAML file for the QGIS Deployment Toolbelt to
demonstrate capabilities.
settings:
DEBUG: false
LOCAL_WORK_DIR: ~/.cache/qgis-deployment-toolbelt/tests/
QGIS_EXE_PATH:
linux: /usr/bin/qgis
mac: /usr/bin/qgis
windows: "%PROGRAMFILES%/QGIS/3_22/bin/qgis-bin.exe"
SCENARIO_VALIDATION: true

steps:
- name: Set environment variables
uses: manage-env-vars
with:
- name: PYQGIS_STARTUP
action: "add"
value: "~/scripts/qgis_startup.py"
scope: "user"
- name: QDT_TEST_FAKE_ENV_VAR_BOOL
action: "add"
value: true
scope: "user"

- name: Synchronize QGIS profiles from remote location
uses: qprofiles-manager
with:
action: download
source: https://gitlab.com/charente-eaux/ocarhy/profils-qgis.git
protocol: git
branch: main

- name: Download plugins
uses: qplugins-downloader
with:
force: false
threads: 5

- name: Synchronize plugins
uses: qplugins-synchronizer
with:
action: create_or_restore
profile_ref: downloaded
source: ~/.cache/qgis-deployment-toolbelt/plugins

- name: Create shortcuts for profiles
uses: shortcuts-manager
with:
action: create_or_restore
include:
- profile: oslandia
label: "QGIS - Profil Oslandia"
additional_arguments: "--noversioncheck"
desktop: true
start_menu: true
icon: "qgis_icon_oslandia.ico"
qgis_path: "%PROGRAMFILES%\\QGIS\\3_22\\bin\\qgis-bin.exe"

- name: Set splash screen
uses: splash-screen-manager
with:
action: create_or_restore
strict: false

- name: Create report
uses: telemetry-manager
with:
action: send
module: sentry

- name: Send log
uses: telemetry-manager
with:
action: send
module: sentry

0 comments on commit 2b80aa0

Please sign in to comment.