Reputation: 463
I am using Cookiecutter Django with Docker and Webpack.
I'm struggling to use Selenium for functional tests with the way Cookiecutter Django template is set up.
I have added a Selenium container:
selenium_chrome:
image: selenium/standalone-chrome:latest
container_name: local_selenium_chrome
ports:
- '4444:4444'
volumes:
- /dev/shm:/dev/shm
I am using Django StaticLiveServerTestCase
in my functional test. This is launching a live Django server on a random port, which I can access like this: self.browser.get(self.live_server_url)
.
However, the static files are missing (CSS and JS) because they are served from a node
container in the Cookiecutter Django local setup.
What is the correct way to update my Cookiecutter Django template to be able to run Selenium tests with full static assets available?
Upvotes: 0
Views: 41