openwisp / openwisp/openwisp-controller
[bug] Selenium tests contain JS errors due to failed websocket connection
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 773
- Forks
- 315
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 14
Description
Selenium tests contain JS errors due to failed websocket connection.
We need to switch from django's StaticLiveServerTestCase to ChannelsLiveServerTestCase.
I also recommend making the base selenium class in openwisp-utils automatically inherit ChannelsLiveServerTestCase and enforce this across OpenWISP.
We also have to figure out:
- How to automatically assign the debugging port (it seems ChannelsLiveServerTestCase doesn't define the port during class initialization)
- How to use BiDi sessions everywhere (due to Classic sessions being limited, see https://chromium.googlesource.com/chromium/src/+/5b3168e8f8c4487320c654dd761622b89d548514)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the shared Selenium base class in openwisp-utils and the OpenWISP Selenium tests that use StaticLiveServerTestCase; start by tracing their test setup and debugging-port initialization. Done means the tests use ChannelsLiveServerTestCase consistently, assign the debugging port reliably, and use BiDi sessions where required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100