]> git.ipfire.org Git - thirdparty/patchwork.git/commit
tests: Add a couple of Selenium tests
authorDamien Lespiau <damien.lespiau@intel.com>
Tue, 8 Sep 2015 18:00:11 +0000 (19:00 +0100)
committerStephen Finucane <stephen.finucane@intel.com>
Thu, 5 Nov 2015 04:22:55 +0000 (04:22 +0000)
commit59ca811755f56df329b5dbb73fc5c452fb94821c
treeb2ef6d7545a2599d20bafe1193da7f930e5abab6
parent266601e4943e04dbc0755382ebaa7129a28d9f03
tests: Add a couple of Selenium tests

While developing the new series UI, several bug crept in but weren't
discovered until later. All because we don't have in-browser tests to go
along the lower level tests we already have.

In particular, behaviours that need javascript to run cannot be tested
outside of a full environment with the pages being served to an actual
browser.

This commit introduces selenium to the test suite and starts with 2
simple tests to give a taste of what it looks like.

test_default_focus: make sure we do focus the username field on the
                    login page

test_login: shows how to chain actions to test the full login phase.
            This is quite similar the lower level test, except it also
            checks we display the username once logged in.

v2: Use LiveServerTestCase for django pre-1.7
v3: Propagate the DISPLAY environment variable to have an X display
    specified for the browser
v4: Log execution of the chrome driver, useful for debugging
v5: Rebase on top of upstream
v6: Pass environmental variables to tox and ensure PEP8 compliance

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
.gitignore
docs/requirements-dev.txt
patchwork/tests/browser.py [new file with mode: 0644]
patchwork/tests/test_user_browser.py [new file with mode: 0644]
tox.ini