diff --git a/README.md b/README.md index d5311b5..a9343c2 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ This package for YunoHost used [django-yunohost-integration](https://github.com/ ## Screenshots -![](./doc/screenshots/v0.0.2 - hosts change list.png) -![](./doc/screenshots/v0.1.0.rc1 - Group Management.png) +![](./doc/screenshots/v002_hosts_change_list.png) +![](./doc/screenshots/v010rc1_group_management.png) ## Disclaimers / important information diff --git a/README_fr.md b/README_fr.md index bc56d11..003cd83 100644 --- a/README_fr.md +++ b/README_fr.md @@ -33,8 +33,8 @@ This package for YunoHost used [django-yunohost-integration](https://github.com/ ## Captures d'écran -![](./doc/screenshots/v0.0.2 - hosts change list.png) -![](./doc/screenshots/v0.1.0.rc1 - Group Management.png) +![](./doc/screenshots/v002_hosts_change_list.png) +![](./doc/screenshots/v010rc1_group_management.png) ## Avertissements / informations importantes diff --git a/doc/screenshots/v0.0.2 - hosts change list.png b/doc/screenshots/v002_hosts_change_list.png similarity index 100% rename from doc/screenshots/v0.0.2 - hosts change list.png rename to doc/screenshots/v002_hosts_change_list.png diff --git a/doc/screenshots/v0.1.0.rc1 - Group Management.png b/doc/screenshots/v010rc1_group_management.png similarity index 100% rename from doc/screenshots/v0.1.0.rc1 - Group Management.png rename to doc/screenshots/v010rc1_group_management.png diff --git a/tests/test_project_setup.py b/tests/test_project_setup.py index 479476f..793fd87 100644 --- a/tests/test_project_setup.py +++ b/tests/test_project_setup.py @@ -4,7 +4,8 @@ import shutil import subprocess from pathlib import Path -from bx_py_utils.path import assert_is_file +from bx_django_utils.filename import clean_filename +from bx_py_utils.path import assert_is_dir, assert_is_file import djfritz @@ -69,3 +70,20 @@ def test_requirements_txt(): ) print(diff) assert diff == '', f'{requirements_txt} is not up-to-date! (Hint: call: "make update")' + + +def test_screenshot_filenames(): + """ + https://forum.yunohost.org/t/yunohost-bot-cant-handle-spaces-in-screenshots/19483 + """ + screenshot_path = PACKAGE_ROOT / 'doc' / 'screenshots' + assert_is_dir(screenshot_path) + renamed = [] + for file_path in screenshot_path.iterdir(): + file_name = file_path.name + cleaned_name = clean_filename(file_name) + if cleaned_name != file_name: + new_path = file_path.with_name(cleaned_name) + file_path.rename(new_path) + renamed.append(f'{file_name!r} renamed to {cleaned_name!r}') + assert not renamed, f'Bad screenshots file names found: {", ".join(renamed)}'