Anthias icon indicating copy to clipboard operation
Anthias copied to clipboard

Fix failing tests in `tests/splinter_test.py`.

Open nicomiguelino opened this issue 1 year ago • 4 comments

Might fix #1624

nicomiguelino avatar Oct 11 '22 20:10 nicomiguelino

Logs (Commit f1602035c18c9b2f6f4df44892f50757ef889e68)

Overview

I tried using zope.testbrowser instead of the default (Firefox) for headless testing, and the error below disappeared. However, I've experienced issues in clicking the add asset button programmatically. It might be that the driver is not opening the modal when clicked. I'm not 100% sure about that though.

test_add_asset_url (splinter_test.WebTest) ... ERROR

======================================================================
ERROR: test_add_asset_url (splinter_test.WebTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/src/app/tests/splinter_test.py", line 71, in test_add_asset_url
    with Browser() as browser:
  File "/usr/local/lib/python2.7/dist-packages/splinter/browser.py", line 92, in Browser
    return get_driver(driver, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/splinter/browser.py", line 70, in get_driver
    raise err
SessionNotCreatedException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line

nicomiguelino avatar Oct 12 '22 03:10 nicomiguelino

Logs (Commit 42e6f1d45013ce7c8f4d28f2c24f0c1c1420b8d2)

test_add_asset_image_upload (splinter_test.WebTest) ... ok
test_add_asset_url (splinter_test.WebTest) ... ok

----------------------------------------------------------------------
Ran 2 tests in 14.692s

OK

nicomiguelino avatar Oct 12 '22 20:10 nicomiguelino

Hello @vpetersson & @rusko124. I'm not yet done with all of the test cases inside splinter_test.py but would like to ask for a review of the changes in files related to CI, Docker, and other scripts.

nicomiguelino avatar Oct 13 '22 20:10 nicomiguelino

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarcloud[bot] avatar Oct 19 '22 15:10 sonarcloud[bot]