Bug 1967694 - add a UA override for onlyfaucet.com; r=denschub,webcompat-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D250448
This commit is contained in:
Thomas Wisniewski
2025-05-21 16:53:45 +00:00
committed by twisniewski@mozilla.com
parent e205fdb172
commit 49dd9aafe3
2 changed files with 36 additions and 0 deletions

View File

@@ -3680,5 +3680,20 @@
}
}
]
},
"1967694": {
"label": "onlyfaucet.com",
"bugs": {
"1967694": {
"issue": "firefox-blocked-completely",
"matches": ["*://*.onlyfaucet.com/*"]
}
},
"interventions": [
{
"platforms": ["all"],
"ua_string": ["Chrome", "add_Firefox_as_Gecko"]
}
]
}
}

View File

@@ -0,0 +1,21 @@
import pytest
URL = "https://onlyfaucet.com/"
BLOCKED_CSS = "#cf-error-details"
UNBLOCKED_CSS = "#content"
@pytest.mark.asyncio
@pytest.mark.with_interventions
async def test_enabled(client):
await client.navigate(URL)
assert client.await_css(UNBLOCKED_CSS, is_displayed=True)
assert not client.find_css(BLOCKED_CSS, is_displayed=True)
@pytest.mark.asyncio
@pytest.mark.without_interventions
async def test_disabled(client):
await client.navigate(URL)
assert client.await_css(BLOCKED_CSS, is_displayed=True)
assert not client.find_css(UNBLOCKED_CSS, is_displayed=True)