Skip to content
Snippets Groups Projects
Commit 4ef9067a authored by robinwilliam.hundt's avatar robinwilliam.hundt
Browse files

Fixed screenshots

parent 08ba8ad9
No related branches found
No related tags found
1 merge request!170Resolve "Updating own past feedback sets other tutors assignment to is_done=True"
Pipeline #105417 passed
......@@ -108,7 +108,8 @@ test_frontend:
- HEADLESS_TESTS=True pytest --ds=grady.settings.test functional_tests
artifacts:
paths:
- .screenshots/
- functional_tests/screenshots/
when: on_failure
expire_in: 30 days
test_frontend_unit:
......
export.json
export.csv
screenshots
......@@ -26,6 +26,7 @@ def expect_file_to_be_downloaded(path):
JSON_EXPORT_FILE = os.path.join(os.path.dirname(__file__), 'export.json')
SCREENSHOTS = os.path.join(os.path.dirname(__file__), 'screenshots')
class ExportTestModal(LiveServerTestCase):
......@@ -56,12 +57,14 @@ class ExportTestModal(LiveServerTestCase):
def tearDown(self):
try:
os.mkdir('.screenshots')
os.mkdir(SCREENSHOTS)
except FileExistsError:
pass
for method, error in self._outcome.errors:
if error:
self.browser.get_screenshot_as_file(".screenshots/" + self.id() + ".png")
self.browser.get_screenshot_as_file(
os.path.join(SCREENSHOTS, self.id() + ".png")
)
reset_browser_after_test(self.browser, self.live_server_url)
def _login(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment