Skip to content

Commit 19bdbe6

Browse files
ci: do not run mapper tests on macos (#3303)
1 parent 6595535 commit 19bdbe6

3 files changed

Lines changed: 28 additions & 33 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,26 @@ jobs:
4545
matrix:
4646
# TODO(#876): Add Windows CI.
4747
# TODO(#2154): Use macos-latest once Python setup supports mac arm64.
48-
# TODO(#3294): Enable headful chromedriver on ubuntu.
4948
os: [ubuntu-latest, macos-13]
5049
head: [headful, 'new-headless', 'old-headless']
51-
kind: [chromedriver, mapper]
50+
# `cd` runs e2e via `chromedriver`. `node` runs tests using `NodeJS` runner.
51+
kind: [cd, node]
5252
total_chunks: [4]
5353
this_chunk: [0, 1, 2, 3]
5454
exclude:
55+
# Run e2e via NodeJS only in new headless ubuntu.
5556
- os: macos-13
56-
head: new-headless
57-
- os: macos-13
57+
kind: node
58+
- os: ubuntu-latest
59+
kind: node
60+
head: headful
61+
- os: ubuntu-latest
62+
kind: node
5863
head: old-headless
64+
# TODO(#3294): Enable headful chromedriver on ubuntu.
5965
- os: ubuntu-latest
6066
head: headful
61-
kind: chromedriver
67+
kind: cd
6268
runs-on: ${{ matrix.os }}
6369
steps:
6470
- name: Checkout
@@ -98,7 +104,7 @@ jobs:
98104
--total-chunks=${{ matrix.total_chunks }}
99105
env:
100106
VERBOSE: ${{ github.event.inputs.verbose }}
101-
CHROMEDRIVER: ${{ matrix.kind == 'chromedriver' }}
107+
CHROMEDRIVER: ${{ matrix.kind == 'cd' }}
102108
- name: Run E2E tests
103109
if: matrix.os != 'ubuntu-latest' || matrix.head != 'headful'
104110
timeout-minutes: 20
@@ -109,7 +115,7 @@ jobs:
109115
--total-chunks=${{ matrix.total_chunks }}
110116
env:
111117
VERBOSE: ${{ github.event.inputs.verbose }}
112-
CHROMEDRIVER: ${{ matrix.kind == 'chromedriver' }}
118+
CHROMEDRIVER: ${{ matrix.kind == 'cd' }}
113119
- name: Upload artifacts
114120
if: ${{ !cancelled() }}
115121
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

.github/workflows/wpt.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ jobs:
6464
fail-fast: false
6565
matrix:
6666
# Should be in sync with `update_expectations` job.
67-
kind: [chromedriver, mapper]
67+
kind: [cd, node]
6868
head: [headless, headful]
6969
total_chunks: [6]
7070
this_chunk: [1, 2, 3, 4, 5, 6]
7171
exclude:
72-
# Don't run headful mapper, as it takes too long.
73-
- kind: mapper
72+
# Don't run headful node, as it takes too long.
73+
- kind: node
7474
head: headful
7575
steps:
7676
- name: Checkout
@@ -108,20 +108,20 @@ jobs:
108108
xvfb-run --auto-servernum
109109
npm run wpt -- "webdriver/tests/bidi/${{ github.event.inputs.tests }}"
110110
env:
111-
CHROMEDRIVER: ${{ matrix.kind == 'chromedriver' }}
111+
CHROMEDRIVER: ${{ matrix.kind == 'cd' }}
112112
HEADLESS: ${{ matrix.head!='headful' }}
113113
THIS_CHUNK: ${{ matrix.this_chunk }}
114114
TOTAL_CHUNKS: ${{ matrix.total_chunks }}
115115
UPDATE_EXPECTATIONS: false
116116
VERBOSE: ${{ github.event.inputs.verbose }}
117117
WPT_REPORT: out/wptreport.${{ matrix.kind }}-${{ matrix.head }}-${{ matrix.this_chunk }}.${{ matrix.total_chunks }}.json
118118
- name: Run WPT interop tests
119-
if: ${{matrix.kind == 'chromedriver'}}
119+
if: ${{matrix.kind == 'cd'}}
120120
run: >
121121
xvfb-run --auto-servernum
122122
npm run wpt -- "webdriver/tests/interop/${{ github.event.inputs.tests }}"
123123
env:
124-
CHROMEDRIVER: ${{ matrix.kind == 'chromedriver' }}
124+
CHROMEDRIVER: ${{ matrix.kind == 'cd' }}
125125
CHROMEDRIVER_LOG_NAME: 'chromedriver-interop'
126126
THIS_CHUNK: ${{ matrix.this_chunk }}
127127
TOTAL_CHUNKS: ${{ matrix.total_chunks }}
@@ -145,11 +145,11 @@ jobs:
145145
strategy:
146146
matrix:
147147
# Should be in sync with `wpt` job.
148-
kind: [chromedriver, mapper]
148+
kind: [cd, node]
149149
head: [headless, headful]
150150
exclude:
151-
# Don't run headful mapper, as it takes too long.
152-
- kind: mapper
151+
# Don't run headful node, as it takes too long.
152+
- kind: node
153153
head: headful
154154
runs-on: ubuntu-latest
155155
needs: [wpt-required]
@@ -189,7 +189,7 @@ jobs:
189189
- name: Update expectations
190190
timeout-minutes: 60
191191
env:
192-
CHROMEDRIVER: ${{ matrix.kind == 'chromedriver' }}
192+
CHROMEDRIVER: ${{ matrix.kind == 'cd' }}
193193
HEADLESS: ${{ matrix.head!='headful' }}
194194
# Do not run tests, only update expectations.
195195
RUN_TESTS: false
@@ -202,9 +202,9 @@ jobs:
202202
-name "wptreport.${{ matrix.kind }}-${{ matrix.head }}*.json"
203203
-exec npm run wpt -- --wpt-report {} \;
204204
- name: Update interop expectations
205-
if: ${{ matrix.kind == 'chromedriver' }}
205+
if: ${{ matrix.kind == 'cd' }}
206206
env:
207-
CHROMEDRIVER: ${{ matrix.kind == 'chromedriver' }}
207+
CHROMEDRIVER: ${{ matrix.kind == 'cd' }}
208208
HEADLESS: ${{ matrix.head!='headful' }}
209209
# Do not run tests, only update expectations.
210210
RUN_TESTS: false

tests/network/test_network.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async def test_network_before_request_sent_event_emitted(
3131
websocket, context_id, url_base):
3232
await subscribe(websocket, ["network.beforeRequestSent"], [context_id])
3333

34-
command_id = await send_JSON_command(
34+
await send_JSON_command(
3535
websocket, {
3636
"method": "browsingContext.navigate",
3737
"params": {
@@ -41,7 +41,7 @@ async def test_network_before_request_sent_event_emitted(
4141
}
4242
})
4343

44-
resp = await read_JSON_message(websocket)
44+
resp = await wait_for_event(websocket, "network.beforeRequestSent")
4545

4646
assert resp == AnyExtending({
4747
'type': 'event',
@@ -69,17 +69,6 @@ async def test_network_before_request_sent_event_emitted(
6969
"timestamp": ANY_TIMESTAMP
7070
}
7171
})
72-
navigation_id = resp["params"]["navigation"]
73-
74-
resp = await read_JSON_message(websocket)
75-
# Assert the navigation from the event is the same as in the command result.
76-
assert resp == AnyExtending({
77-
'id': command_id,
78-
'result': {
79-
'navigation': navigation_id
80-
},
81-
'type': 'success'
82-
})
8372

8473

8574
@pytest.mark.asyncio
@@ -248,7 +237,7 @@ async def test_network_response_completed_event_emitted(
248237
}
249238
})
250239

251-
resp = await read_JSON_message(websocket)
240+
resp = await wait_for_event(websocket, "network.responseCompleted")
252241
headersSize = compute_response_headers_size(
253242
resp["params"]["response"]["headers"])
254243

0 commit comments

Comments
 (0)