Bug 1397912 - Split wdspec session creation tests for intermittent timeouts, r=ato

This test was timing out, so split it into firstMatch and alwaysMatch files.

MozReview-Commit-ID: 8E9wZQqdajG

--HG--
extra : rebase_source : e851af039a10e34e0eaa0558388e1442f3bb69ee
This commit is contained in:
James Graham 2017-09-21 17:57:49 +01:00
Родитель 480bbbd368
Коммит 27befb1e80
5 изменённых файлов: 61 добавлений и 31 удалений

Просмотреть файл

@ -308064,6 +308064,11 @@
{}
]
],
"webdriver/tests/sessions/new_session/support/create.py": [
[
{}
]
],
"webdriver/tests/state/__init__.py": [
[
{}
@ -407267,9 +407272,17 @@
{}
]
],
"webdriver/tests/sessions/new_session/create.py": [
"webdriver/tests/sessions/new_session/create_alwaysMatch.py": [
[
"/webdriver/tests/sessions/new_session/create.py",
"/webdriver/tests/sessions/new_session/create_alwaysMatch.py",
{
"timeout": "long"
}
]
],
"webdriver/tests/sessions/new_session/create_firstMatch.py": [
[
"/webdriver/tests/sessions/new_session/create_firstMatch.py",
{
"timeout": "long"
}
@ -628498,8 +628511,12 @@
"d2df38e506cb9a3e501f03fe03e2a31af42d6f04",
"support"
],
"webdriver/tests/sessions/new_session/create.py": [
"f47ffcbaf22af9f445e4202ebeaa03bb9415fbc9",
"webdriver/tests/sessions/new_session/create_alwaysMatch.py": [
"e4dd4fe4ab30d71e9fe383daf2ca00582615ec35",
"wdspec"
],
"webdriver/tests/sessions/new_session/create_firstMatch.py": [
"6fd2671870cd3451aab6f81ea19bd516a6c82bc9",
"wdspec"
],
"webdriver/tests/sessions/new_session/default_values.py": [
@ -628518,6 +628535,10 @@
"3eca8e1d571b0c94b2a08fccfbe8cb9f1b1ba6d5",
"wdspec"
],
"webdriver/tests/sessions/new_session/support/create.py": [
"440d88462cc418e4d5e1df6f73074d3a722bd2fd",
"support"
],
"webdriver/tests/set_window_rect.py": [
"e84559c2ee94009fe808c3008c58e6e4b9ca27aa",
"wdspec"

Просмотреть файл

@ -1,27 +0,0 @@
#META: timeout=long
import pytest
from conftest import product, flatten
# Note that we can only test things here all implementations must support
valid_data = [
("acceptInsecureCerts", [False, None]),
("browserName", [None]),
("browserVersion", [None]),
("platformName", [None]),
("pageLoadStrategy", ["none", "eager", "normal", None]),
("proxy", [None]),
("unhandledPromptBehavior", ["dismiss", "accept", None]),
("test:extension", [True, "abc", 123, [], {"key": "value"}, None]),
]
@pytest.mark.parametrize("body", [lambda key, value: {"alwaysMatch": {key: value}},
lambda key, value: {"firstMatch": [{key: value}]}])
@pytest.mark.parametrize("key,value", flatten(product(*item) for item in valid_data))
def test_valid(new_session, body, key, value):
resp = new_session({"capabilities": body(key, value)})
# Continued in create-1.py to avoid timeouts

Просмотреть файл

@ -0,0 +1,13 @@
#META: timeout=long
import pytest
from conftest import product, flatten
from .support.create import valid_data
@pytest.mark.parametrize("key,value", flatten(product(*item) for item in valid_data))
def test_valid(new_session, key, value):
resp = new_session({"capabilities": {"alwaysMatch": {key: value}}})

Просмотреть файл

@ -0,0 +1,12 @@
#META: timeout=long
import pytest
from conftest import product, flatten
from .support.create import valid_data
@pytest.mark.parametrize("key,value", flatten(product(*item) for item in valid_data))
def test_valid(new_session, key, value):
resp = new_session({"capabilities": {"firstMatch": [{key: value}]}})

Просмотреть файл

@ -0,0 +1,11 @@
# Note that we can only test things here all implementations must support
valid_data = [
("acceptInsecureCerts", [False, None]),
("browserName", [None]),
("browserVersion", [None]),
("platformName", [None]),
("pageLoadStrategy", ["none", "eager", "normal", None]),
("proxy", [None]),
("unhandledPromptBehavior", ["dismiss", "accept", None]),
("test:extension", [True, "abc", 123, [], {"key": "value"}, None]),
]