From ff7bf0646825c037f17147e7c55c7d7ded45ae93 Mon Sep 17 00:00:00 2001 From: Thomas Wisniewski Date: Wed, 21 May 2025 16:53:43 +0000 Subject: [PATCH] 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 --- .../webcompat/data/interventions.json | 17 ++++++++++++++ ...585-hiskin.care-reveal-missing-content.css | 13 +++++++++++ .../tests/test_1966585_hiskin_care.py | 22 +++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 browser/extensions/webcompat/injections/css/bug1966585-hiskin.care-reveal-missing-content.css create mode 100644 testing/webcompat/interventions/tests/test_1966585_hiskin_care.py diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json index 1cde467201a5..a8b9755beb7e 100644 --- a/browser/extensions/webcompat/data/interventions.json +++ b/browser/extensions/webcompat/data/interventions.json @@ -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"] + } + } + ] } } diff --git a/browser/extensions/webcompat/injections/css/bug1966585-hiskin.care-reveal-missing-content.css b/browser/extensions/webcompat/injections/css/bug1966585-hiskin.care-reveal-missing-content.css new file mode 100644 index 000000000000..ed8ac30a80d5 --- /dev/null +++ b/browser/extensions/webcompat/injections/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%; +} diff --git a/testing/webcompat/interventions/tests/test_1966585_hiskin_care.py b/testing/webcompat/interventions/tests/test_1966585_hiskin_care.py new file mode 100644 index 000000000000..e9dab7c10b72 --- /dev/null +++ b/testing/webcompat/interventions/tests/test_1966585_hiskin_care.py @@ -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)