Skip to content

Commit 46c2a59

Browse files
committed
Bug 1996137 - add an Android-only UA override for trip.com; r=webcompat-reviewers,ksenia
Differential Revision: https://phabricator.services.mozilla.com/D271268
1 parent 7ba8e8c commit 46c2a59

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

browser/extensions/webcompat/data/interventions.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5935,6 +5935,21 @@
59355935
}
59365936
]
59375937
},
5938+
"1996137": {
5939+
"label": "trip.com",
5940+
"bugs": {
5941+
"1996137": {
5942+
"issue": "firefox-blocked-completely",
5943+
"matches": ["*://*.trip.com/webapp/*"]
5944+
}
5945+
},
5946+
"interventions": [
5947+
{
5948+
"platforms": ["android"],
5949+
"ua_string": ["Chrome_with_FxQuantum"]
5950+
}
5951+
]
5952+
},
59385953
"1997687": {
59395954
"label": "sakti.kemenkeu.go.id",
59405955
"bugs": {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import pytest
2+
3+
URL = "https://www.trip.com/webapp/cw/afterservice/OrderDetail.html"
4+
5+
SUPPORTED_TEXT = "Something went wrong"
6+
UNSUPPORTED_TEXT = "browser is not supported"
7+
8+
9+
@pytest.mark.only_platforms("android")
10+
@pytest.mark.asyncio
11+
@pytest.mark.with_interventions
12+
async def test_enabled(client):
13+
await client.navigate(URL, wait="none")
14+
assert client.await_text(SUPPORTED_TEXT, is_displayed=True)
15+
assert not client.find_text(UNSUPPORTED_TEXT, is_displayed=True)
16+
17+
18+
@pytest.mark.only_platforms("android")
19+
@pytest.mark.asyncio
20+
@pytest.mark.without_interventions
21+
async def test_disabled(client):
22+
await client.navigate(URL, wait="none")
23+
assert client.await_text(UNSUPPORTED_TEXT, is_displayed=True)
24+
assert not client.find_text(SUPPORTED_TEXT, is_displayed=True)

0 commit comments

Comments
 (0)