diff --git a/components/profile-modal.html b/components/profile-modal.html index b496f4cf..ed618117 100644 --- a/components/profile-modal.html +++ b/components/profile-modal.html @@ -1088,36 +1088,6 @@ role="tabpanel" aria-labelledby="profileNavMessages" > -
-
-

Direct message privacy

-

- Control read receipts and typing indicators for direct messages. -

-
-
- - -
-
{ + const modal = document.getElementById('profileModal'); + if (modal) { + modal.classList.remove('hidden'); + modal.setAttribute('aria-hidden', 'false'); + } + }""") + + # Force the Messages pane to be visible + page.evaluate("""() => { + const pane = document.getElementById('profilePaneMessages'); + if (pane) { + pane.classList.remove('hidden'); + pane.removeAttribute('hidden'); + // Ensure other panes are hidden if needed, but not strictly necessary for content check + } + }""") + + # Wait for the pane to become active/visible + page.wait_for_selector("#profilePaneMessages:not(.hidden)") + + # Take a screenshot + page.screenshot(path="verification_profile_messages.png") + + content = page.content() + if "Direct message privacy" in content: + print("FAILURE: 'Direct message privacy' text found in the page source.") + else: + print("SUCCESS: 'Direct message privacy' text NOT found.") + + if "Read receipts" in content and "Direct message privacy" in content: + print("FAILURE: 'Read receipts' text found.") + + browser.close() + +if __name__ == "__main__": + verify_profile_modal()