1
0
Fork 0
wasp-os/wasp/boards/simulator/test_qa.py
Daniel Thompson aab718f917 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>
2021-01-12 22:02:31 +00:00

20 lines
513 B
Python

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