Skip to content

Commit

Permalink
Removed official support for PhantomJS
Browse files Browse the repository at this point in the history
  • Loading branch information
spookylukey committed Oct 29, 2018
1 parent f552f62 commit ebde227
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 38 deletions.
2 changes: 0 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ To run the full test suite, you will need to install:

* `chromedriver <https://sites.google.com/a/chromium.org/chromedriver>`_

* `PhantomJS <http://phantomjs.org/>`_.

6. Commit your changes and push your branch to GitHub::

$ git add .
Expand Down
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ History
* Fixed bug with setting checkboxes if a form with multiple checkboxes of the same name
* Enabled installation on PyPy (doesn't necessarily work completely).
* Test against Django 2.1
* Removed tests and official support for PhantomJS. (No actual functionality
was changed regarding PhantomJS).

1.0.3
+++++
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ Features
* Many of the gotchas and difficulties of using WebTest and Selenium ironed out
for you.

* Well tested - as well as its own test suite, which is run against Firefox,
Chrome, and PhantomJS, it is also used by `Wolf & Badger
* Well tested - as well as its own test suite, which is run against Firefox
and Chrome, it is also used by `Wolf & Badger
<https://www.wolfandbadger.com/>`_ for tests covering many business critical
functionalities.

Expand Down
6 changes: 0 additions & 6 deletions django_functest/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def binary_available(filename):

firefox_available = binary_available("firefox")
chrome_available = binary_available("chromedriver")
phantomjs_available = binary_available("phantomjs")


@override_settings(DEBUG=True) # easier debugging
Expand Down Expand Up @@ -81,8 +80,3 @@ def get_webdriver_options(cls):
class ChromeBase(HideBrowserMixin, SeleniumBaseMixin, FuncSeleniumMixin,
MultiThreadedLiveServerMixin, MyLiveServerTestCase):
driver_name = "Chrome"


@unittest.skipIf(not phantomjs_available, "PhantomJS not available, skipping")
class PhantomJSBase(SeleniumBaseMixin, FuncSeleniumMixin, MyLiveServerTestCase):
driver_name = "PhantomJS"
6 changes: 1 addition & 5 deletions django_functest/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
)
from django_functest.tests.models import Thing

from .base import ChromeBase, FirefoxBase, PhantomJSBase, WebTestBase
from .base import ChromeBase, FirefoxBase, WebTestBase

try:
from django.urls import reverse
Expand Down Expand Up @@ -462,7 +462,3 @@ class TestFuncSeleniumCommonFirefox(TestFuncSeleniumCommonBase, FirefoxBase):

class TestFuncSeleniumCommonChrome(TestFuncSeleniumCommonBase, ChromeBase):
pass


class TestFuncSeleniumCommonPhantomJS(TestFuncSeleniumCommonBase, PhantomJSBase):
pass
13 changes: 1 addition & 12 deletions django_functest/tests/test_selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from django_functest import AdminLoginMixin, FuncBaseMixin

from .base import ChromeBase, FirefoxBase, PhantomJSBase
from .base import ChromeBase, FirefoxBase
from .models import Thing

try:
Expand Down Expand Up @@ -139,13 +139,6 @@ class TestFuncSeleniumSpecificChrome(TestFuncSeleniumSpecificBase, ChromeBase):
pass


class TestFuncSeleniumSpecificPhantomJS(TestFuncSeleniumSpecificBase, PhantomJSBase):

# This fails for PhantomJS that is installed on Travis server, hard to debug
# why.
test_double_click_element_that_disappears = unittest.expectedFailure(TestFuncSeleniumSpecificBase.test_double_click_element_that_disappears) # noqa


# Test class attribute `browser_window_size` works correctly:

class TestBrowserSizeBase(object):
Expand Down Expand Up @@ -175,7 +168,3 @@ class TestBrowserSizeFirefox(TestBrowserSizeBase, FirefoxBase):

class TestBrowserSizeChrome(TestBrowserSizeBase, ChromeBase):
pass


class TestBrowserSizePhantomJS(TestBrowserSizeBase, PhantomJSBase):
pass
10 changes: 1 addition & 9 deletions django_functest/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from django_functest import AdminLoginMixin, FuncBaseMixin, FuncSeleniumMixin, FuncWebTestMixin, ShortcutLoginMixin

from .base import ChromeBase, FirefoxBase, PhantomJSBase, WebTestBase
from .base import ChromeBase, FirefoxBase, WebTestBase

LOGGED_OUT_URL = "/admin/login/?next=/admin/"

Expand Down Expand Up @@ -45,10 +45,6 @@ class TestShortcutLoginChrome(TestShortcutLoginBase, ChromeBase):
pass


class TestShortcutLoginPhantomJS(TestShortcutLoginBase, PhantomJSBase):
pass


class TestAdminLoginBase(AdminLoginMixin):

def setUp(self):
Expand Down Expand Up @@ -94,10 +90,6 @@ class TestAdminLoginChrome(TestAdminLoginBase, ChromeBase):
pass


class TestAdminLoginPhantomJS(TestAdminLoginBase, PhantomJSBase):
pass


class TestDocStrings(TestCase):
def test_doc_strings(self):
bad_docstrings = []
Expand Down
5 changes: 4 additions & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,7 @@ the browser to use, and note the following:
Firefox (58.0), geckodriver (0.20.0) and Selenium (3.11), the django-functest
suite passes fully.

* If installed `PhantomJS <http://phantomjs.org/>`_ can be used.
* If installed `PhantomJS <http://phantomjs.org/>`_ can be used. PhantomJS is no
longer officially supported - the test suite does not run against it and and
bugs for it will not be fixed. This is because the project has been abandoned,
and Selenium also no longer supports it.
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
envlist = {py27,py34,py35,pypy}-django18, {py35}-django{19,110,111}, {py34,py36}-django20, py36-django21, py27-checkmanifest, py27-isort, py27-flake8

[testenv]
whitelist_externals = phantomjs
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH TEST_FIREFOX_BINARY TEST_SKIP_SELENIUM
commands =
coverage run -p runtests.py
Expand Down

0 comments on commit ebde227

Please sign in to comment.