From c7970eb2eed6079015d62476211b1efb706a3d87 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 20 Dec 2016 21:32:46 +0100 Subject: [PATCH] Xfail tests which fail on Docker/Travis See #2183 --- pytest.ini | 1 + scripts/dev/ci/travis_run.sh | 2 +- tests/conftest.py | 6 ++++++ tests/end2end/features/editor.feature | 1 + tests/end2end/features/yankpaste.feature | 5 ++++- tests/end2end/features/zoom.feature | 2 ++ tox.ini | 2 +- 7 files changed, 16 insertions(+), 3 deletions(-) diff --git a/pytest.ini b/pytest.ini index 2285053a9..24f5a4528 100644 --- a/pytest.ini +++ b/pytest.ini @@ -20,6 +20,7 @@ markers = qtwebengine_flaky: Tests which are flaky (and currently skipped) with QtWebEngine qtwebengine_osx_xfail: Tests which fail on OS X with QtWebEngine js_prompt: Tests needing to display a javascript prompt + issue2183: https://github.com/The-Compiler/qutebrowser/issues/2183 this: Used to mark tests during development qt_log_level_fail = WARNING qt_log_ignore = diff --git a/scripts/dev/ci/travis_run.sh b/scripts/dev/ci/travis_run.sh index 86c2b11a8..a4c4c6cdb 100644 --- a/scripts/dev/ci/travis_run.sh +++ b/scripts/dev/ci/travis_run.sh @@ -1,7 +1,7 @@ #!/bin/bash if [[ $DOCKER ]]; then - docker run --privileged -v $PWD:/outside -e QUTE_BDD_WEBENGINE=$QUTE_BDD_WEBENGINE qutebrowser/travis:$DOCKER + docker run --privileged -v $PWD:/outside -e QUTE_BDD_WEBENGINE=$QUTE_BDD_WEBENGINE -e DOCKER=$DOCKER qutebrowser/travis:$DOCKER else args=() [[ $TESTENV == docs ]] && args=('--no-authors') diff --git a/tests/conftest.py b/tests/conftest.py index 7fa94ffc3..26ad52d37 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -129,6 +129,12 @@ def pytest_collection_modifyitems(config, items): item.add_marker(pytest.mark.skipif( PYQT_VERSION <= js_prompt_pyqt_version, reason='JS prompts are not supported with this PyQt version')) + if item.get_marker('issue2183'): + item.add_marker(pytest.mark.xfail( + bool(os.environ.get('QUTE_BDD_WEBENGINE', None) and + os.environ.get('DOCKER', None)), + reason='https://github.com/The-Compiler/qutebrowser/issues/' + '2183')) if deselected: deselected_items.append(item) diff --git a/tests/end2end/features/editor.feature b/tests/end2end/features/editor.feature index 861c71710..84ce47412 100644 --- a/tests/end2end/features/editor.feature +++ b/tests/end2end/features/editor.feature @@ -94,6 +94,7 @@ Feature: Opening external editors And I run :click-element id qute-button Then the javascript message "text: foobar" should be logged + @issue2183 Scenario: Spawning an editor with existing text When I set up a fake editor replacing "foo" by "bar" And I open data/editor.html diff --git a/tests/end2end/features/yankpaste.feature b/tests/end2end/features/yankpaste.feature index 9a4bf53a8..1c65c63b4 100644 --- a/tests/end2end/features/yankpaste.feature +++ b/tests/end2end/features/yankpaste.feature @@ -247,6 +247,7 @@ Feature: Yanking and pasting. #### :insert-text + @issue2183 Scenario: Inserting text into an empty text field When I set general -> log-javascript-console to info And I open data/paste_primary.html @@ -256,6 +257,7 @@ Feature: Yanking and pasting. # Compare Then the javascript message "textarea contents: Hello world" should be logged + @issue2183 Scenario: Inserting text into an empty text field with javascript disabled When I set general -> log-javascript-console to info And I set content -> allow-javascript to false @@ -270,6 +272,7 @@ Feature: Yanking and pasting. # Compare Then the javascript message "textarea contents: Hello world" should be logged + @issue2183 Scenario: Inserting text into a text field at specific position When I set general -> log-javascript-console to info And I open data/paste_primary.html @@ -284,7 +287,7 @@ Feature: Yanking and pasting. # Compare Then the javascript message "textarea contents: onHello worlde two three four" should be logged - @qtwebengine_osx_xfail + @qtwebengine_osx_xfail @issue2183 Scenario: Inserting text into a text field with undo When I set general -> log-javascript-console to info And I open data/paste_primary.html diff --git a/tests/end2end/features/zoom.feature b/tests/end2end/features/zoom.feature index 0c6790fa8..d94bd3a27 100644 --- a/tests/end2end/features/zoom.feature +++ b/tests/end2end/features/zoom.feature @@ -86,6 +86,8 @@ Feature: Zooming in and out Then the message "Zoom level: 120%" should be shown And the zoom should be 120% + # https://github.com/The-Compiler/qutebrowser/issues/2183 + @qtwebengine_flaky Scenario: Setting a default zoom When I set ui -> default-zoom to 200% And I open data/hello.txt in a new tab diff --git a/tox.ini b/tox.ini index 22e584667..6c51695dd 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ skipsdist = true setenv = QT_QPA_PLATFORM_PLUGIN_PATH={envdir}/Lib/site-packages/PyQt5/plugins/platforms PYTEST_QT_API=pyqt5 -passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI TRAVIS XDG_* QUTE_* +passenv = PYTHON DISPLAY XAUTHORITY HOME USERNAME USER CI TRAVIS XDG_* QUTE_* DOCKER deps = -r{toxinidir}/requirements.txt -r{toxinidir}/misc/requirements/requirements-tests.txt