Bug 1899948 - add a UA override for tv.partner.co.il; r=ksenia,webcompat-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D225898
This commit is contained in:
Thomas Wisniewski 2024-10-16 23:20:47 +00:00
parent 44fea85a33
commit 48c27c33f1
5 changed files with 68 additions and 2 deletions

View File

@ -1440,6 +1440,24 @@ const AVAILABLE_UA_OVERRIDES = [
},
},
},
{
/*
* Bug 1899948 - UA override for tv.partner.co.il
* Webcompat issue #64703 - https://webcompat.com/issues/64703
*
* Site blocks Firefox, but seems to work with a UA spoof.
*/
id: "1899948",
platform: "all",
domain: "tv.partner.co.il",
bug: "1899948",
config: {
matches: ["*://tv.partner.co.il/*"],
uaTransformer: () => {
return UAHelpers.getDeviceAppropriateChromeUA();
},
},
},
];
module.exports = AVAILABLE_UA_OVERRIDES;

View File

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Web Compatibility Interventions",
"description": "Urgent post-release fixes for web compatibility.",
"version": "133.1.0",
"version": "133.2.0",
"browser_specific_settings": {
"gecko": {
"id": "webcompat@mozilla.org",

View File

@ -1440,6 +1440,24 @@ const AVAILABLE_UA_OVERRIDES = [
},
},
},
{
/*
* Bug 1899948 - UA override for tv.partner.co.il
* Webcompat issue #64703 - https://webcompat.com/issues/64703
*
* Site blocks Firefox, but seems to work with a UA spoof.
*/
id: "1899948",
platform: "all",
domain: "tv.partner.co.il",
bug: "1899948",
config: {
matches: ["*://tv.partner.co.il/*"],
uaTransformer: () => {
return UAHelpers.getDeviceAppropriateChromeUA();
},
},
},
];
module.exports = AVAILABLE_UA_OVERRIDES;

View File

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Web Compatibility Interventions",
"description": "Urgent post-release fixes for web compatibility.",
"version": "133.1.0",
"version": "133.2.0",
"browser_specific_settings": {
"gecko": {
"id": "webcompat@mozilla.org",

View File

@ -0,0 +1,30 @@
from asyncio.exceptions import TimeoutError
import pytest
URL = "https://tv.partner.co.il/#/login"
SUPPORTED_CSS = "[class*=loginForm]"
UNSUPPORTED_CSS = "[class*=bannerBrowser]"
async def try_visit_site(client):
try:
await client.navigate(URL, timeout=30)
except TimeoutError:
pytest.skip("Could not connect to site. Try using a VPN set to Israel.")
@pytest.mark.asyncio
@pytest.mark.with_interventions
async def test_enabled(client):
await try_visit_site(client)
assert client.await_css(SUPPORTED_CSS)
assert not client.find_css(UNSUPPORTED_CSS)
@pytest.mark.asyncio
@pytest.mark.without_interventions
async def test_disabled(client):
await try_visit_site(client)
assert client.await_css(UNSUPPORTED_CSS)
assert not client.find_css(SUPPORTED_CSS)