@@ -2,7 +2,7 @@
|
||||
|
||||
from playwright.sync_api import expect
|
||||
|
||||
from tests.conftest import BASE_URL
|
||||
from tests.conftest import BASE_URL, assert_no_horizontal_overflow
|
||||
|
||||
CONSENT = "ai_third_party"
|
||||
|
||||
@@ -65,3 +65,23 @@ def test_a_stranger_never_reaches_the_privacy_panel(bob):
|
||||
)
|
||||
expect(page.locator(".privacy-panel")).to_have_count(0)
|
||||
expect(page.locator("form[action='/profile/alice_test/consent']")).to_have_count(0)
|
||||
|
||||
|
||||
def test_profile_mobile_long_code_bio_does_not_widen_layout(mobile_page):
|
||||
page, user = mobile_page
|
||||
bio = "```python\n" + "unbreakable_identifier_" * 8 + "\n```"
|
||||
page.request.post(
|
||||
f"{BASE_URL}/profile/update",
|
||||
form={"bio": bio, "location": "", "git_link": "", "website": ""},
|
||||
)
|
||||
try:
|
||||
page.goto(
|
||||
f"{BASE_URL}/profile/{user['username']}", wait_until="domcontentloaded"
|
||||
)
|
||||
page.locator(".profile-sidebar pre").first.wait_for(state="visible")
|
||||
assert_no_horizontal_overflow(page, ".profile-layout")
|
||||
finally:
|
||||
page.request.post(
|
||||
f"{BASE_URL}/profile/update",
|
||||
form={"bio": "", "location": "", "git_link": "", "website": ""},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user