diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-01-12 22:02:31 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-01-12 22:02:31 (GMT) |
| commit | aab718f917b908c8c756952ae069e01108312e91 (patch) | |
| tree | 1b2f3526a961463f351e79ad9d6c9757f8bbf043 /wasp | |
| parent | a80c7dea1776cffd031d027c0b1878de2e1e6f41 (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.py | 20 |
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 |
