Skip to content

Commit 22a6e1e

Browse files
author
Kimberly Sereduck
authored
Added package.json file to maintain axe-core dependency (#129)
* fixing password hash for pypi * added package.json to manage axe-core updates more easily * updated setup.py and MANIFEST.in to include new axe.js file, and the sample page for test * adding pypi deployment to travis * moved changelog into readme to fix file not found error * run tests without docker * removing chrome tests
1 parent faf3bed commit 22a6e1e

File tree

15 files changed

+203
-149
lines changed

15 files changed

+203
-149
lines changed

.dockerignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ __pycache__
1313
.cache/
1414
.tox
1515
*.log
16-
assets/
17-
*.json
16+
node_modules
1817
build/
1918
update.sh
20-
results/

.travis.yml

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,62 @@
11
sudo: required
22
language: python
3-
services:
4-
- docker
3+
4+
cache:
5+
directories:
6+
- $HOME/.cache/pip
7+
- $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages
8+
- node_modules
9+
510
jobs:
611
include:
712
- stage:
8-
env:
9-
- TOXENV=flake8
13+
language: python
14+
python: 3.6
15+
node_js: stable
16+
addons:
17+
firefox: latest-nightly
18+
env: TOXENV=py36 MOZ_HEADLESS=1 GECKODRIVER=0.21.0
19+
before_install:
20+
- wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER/geckodriver-v$GECKODRIVER-linux64.tar.gz
21+
- mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver
22+
- export PATH=$HOME/geckodriver:$PATH
23+
- firefox --version
24+
- geckodriver --version
25+
install:
26+
- pip install tox
27+
before_script:
28+
- npm install
29+
script: tox
1030
- stage:
11-
env: TOXENV=py27
31+
language: python
32+
python: 2.7
33+
node_js: stable
34+
addons:
35+
firefox: latest-nightly
36+
env: TOXENV=py27 MOZ_HEADLESS=1 GECKODRIVER=0.21.0
37+
before_install:
38+
- wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER/geckodriver-v$GECKODRIVER-linux64.tar.gz
39+
- mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver
40+
- export PATH=$HOME/geckodriver:$PATH
41+
- firefox --version
42+
- geckodriver --version
43+
install:
44+
- pip install tox
45+
before_script:
46+
- npm install
47+
script: tox
1248
- stage:
13-
env:
14-
- TOXENV=py36
15-
cache:
16-
pip: true
17-
before_install: docker build -t axe-selenium-python .
18-
install: skip
19-
script:
20-
- docker run -e TOXENV=$TOXENV axe-selenium-python tox
21-
notifications:
22-
email: fte-ci@mozilla.com
49+
language: python
50+
env: TOXENV=flake8
51+
install:
52+
- pip install tox
53+
54+
script: tox
55+
56+
deploy:
57+
provider: pypi
58+
user: kimberlythegeek
59+
password:
60+
secure: LHsL91XR32/M4r5ETAvaN/vUTakYByIfdwdCw6EI59LBvSnwaSant010QIl39+uafuev57yzUC/Y+orefczjkJnG3KdQBNS0Rt/zWIMw0Dr6Fp41Vg66e5URK/FRIwK36WlWzOcd3GkrQLLaDeqnXVzDWVMuXPP9/1ssu6mvriSeLctPsmX5N6m4yZwxNtpFsTLEh+BumXiamCuqjTI0RpyqxYlUVfio0G5LWeY9rkPskrwbSbc8xhq/PMk/ecLtlAxdn8AwgjLYCAt9d6NRfgL4Yp0R+kkfUQsX1Wf8A/pBNRr8Ht8Hy4CNlnEphgao4fgVEY4dc6tZL3FXOU9jQSmbChoANlbPzDhO+nb6d/QW5vLHVDufKyRQqtFxD90XFXlWFc/0gnD6tPZhi+UEFmBMoo9ugWDnYUeBd1T3lbwKT7sOmOQS58WhDVMLxPwr2BfgItGrNsaVHmzx9v0BnxZvD5ilmvNPrad6Rcsa0N8GtNXpnbyaupWzA97bemzuLqNHOjTm6TMZWRol6lLEJsJ1MRs7xWI4DYztXzlWITH7rvf6NNyvXKe9FPV3Lfoei3k1mT8QuEh6bIEFpBKRVV0ObQVSfFQ4M4wbgDBb3CbHVqMqFHgi98mpUo9tNGm4uzZCXw3hfEQpUPugKaH+VHoaylE+MR+fOhsyVlLQluM=
61+
on:
62+
distributions: sdist bdist_wheel

CHANGELOG.rst

Lines changed: 0 additions & 58 deletions
This file was deleted.

Dockerfile

Lines changed: 0 additions & 37 deletions
This file was deleted.

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
include README.rst axe_selenium_python/src/axe.min.js
1+
include README.rst axe_selenium_python/node_modules/axe-core/axe.min.js axe_selenium_python/tests/test_page.html
22
recursive-include *.rst *.txt

README.rst

Lines changed: 71 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,23 @@ axe-selenium-python
33

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

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

8-
.. image:: https://img.shields.io/badge/license-MPL%202.0-blue.svg?style=flat-square
8+
.. image:: https://img.shields.io/badge/license-MPL%202.0-blue.svg
99
:target: https://github.com/mozilla-services/axe-selenium-python/blob/master/LICENSE.txt
1010
:alt: License
11-
.. image:: https://img.shields.io/pypi/v/axe-selenium-python.svg?style=flat-square
11+
.. image:: https://img.shields.io/pypi/v/axe-selenium-python.svg
1212
:target: https://pypi.org/project/axe-selenium-python/
1313
:alt: PyPI
14-
.. image:: https://img.shields.io/travis/mozilla-services/axe-selenium-python.svg?style=flat-square
14+
.. image:: https://img.shields.io/travis/mozilla-services/axe-selenium-python.svg
1515
:target: https://travis-ci.org/mozilla-services/axe-selenium-python
1616
:alt: Travis
17-
.. image:: https://img.shields.io/pypi/wheel/axe-selenium-python.svg?style=flat-square
18-
:target: https://pypi.org/project/axe-selenium-python/
19-
:alt: wheel
20-
.. image:: https://img.shields.io/github/issues-raw/mozilla-services/axe-selenium-python.svg?style=flat-square
17+
.. image:: https://img.shields.io/github/issues-raw/mozilla-services/axe-selenium-python.svg
2118
:target: https://github.com/mozilla-services/axe-selenium-python/issues
2219
:alt: Issues
23-
.. image:: https://pyup.io/repos/github/mozilla-services/axe-selenium-python/shield.svg?style=flat-square
20+
.. image:: https://pyup.io/repos/github/mozilla-services/axe-selenium-python/shield.svg
2421
:target: https://pyup.io/repos/github/mozilla-services/axe-selenium-python/
2522
:alt: Updates
26-
.. image:: https://pyup.io/repos/github/mozilla-services/axe-selenium-python/python-3-shield.svg?style=flat-square
27-
:target: https://pyup.io/repos/github/mozilla-services/axe-selenium-python/
28-
:alt: Python 3
2923

3024

3125
Requirements
@@ -92,3 +86,68 @@ Resources
9286
- `Issue Tracker <http://github.com/mozilla-services/axe-selenium-python/issues>`_
9387
- `Code <http://github.com/mozilla-services/axe-selenium-python/>`_
9488
- `pytest-axe <http://github.com/mozilla-services/pytest-axe/>`_
89+
90+
CHANGELOG
91+
^^^^^^^^^^^^^^
92+
93+
version 2.1.0
94+
**************
95+
- Created package.json file to maintain axe-core dependency
96+
- Replaced unit tests with more meaningful integration tests
97+
- included a sample html file for integration tests
98+
99+
version 2.0.0
100+
**************
101+
- All functionalities that are not part of axe-core have been moved into a separate package, ``pytest-axe``. This includes:
102+
- ``run_axe`` helper method
103+
- ``get_rules`` Axe class method
104+
- ``run`` Axe class method
105+
- ``impact_included`` Axe class method
106+
- ``analyze`` Axe class method.
107+
108+
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.
109+
110+
All functionalities can still be utilized when using ``axe-selenium-python`` in conjunction with ``pytest-axe``.
111+
112+
version 1.2.3
113+
**************
114+
- 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.
115+
- 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.
116+
- Accessibility checks can be disabled by setting the environment variable ``ACCESSIBILITY_DISABLED=true``.
117+
118+
version 1.2.1
119+
**************
120+
- Updated axe.min.js to ``axe-core@2.6.1``
121+
- Modified impact_included class method to reflect changes to the aXe API:
122+
- There are now only 3 impact levels: 'critical', 'serious', and 'minor'
123+
124+
version 1.0.0
125+
**************
126+
- Updated usage examples in README
127+
- Added docstrings to methods lacking documentation
128+
- Removed unused files
129+
130+
version 0.0.3
131+
**************
132+
- Added run method to Axe class to simplify the usage in existing test suites
133+
- run method includes the ability to set what impact level to test for: 'minor', 'moderate', 'severe', 'critical'
134+
135+
version 0.0.276
136+
****************
137+
- Added pytest-axe usage example to README
138+
139+
version 0.0.275
140+
****************
141+
- Added usage example to README
142+
143+
version 0.0.273
144+
****************
145+
- Added selenium instance as a class attribute
146+
- Changed file paths to OS independent structure
147+
- Fixed file read operations to use with keyword
148+
149+
150+
version 0.0.21
151+
***************
152+
- Fixed include of aXe API file and references to it
153+
- Updated README

axe_selenium_python/axe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from io import open
77
from os import path
88

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

1111

1212
class Axe(object):

axe_selenium_python/package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

axe_selenium_python/package.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "axe-selenium-python",
3+
"version": "0.0.1",
4+
"description": "Integrate axe-core with python",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/kimberlythegeek/axe-selenium-python.git"
12+
},
13+
"author": "Kimberly Sereduck",
14+
"license": "MPL-2.0",
15+
"bugs": {
16+
"url": "https://github.com/kimberlythegeek/axe-selenium-python/issues"
17+
},
18+
"homepage": "https://github.com/kimberlythegeek/axe-selenium-python#readme",
19+
"dependencies": {
20+
"axe-core": ">=3.1.0"
21+
}
22+
}

0 commit comments

Comments
 (0)