Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .dockerignore

This file was deleted.

4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ __pycache__
.cache/
.tox
*.log
assets/
*.json
node_modules
build/
update.sh
results/
70 changes: 55 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,62 @@
sudo: required
language: python
services:
- docker

cache:
directories:
- $HOME/.cache/pip
- $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages
- node_modules

jobs:
include:
- stage:
env:
- TOXENV=flake8
language: python
python: 3.6
node_js: stable
addons:
firefox: latest-nightly
env: TOXENV=py36 MOZ_HEADLESS=1 GECKODRIVER=0.21.0
before_install:
- wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER/geckodriver-v$GECKODRIVER-linux64.tar.gz
- mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver
- export PATH=$HOME/geckodriver:$PATH
- firefox --version
- geckodriver --version
install:
- pip install tox
before_script:
- npm install
script: tox
- stage:
env: TOXENV=py27
language: python
python: 2.7
node_js: stable
addons:
firefox: latest-nightly
env: TOXENV=py27 MOZ_HEADLESS=1 GECKODRIVER=0.21.0
before_install:
- wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER/geckodriver-v$GECKODRIVER-linux64.tar.gz
- mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver
- export PATH=$HOME/geckodriver:$PATH
- firefox --version
- geckodriver --version
install:
- pip install tox
before_script:
- npm install
script: tox
- stage:
env:
- TOXENV=py36
cache:
pip: true
before_install: docker build -t axe-selenium-python .
install: skip
script:
- docker run -e TOXENV=$TOXENV axe-selenium-python tox
notifications:
email: fte-ci@mozilla.com
language: python
env: TOXENV=flake8
install:
- pip install tox

script: tox

deploy:
provider: pypi
user: kimberlythegeek
password:
secure: LHsL91XR32/M4r5ETAvaN/vUTakYByIfdwdCw6EI59LBvSnwaSant010QIl39+uafuev57yzUC/Y+orefczjkJnG3KdQBNS0Rt/zWIMw0Dr6Fp41Vg66e5URK/FRIwK36WlWzOcd3GkrQLLaDeqnXVzDWVMuXPP9/1ssu6mvriSeLctPsmX5N6m4yZwxNtpFsTLEh+BumXiamCuqjTI0RpyqxYlUVfio0G5LWeY9rkPskrwbSbc8xhq/PMk/ecLtlAxdn8AwgjLYCAt9d6NRfgL4Yp0R+kkfUQsX1Wf8A/pBNRr8Ht8Hy4CNlnEphgao4fgVEY4dc6tZL3FXOU9jQSmbChoANlbPzDhO+nb6d/QW5vLHVDufKyRQqtFxD90XFXlWFc/0gnD6tPZhi+UEFmBMoo9ugWDnYUeBd1T3lbwKT7sOmOQS58WhDVMLxPwr2BfgItGrNsaVHmzx9v0BnxZvD5ilmvNPrad6Rcsa0N8GtNXpnbyaupWzA97bemzuLqNHOjTm6TMZWRol6lLEJsJ1MRs7xWI4DYztXzlWITH7rvf6NNyvXKe9FPV3Lfoei3k1mT8QuEh6bIEFpBKRVV0ObQVSfFQ4M4wbgDBb3CbHVqMqFHgi98mpUo9tNGm4uzZCXw3hfEQpUPugKaH+VHoaylE+MR+fOhsyVlLQluM=
on:
distributions: sdist bdist_wheel
58 changes: 0 additions & 58 deletions CHANGELOG.rst

This file was deleted.

37 changes: 0 additions & 37 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include README.rst axe_selenium_python/src/axe.min.js
include README.rst axe_selenium_python/node_modules/axe-core/axe.min.js axe_selenium_python/tests/test_page.html
recursive-include *.rst *.txt
83 changes: 71 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,23 @@ axe-selenium-python

axe-selenium-python integrates aXe and selenium to enable automated web accessibility testing.

**This version of axe-selenium-python is using axe-core@3.0.3.**
**This version of axe-selenium-python is using axe-core@3.1.1.**

.. image:: https://img.shields.io/badge/license-MPL%202.0-blue.svg?style=flat-square
.. image:: https://img.shields.io/badge/license-MPL%202.0-blue.svg
:target: https://github.com/mozilla-services/axe-selenium-python/blob/master/LICENSE.txt
:alt: License
.. image:: https://img.shields.io/pypi/v/axe-selenium-python.svg?style=flat-square
.. image:: https://img.shields.io/pypi/v/axe-selenium-python.svg
:target: https://pypi.org/project/axe-selenium-python/
:alt: PyPI
.. image:: https://img.shields.io/travis/mozilla-services/axe-selenium-python.svg?style=flat-square
.. image:: https://img.shields.io/travis/mozilla-services/axe-selenium-python.svg
:target: https://travis-ci.org/mozilla-services/axe-selenium-python
:alt: Travis
.. image:: https://img.shields.io/pypi/wheel/axe-selenium-python.svg?style=flat-square
:target: https://pypi.org/project/axe-selenium-python/
:alt: wheel
.. image:: https://img.shields.io/github/issues-raw/mozilla-services/axe-selenium-python.svg?style=flat-square
.. image:: https://img.shields.io/github/issues-raw/mozilla-services/axe-selenium-python.svg
:target: https://github.com/mozilla-services/axe-selenium-python/issues
:alt: Issues
.. image:: https://pyup.io/repos/github/mozilla-services/axe-selenium-python/shield.svg?style=flat-square
.. image:: https://pyup.io/repos/github/mozilla-services/axe-selenium-python/shield.svg
:target: https://pyup.io/repos/github/mozilla-services/axe-selenium-python/
:alt: Updates
.. image:: https://pyup.io/repos/github/mozilla-services/axe-selenium-python/python-3-shield.svg?style=flat-square
:target: https://pyup.io/repos/github/mozilla-services/axe-selenium-python/
:alt: Python 3


Requirements
Expand Down Expand Up @@ -92,3 +86,68 @@ Resources
- `Issue Tracker <http://github.com/mozilla-services/axe-selenium-python/issues>`_
- `Code <http://github.com/mozilla-services/axe-selenium-python/>`_
- `pytest-axe <http://github.com/mozilla-services/pytest-axe/>`_

CHANGELOG
^^^^^^^^^^^^^^

version 2.1.0
**************
- Created package.json file to maintain axe-core dependency
- Replaced unit tests with more meaningful integration tests
- included a sample html file for integration tests

version 2.0.0
**************
- All functionalities that are not part of axe-core have been moved into a separate package, ``pytest-axe``. This includes:
- ``run_axe`` helper method
- ``get_rules`` Axe class method
- ``run`` Axe class method
- ``impact_included`` Axe class method
- ``analyze`` Axe class method.

The purpose of this change is to separate implementations that are specific to the Mozilla Firefox Test Engineering team, and leave the base ``axe-selenium-python`` package for a more broad use case. This package was modeled off of Deque's Java package, axe-selenium-java, and will now more closely mirror it.

All functionalities can still be utilized when using ``axe-selenium-python`` in conjunction with ``pytest-axe``.

version 1.2.3
**************
- Added the analyze method to the Axe class. This method runs accessibility checks, and writes the JSON results to file based on the page URL and the timestamp.
- Writing results to file can be enabled by setting the environment variable ``ACCESSIBILITY_REPORTING=true``. The files will be written to ``results/`` directory, which must be created if it does not already exist.
- Accessibility checks can be disabled by setting the environment variable ``ACCESSIBILITY_DISABLED=true``.

version 1.2.1
**************
- Updated axe.min.js to ``axe-core@2.6.1``
- Modified impact_included class method to reflect changes to the aXe API:
- There are now only 3 impact levels: 'critical', 'serious', and 'minor'

version 1.0.0
**************
- Updated usage examples in README
- Added docstrings to methods lacking documentation
- Removed unused files

version 0.0.3
**************
- Added run method to Axe class to simplify the usage in existing test suites
- run method includes the ability to set what impact level to test for: 'minor', 'moderate', 'severe', 'critical'

version 0.0.276
****************
- Added pytest-axe usage example to README

version 0.0.275
****************
- Added usage example to README

version 0.0.273
****************
- Added selenium instance as a class attribute
- Changed file paths to OS independent structure
- Fixed file read operations to use with keyword


version 0.0.21
***************
- Fixed include of aXe API file and references to it
- Updated README
2 changes: 1 addition & 1 deletion axe_selenium_python/axe.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from io import open
from os import path

_DEFAULT_SCRIPT = path.join(path.dirname(__file__), 'src', 'axe.min.js')
_DEFAULT_SCRIPT = path.join(path.dirname(__file__), 'node_modules', 'axe-core', 'axe.min.js')


class Axe(object):
Expand Down
13 changes: 13 additions & 0 deletions axe_selenium_python/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions axe_selenium_python/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "axe-selenium-python",
"version": "0.0.1",
"description": "Integrate axe-core with python",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/kimberlythegeek/axe-selenium-python.git"
},
"author": "Kimberly Sereduck",
"license": "MPL-2.0",
"bugs": {
"url": "https://github.com/kimberlythegeek/axe-selenium-python/issues"
},
"homepage": "https://github.com/kimberlythegeek/axe-selenium-python#readme",
"dependencies": {
"axe-core": ">=3.1.0"
}
}
1 change: 0 additions & 1 deletion axe_selenium_python/src/axe.min.js

This file was deleted.

8 changes: 4 additions & 4 deletions axe_selenium_python/tests/test_axe.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
_DEFAULT_TEST_FILE = path.join(path.dirname(__file__), 'test_page.html')


@pytest.fixture(params=('Firefox', pytest.mark.xfail('Chrome', reason="issue #118")))
def driver(request):
driver = getattr(webdriver, request.param)()
@pytest.fixture
def driver():
driver = webdriver.Firefox()
yield driver
driver.close()

Expand All @@ -27,7 +27,7 @@ def test_run_axe_sample_page(driver):
axe.inject()
data = axe.execute()

assert len(data["inapplicable"]) == 46
assert len(data["inapplicable"]) == 50
assert len(data["incomplete"]) == 0
assert len(data["passes"]) == 7
assert len(data["violations"]) == 8
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "axe-selenium-python",
"version": "0.0.1",
"description": "Integrate axe-core with python",
"main": "index.js",
"scripts": {
"install": "cd axe_selenium_python && npm install"
},
"repository": {
"type": "git",
"url": "git+https://github.com/kimberlythegeek/axe-selenium-python.git"
},
"author": "Kimberly Sereduck",
"license": "MPL-2.0",
"bugs": {
"url": "https://github.com/kimberlythegeek/axe-selenium-python/issues"
},
"homepage": "https://github.com/kimberlythegeek/axe-selenium-python#readme"
}
Loading