summaryrefslogtreecommitdiff
path: root/wasp
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2021-01-12 22:02:31 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2021-01-12 22:02:31 (GMT)
commitaab718f917b908c8c756952ae069e01108312e91 (patch)
tree1b2f3526a961463f351e79ad9d6c9757f8bbf043 /wasp
parenta80c7dea1776cffd031d027c0b1878de2e1e6f41 (diff)
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 <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp')
-rw-r--r--wasp/boards/simulator/test_qa.py20
1 files changed, 20 insertions, 0 deletions
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