Skip to content

Commit

Permalink
Merge pull request #395 from lread/lread-stop-testing-with-phantomjs
Browse files Browse the repository at this point in the history
Stop testing PhantomJS
  • Loading branch information
lread authored May 12, 2022
2 parents a613bfe + 1d46c00 commit 0de083d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 34 deletions.
25 changes: 0 additions & 25 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,14 @@ jobs:
# care of installing a recent firefox and geckodriver (see below).
- image: circleci/clojure:lein-2.9.3-browsers

environment:
# PhantomJS requires an OpenSSL config even if it's an empty one,
# else it'll complain about "libssl_conf.so: cannot open shared object file"
# which seems to be a recent bug.
OPENSSL_CONF: /opt/openssl.cnf

steps:
- checkout
- run:
name: Install phantomjs
command: |
PHANTOMJS_VERSION=phantomjs-2.1.1-linux-x86_64 && \
wget --quiet --content-disposition https://bitbucket.org/ariya/phantomjs/downloads/$PHANTOMJS_VERSION.tar.bz2 && \
sudo tar xf $PHANTOMJS_VERSION.tar.bz2 -C /usr/local && \
sudo ln -s /usr/local/$PHANTOMJS_VERSION/bin/phantomjs /usr/local/bin/phantomjs && \
rm $PHANTOMJS_VERSION.tar.bz2
- run:
name: Environment information
command: |
firefox --version
google-chrome --version
chromedriver --version
phantomjs --version
# We want to share the results of "lein deps" between runs.
# We assume that the maven cache can change only if "project.clj"
Expand Down Expand Up @@ -60,13 +45,3 @@ jobs:

- store_test_results:
path: target/test2junit


# TODO
#
# * Emit test results in XUNIT format so that CircleCI can provide useful
# statistics, see
# https://circleci.com/docs/2.0/configuration-reference/#store_test_results
#
# * (optimization) parallelize the test jobs with CircleCI `workflows`
#
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
== Unreleased

* https://github.com/clj-commons/etaoin/issues/383[#383]: Drop testing for Safari on Windows
* https://github.com/clj-commons/etaoin/issues/388[#388]: Drop testing for PhantomJS
* Docs
** https://github.com/clj-commons/etaoin/issues/393[#393]: Add changelog
* Internal quality
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/en
&& chmod +x /tmp/entrypoint \
&& mv /tmp/entrypoint /entrypoint.sh

ENV ETAOIN_TEST_DRIVERS="[:firefox :chrome :phantom]"
ENV ETAOIN_TEST_DRIVERS="[:firefox :chrome]"

ENTRYPOINT ["/entrypoint.sh"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Since `0.4.0`, Etaoin can play script files created in the interactive

## Capabilities

- Currently supports Chrome, Firefox, Phantom.js and Safari (partially).
- Currently supports Chrome, Firefox, and Safari (partially).
- May either connect to a remote driver or run it on your local machine.
- Run your unit tests directly from Emacs pressing `C-t t` as usual.
- Can imitate human-like behaviour (delays, typos, etc).
Expand Down Expand Up @@ -189,7 +189,7 @@ Install specific drivers you need:
- `brew install geckodriver` for Mac users
- or download it from the official [Mozilla site][url-geckodriver-dl].

- Phantom.js browser:
- Phantom.js browser (obsolete, no longer tested):

- `brew install phantomjs` For Mac users
- or download it from the [official site][url-phantom-dl].
Expand Down
4 changes: 2 additions & 2 deletions src/etaoin/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
https://github.com/mozilla/geckodriver
https://github.com/mozilla/webdriver-rust/
Phantom.js (Ghostdriver)
Phantom.js (Ghostdriver) - obsolete and no longer tested
https://github.com/detro/ghostdriver/blob/
"
(:require [etaoin.proc :as proc]
Expand Down Expand Up @@ -1906,7 +1906,7 @@
- JS console logs have `:console-api` for `:source` field.
- Entries about errors will have SEVERE level.
* PhantomJS:
* PhantomJS (obsolete and no longer tested):
- Return all recorded logs since the last URL change.
- Does not clear recorded logs on subsequent invocations.
- JS console logs have nil for `:source` field.
Expand Down
8 changes: 4 additions & 4 deletions test/etaoin/api_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@

(defn get-drivers-from-prop []
(case (first (str/split (System/getProperty "os.name") #"\s+"))
"Linux" [:firefox :chrome :phantom]
"Mac" [:chrome :edge :firefox :phantom :safari]
"Windows" [:firefox :chrome :edge :phantom]
"Linux" [:firefox :chrome]
"Mac" [:chrome :edge :firefox :safari]
"Windows" [:firefox :chrome :edge]
nil))

(defn get-default-drivers []
[:firefox :chrome :phantom :safari])
[:firefox :chrome :safari])

(def default-opts
{:chrome {:args ["--no-sandbox"]}
Expand Down

0 comments on commit 0de083d

Please sign in to comment.