tests: Add a js_prompt marker
This commit is contained in:
parent
a6215be864
commit
40c5c75a6c
@ -21,6 +21,7 @@ markers =
|
||||
qtwebengine_createWindow: Tests using createWindow with QtWebEngine (QTBUG-54419)
|
||||
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
|
||||
this: Used to mark tests during development
|
||||
qt_log_level_fail = WARNING
|
||||
qt_log_ignore =
|
||||
|
@ -27,6 +27,7 @@ import warnings
|
||||
|
||||
import pytest
|
||||
import hypothesis
|
||||
from PyQt5.QtCore import PYQT_VERSION
|
||||
|
||||
pytest.register_assert_rewrite('helpers')
|
||||
|
||||
@ -122,6 +123,14 @@ def pytest_collection_modifyitems(config, items):
|
||||
item.add_marker(pytest.mark.xfail(run=False))
|
||||
if item.get_marker('flaky_once'):
|
||||
item.add_marker(pytest.mark.flaky())
|
||||
if item.get_marker('js_prompt'):
|
||||
if config.webengine:
|
||||
js_prompt_pyqt_version = 0x050700
|
||||
else:
|
||||
js_prompt_pyqt_version = 0x050300
|
||||
item.add_marker(pytest.mark.skipif(
|
||||
PYQT_VERSION <= js_prompt_pyqt_version,
|
||||
reason='JS prompts are not supported with this PyQt version'))
|
||||
|
||||
if deselected:
|
||||
deselected_items.append(item)
|
||||
|
@ -382,7 +382,7 @@ Feature: Various utility commands.
|
||||
And I press the key "<Ctrl-C>"
|
||||
Then no crash should happen
|
||||
|
||||
@pyqt>=5.3.1 @qtwebengine_skip: JS prompt is not implemented yet
|
||||
@js_prompt
|
||||
Scenario: Focusing download widget via Tab (original issue)
|
||||
When I open data/prompt/jsprompt.html
|
||||
And I run :click-element id button
|
||||
|
@ -40,7 +40,7 @@ Feature: Prompts
|
||||
And I run :leave-mode
|
||||
Then the javascript message "confirm reply: false" should be logged
|
||||
|
||||
@pyqt>=5.3.1 @qtwebengine_skip
|
||||
@js_prompt
|
||||
Scenario: Javascript prompt
|
||||
When I open data/prompt/jsprompt.html
|
||||
And I run :click-element id button
|
||||
@ -49,7 +49,7 @@ Feature: Prompts
|
||||
And I run :prompt-accept
|
||||
Then the javascript message "Prompt reply: prompt test" should be logged
|
||||
|
||||
@pyqt>=5.3.1 @qtwebengine_skip
|
||||
@js_prompt
|
||||
Scenario: Javascript prompt with default
|
||||
When I open data/prompt/jsprompt.html
|
||||
And I run :click-element id button-default
|
||||
@ -57,7 +57,7 @@ Feature: Prompts
|
||||
And I run :prompt-accept
|
||||
Then the javascript message "Prompt reply: default" should be logged
|
||||
|
||||
@pyqt>=5.3.1 @qtwebengine_skip
|
||||
@js_prompt
|
||||
Scenario: Rejected javascript prompt
|
||||
When I open data/prompt/jsprompt.html
|
||||
And I run :click-element id button
|
||||
@ -135,7 +135,7 @@ Feature: Prompts
|
||||
|
||||
# Shift-Insert with prompt (issue 1299)
|
||||
|
||||
@pyqt>=5.3.1 @qtwebengine_skip
|
||||
@js_prompt
|
||||
Scenario: Pasting via shift-insert in prompt mode
|
||||
When selection is supported
|
||||
And I put "insert test" into the primary selection
|
||||
@ -146,7 +146,7 @@ Feature: Prompts
|
||||
And I run :prompt-accept
|
||||
Then the javascript message "Prompt reply: insert test" should be logged
|
||||
|
||||
@pyqt>=5.3.1 @qtwebengine_skip
|
||||
@js_prompt
|
||||
Scenario: Pasting via shift-insert without it being supported
|
||||
When selection is not supported
|
||||
And I put "insert test" into the primary selection
|
||||
@ -157,7 +157,7 @@ Feature: Prompts
|
||||
And I run :prompt-accept
|
||||
Then the javascript message "Prompt reply: " should be logged
|
||||
|
||||
@pyqt>=5.3.1 @qtwebengine_skip
|
||||
@js_prompt
|
||||
Scenario: Using content -> ignore-javascript-prompt
|
||||
When I set content -> ignore-javascript-prompt to true
|
||||
And I open data/prompt/jsprompt.html
|
||||
@ -357,7 +357,7 @@ Feature: Prompts
|
||||
Then the javascript message "Alert done" should be logged
|
||||
And the error "No value is permitted with alert prompts!" should be shown
|
||||
|
||||
@pyqt>=5.3.1 @qtwebengine_skip
|
||||
@js_prompt
|
||||
Scenario: Javascript prompt with value
|
||||
When I set content -> ignore-javascript-prompt to false
|
||||
And I open data/prompt/jsprompt.html
|
||||
|
Loading…
Reference in New Issue
Block a user