Skip to content

Conversation

@kimberlythegeek
Copy link
Contributor

No description provided.

Copy link

@m8ttyB m8ttyB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

Copy link

@b4handjr b4handjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments.

.travis.yml Outdated
include:
- stage:
language: python
python: 3.6

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to set a current python version for legacy, which should be 2.7.12. The default one is 2.7.6

python: 3.6
env: TOXENV=py3
before_install:
- wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v0.20.0/geckodriver-v0.20.0-linux64.tar.gz

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should only need this once.

axe = Axe(selenium)
axe.inject()
data = axe.execute()
assert data is not None, data
Copy link

@b4handjr b4handjr Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you look for something specific here? Checking for not None isn't really a test.

"""Assert that run method returns results."""
axe = Axe(selenium)
violations = axe.run()
assert violations is not None

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

violations = axe.run()

report = axe.report(violations)
assert report is not None, report

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

def test_get_rules(axe):
def test_get_rules(selenium):
"""Assert number of rule tests matches number of available rules."""
axe = Axe(selenium)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably get it's own fixture since it seems to be called for each test.

- mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver
- export PATH=$HOME/geckodriver:$PATH
- firefox --version
- geckodriver --version

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you aren't starting any kind of window manager. If you don't want these to run headless, you need to start a window management service. See this.

Or you could run firefox as headless using the env variable MOZ_HEADLESS=1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did try setting MOZ_HEADLESS=1, and I'm still seeing the same error.

As far as checking for not None, I'm not really sure what to check for, unless I save JSON data and check the new data against that.

I really just want to see if it returns anything.

What do you suggest?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could either have firefox open a page within a directory or you could use this.

# You can obtain one at http://mozilla.org/MPL/2.0/.

from os import path
import pytest

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should follow PEP8 for import order.

@kimberlythegeek kimberlythegeek force-pushed the 61_update_travis_config branch from 72271a1 to 7647d51 Compare March 21, 2018 14:25
.travis.yml Outdated
- MOZ_HEADLESS=1
addons:
firefox: latest-nightly
env: TOXENV=py27

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have 2 env properties here. I don't think headless is being set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a-ha. Thanks for that catch

.travis.yml Outdated
- MOZ_HEADLESS=1
addons:
firefox: latest-nightly
env: TOXENV=py3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 env properties here as well.

@kimberlythegeek
Copy link
Contributor Author

Going with Jenkins CI in #65 #66

@kimberlythegeek kimberlythegeek deleted the 61_update_travis_config branch March 26, 2018 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants