Anthias
Anthias copied to clipboard
Fix failing tests in `tests/splinter_test.py`.
Checklist
Fix These Failing Test Cases
- [x]
test_add_asset_image_upload
(splinter_test.WebTest
) - [x]
test_add_asset_streaming
(splinter_test.WebTest
) - [x]
test_add_asset_url
(splinter_test.WebTest
) - [x]
test_add_asset_video_upload
(splinter_test.WebTest
) - [x]
test_add_two_assets_upload
(splinter_test.WebTest
) - [x]
test_disable_asset
(splinter_test.WebTest
) - [x]
test_edit_asset
(splinter_test.WebTest
) - [x]
test_enable_asset
(splinter_test.WebTest
) - [x]
test_reorder_asset
(splinter_test.WebTest
) - [x]
test_rm_asset
(splinter_test.WebTest
) - [x]
test_settings_page_should_work
(splinter_test.WebTest
) - [x]
test_system_info_page_should_work
(splinter_test.WebTest
)
Additional Tasks
- [x] Resolve SonarCloud issues.
- [x] Even though all the test cases are now passing, find a way to remove the following – "Unable to get local Git branch" & "Unable to get latest version from GitHub"
- [ ] Execute
ffmpeg
installation during build time (at a Dockerfile) instead. You can take advantage of multi-stage builds.
Overview of the Issue
test_add_asset_image_upload (splinter_test.WebTest) ... ERROR
test_add_asset_streaming (splinter_test.WebTest) ... ERROR
test_add_asset_url (splinter_test.WebTest) ... ERROR
test_add_asset_video_upload (splinter_test.WebTest) ... ERROR
test_add_two_assets_upload (splinter_test.WebTest) ... ERROR
test_disable_asset (splinter_test.WebTest) ... ERROR
test_edit_asset (splinter_test.WebTest) ... ERROR
test_enable_asset (splinter_test.WebTest) ... ERROR
test_reorder_asset (splinter_test.WebTest) ... ERROR
test_rm_asset (splinter_test.WebTest) ... ERROR
test_settings_page_should_work (splinter_test.WebTest) ... ERROR
test_system_info_page_should_work (splinter_test.WebTest) ... ERROR
...
Ran 12 tests in 0.011s
FAILED (errors=12)
======================================================================
ERROR: test_add_asset_image_upload (splinter_test.WebTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/src/app/tests/splinter_test.py", line 128, in test_add_asset_image_upload
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
Reproduction Steps
First Time Setup
docker-compose -f docker-compose.dev.yml build
docker-compose -f docker-compose.dev.yml up -d
docker-compose -f docker-compose.dev.yml exec srly-ose-test bash bin/prepare_test_environment.sh -s
Running the Tests
docker-compose -f docker-compose.dev.yml exec srly-ose-test nosetests -v -a 'fixme' tests/splinter_test.py
Environment
- WSL 2 (Ubuntu 22.04, x86, 64-bit)
- Docker Desktop for Windows (accessible via WSL 2)
Logs (Latest Comes First)
Related PRs
- #1635
- ~#1633~