Bug 1966585 - add a CSS intervention for hiskin.care to reveal their main content; r=denschub,webcompat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D250443
This commit is contained in:
committed by
twisniewski@mozilla.com
parent
7606befc02
commit
ff7bf06468
@@ -3646,5 +3646,22 @@
|
||||
"ua_string": ["Chrome", "add_Firefox_as_Gecko"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"1966585": {
|
||||
"label": "hiskin.care",
|
||||
"bugs": {
|
||||
"1966585": {
|
||||
"issue": "broken-interactive-elements",
|
||||
"matches": ["*://hiskin.care/*"]
|
||||
}
|
||||
},
|
||||
"interventions": [
|
||||
{
|
||||
"platforms": ["all"],
|
||||
"content_scripts": {
|
||||
"css": ["bug1966585-hiskin.care-reveal-missing-content.css"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/**
|
||||
* hiskin.care - reveal iframe with no definite size
|
||||
* Bug #1966585 - https://bugzilla.mozilla.org/show_bug.cgi?id=1966585
|
||||
* WebCompat issue #156714 - https://webcompat.com/issues/156714
|
||||
*/
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import pytest
|
||||
|
||||
URL = "https://hiskin.care/pages/complete-booking"
|
||||
IFRAME_CSS = "iframe[src='https://booking-v3.hiskin.care/']"
|
||||
|
||||
|
||||
async def is_frame_visible(client):
|
||||
await client.navigate(URL, wait="none")
|
||||
frame = client.await_css(IFRAME_CSS, is_displayed=True)
|
||||
return client.execute_script("return arguments[0].clientHeight > 0", frame)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.with_interventions
|
||||
async def test_enabled(client):
|
||||
assert await is_frame_visible(client)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.without_interventions
|
||||
async def test_disabled(client):
|
||||
assert not await is_frame_visible(client)
|
||||
Reference in New Issue
Block a user