Skip to content

Commit 6819795

Browse files
committed
[ci][py] Enabled browser tests
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
1 parent 1492a3a commit 6819795

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

.github/workflows/ci-python.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ jobs:
103103
- browser: safari
104104
os: macos
105105
- browser: chrome
106-
os: macos
106+
os: ubuntu
107+
- browser: edge
108+
os: ubuntu
109+
- browser: firefox
110+
os: ubuntu
107111
with:
108112
name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }})
109113
browser: ${{ matrix.browser }}

py/test/selenium/webdriver/marionette/mn_options_tests.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ def test_we_can_pass_options(self, driver, pages):
4141
class TestUnit:
4242
def test_ctor(self):
4343
opts = Options()
44-
assert opts._binary is None
45-
assert not opts._preferences
44+
assert opts.binary_location == ""
45+
assert opts._preferences == {"remote.active-protocols": 3}
4646
assert opts._profile is None
4747
assert not opts._arguments
4848
assert isinstance(opts.log, Log)
4949

5050
def test_binary(self):
5151
opts = Options()
52-
assert opts.binary is None
52+
assert opts.binary_location == ""
5353

5454
other_binary = FirefoxBinary()
55-
assert other_binary != opts.binary
55+
assert other_binary != opts.binary_location
5656
opts.binary = other_binary
57-
assert other_binary == opts.binary
57+
assert other_binary._start_cmd == opts.binary_location
5858

5959
path = "/path/to/binary"
6060
opts.binary = path
@@ -63,16 +63,16 @@ def test_binary(self):
6363

6464
def test_prefs(self):
6565
opts = Options()
66-
assert len(opts.preferences) == 0
66+
assert len(opts.preferences) == 1
6767
assert isinstance(opts.preferences, dict)
6868

6969
opts.set_preference("spam", "ham")
70-
assert len(opts.preferences) == 1
71-
opts.set_preference("eggs", True)
7270
assert len(opts.preferences) == 2
71+
opts.set_preference("eggs", True)
72+
assert len(opts.preferences) == 3
7373
opts.set_preference("spam", "spam")
74-
assert len(opts.preferences) == 2
75-
assert opts.preferences == {"spam": "spam", "eggs": True}
74+
assert len(opts.preferences) == 3
75+
assert opts.preferences == {"eggs": True, "remote.active-protocols": 3, "spam": "spam"}
7676

7777
def test_profile(self, tmpdir_factory):
7878
opts = Options()
@@ -99,7 +99,12 @@ def test_arguments(self):
9999
def test_to_capabilities(self):
100100
opts = Options()
101101
firefox_caps = DesiredCapabilities.FIREFOX.copy()
102-
firefox_caps.update({"pageLoadStrategy": PageLoadStrategy.normal})
102+
firefox_caps.update(
103+
{
104+
"pageLoadStrategy": PageLoadStrategy.normal,
105+
"moz:firefoxOptions": {"prefs": {"remote.active-protocols": 3}},
106+
}
107+
)
103108
assert opts.to_capabilities() == firefox_caps
104109

105110
profile = FirefoxProfile()

0 commit comments

Comments
 (0)