-
Notifications
You must be signed in to change notification settings - Fork 120
/
Copy pathtest_edge.py
49 lines (41 loc) · 1.32 KB
/
test_edge.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import sys
import pytest
pytestmark = [
pytest.mark.nondestructive,
pytest.mark.skipif(sys.platform != "win32", reason="Edge only runs on Windows"),
pytest.mark.edge,
]
def test_launch_legacy(testdir):
file_test = testdir.makepyfile(
"""
import pytest
@pytest.mark.nondestructive
def test_pass(webtext):
assert webtext == u'Success!'
"""
)
testdir.quick_qa(
"--driver", "remote", "--capability", "browserName", "edge", file_test, passed=1
)
@pytest.mark.parametrize("use_chromium", [True, False], ids=["chromium", "legacy"])
def test_launch(use_chromium, testdir):
file_test = testdir.makepyfile(
"""
import pytest
@pytest.mark.nondestructive
def test_pass(webtext):
assert webtext == u'Success!'
@pytest.fixture
def edge_options(edge_options):
edge_options.use_chromium = {}
return edge_options
""".format(
use_chromium
)
)
testdir.quick_qa(
"--driver", "remote", "--capability", "browserName", "edge", file_test, passed=1
)