From aab718f917b908c8c756952ae069e01108312e91 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Tue, 12 Jan 2021 22:02:31 +0000 Subject: simulator: test_qa: Add some simply QA tests for app screenshots Add tests to make sure every app has a screenshot... and fix the problems picked up by the new tests! Signed-off-by: Daniel Thompson diff --git a/README.rst b/README.rst index 501b83c..7e6e8e8 100644 --- a/README.rst +++ b/README.rst @@ -132,7 +132,7 @@ PineTime: :width: 233 Screenshots of the built in applications running on the wasp-os -simulator (the "blank" screen is the torch application): +simulator: .. image:: res/Bootloader.png :alt: Bootloader splash screen overlaid on the simulator watch art @@ -158,21 +158,26 @@ simulator (the "blank" screen is the torch application): :alt: Application launcher running on the wasp-os simulator :width: 179 -.. image:: res/SelfTestApp.png - :alt: Self test application running a rendering benchmark on the simulator - :width: 179 - .. image:: res/SettingsApp.png :alt: Settings application running on the wasp-os simulator :width: 179 -.. image:: res/TorchApp.png - :alt: Torch application running on the wasp-os simulator +.. image:: res/SoftwareApp.png + :alt: Software selection app running on the wasp-os simulator :width: 179 + wasp-os also contains a library of additional applications for you to choose. -These are disabled by default but can be easily enabled by adding them -using one of the techniques is the Application Writer's guide. +These are disabled by default but can be easily enabled using the Software +application (and the "blank" white screen is a torch application): + +.. image:: res/SelfTestApp.png + :alt: Self test application running a rendering benchmark on the simulator + :width: 179 + +.. image:: res/TorchApp.png + :alt: Torch application running on the wasp-os simulator + :width: 179 .. image:: res/ChronoApp.png :alt: Analogue clock application running in the wasp-os simulator @@ -190,6 +195,10 @@ using one of the techniques is the Application Writer's guide. :alt: Game of Life running in the wasp-os simulator :width: 179 +.. image:: res/AlarmApp.png + :alt: Alarm clock application running in the wasp-os simulator + :width: 179 + .. image:: res/MusicApp.png :alt: Music Player running in the wasp-os simulator :width: 179 diff --git a/res/SoftwareApp.png b/res/SoftwareApp.png new file mode 100644 index 0000000..0e03a34 Binary files /dev/null and b/res/SoftwareApp.png differ diff --git a/wasp/boards/simulator/test_qa.py b/wasp/boards/simulator/test_qa.py new file mode 100644 index 0000000..206e505 --- /dev/null +++ b/wasp/boards/simulator/test_qa.py @@ -0,0 +1,20 @@ +import pytest +import wasp +import os + +EXCLUDE = ('Notifications', 'Template', 'Demo') + +def test_screenshot(constructor): + if constructor.NAME in EXCLUDE: + return + fname = f'res/{constructor.NAME}App.png'.replace(' ', '') + assert os.path.exists(fname) + +def test_screenshot_README(constructor): + if constructor.NAME in EXCLUDE: + return + fname = f'res/{constructor.NAME}App.png'.replace(' ', '') + + with open('README.rst') as f: + readme = f.read() + assert fname in readme -- cgit v0.10.2