Skip to content

Commit 823cddc

Browse files
committed
[ci] Update python tests
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 0338677 commit 823cddc

File tree

3 files changed

+33
-20
lines changed

3 files changed

+33
-20
lines changed

.github/workflows/ci-python.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,16 @@ jobs:
8585
fail-fast: false
8686
matrix:
8787
include:
88+
- browser: chrome
89+
os: ubuntu
90+
- browser: edge
91+
os: ubuntu
8892
- browser: firefox
93+
os: ubuntu
8994
with:
90-
name: Integration Tests (remote, ${{ matrix.browser }})
95+
name: Integration Tests (remote, ${{ matrix.browser }}, ${{ matrix.os }})
9196
browser: ${{ matrix.browser }}
97+
os: ${{ matrix.os }}
9298
cache-key: py-remote-${{ matrix.browser }}
9399
run: bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-remote
94100

@@ -103,10 +109,17 @@ jobs:
103109
- browser: safari
104110
os: macos
105111
- browser: chrome
106-
os: macos
112+
os: ubuntu
113+
- browser: edge
114+
os: ubuntu
115+
- browser: firefox
116+
os: ubuntu
107117
with:
108-
name: Integration Tests (${{ matrix.browser }}, ${{ matrix.os }})
118+
name: Integration Tests (local, ${{ matrix.browser }}, ${{ matrix.os }})
109119
browser: ${{ matrix.browser }}
110120
os: ${{ matrix.os }}
111121
cache-key: py-browser-${{ matrix.browser }}
112-
run: bazel test --flaky_test_attempts 3 //py:test-${{ matrix.browser }}
122+
run: |
123+
bazel test --flaky_test_attempts 3 //py:common-${{ matrix.browser }}
124+
bazel test --flaky_test_attempts 3 //py:common-${{ matrix.browser }}-bidi
125+
bazel test --flaky_test_attempts 5 //py:test-${{ matrix.browser }}

py/private/browsers.bzl

-5
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ BROWSERS = {
6969
"data": firefox_data,
7070
"tags": COMMON_TAGS + ["firefox"],
7171
},
72-
"ie": {
73-
"args": ["--driver=ie"],
74-
"data": [],
75-
"tags": COMMON_TAGS + ["ie", "skip-remote"],
76-
},
7772
"safari": {
7873
"args": ["--driver=safari"],
7974
"data": [],

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

+16-11
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)