mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Moves the Zap button from the message thread header to the message composer area, adjacent to the Send button. Refactors the Zap interface creation logic into a standalone component `ZapInterface.js` to decouple it from `MessageThread.js`. Updates `Composer.js` to support an optional `onZap` handler and renders the button with an icon-only style matching the video player's accent interaction. Updates `AppShell.js` to orchestrate the Zap interface display.
52 lines
1.6 KiB
Python
52 lines
1.6 KiB
Python
from playwright.sync_api import sync_playwright
|
|
|
|
def verify_profile_messages():
|
|
with sync_playwright() as p:
|
|
browser = p.chromium.launch(headless=True)
|
|
page = browser.new_page()
|
|
page.goto("http://localhost:8000")
|
|
|
|
# 1. Close disclaimer modal if present
|
|
# The logs say #disclaimerModal intercepts events.
|
|
try:
|
|
page.wait_for_selector("#closeDisclaimerModal", timeout=5000)
|
|
page.click("#closeDisclaimerModal")
|
|
except:
|
|
print("Disclaimer modal not found or not visible")
|
|
|
|
# Also could be #disclaimerAgreeBtn
|
|
try:
|
|
page.wait_for_selector("#disclaimerAgreeBtn", timeout=2000)
|
|
page.click("#disclaimerAgreeBtn")
|
|
except:
|
|
pass
|
|
|
|
# 2. Open Profile Modal via JS
|
|
page.evaluate("""
|
|
const modal = document.getElementById('profileModal');
|
|
if (modal) {
|
|
modal.classList.remove('hidden');
|
|
modal.setAttribute('aria-hidden', 'false');
|
|
document.body.classList.add('modal-open');
|
|
|
|
// Ensure profile modal is on top if multiple modals
|
|
modal.style.zIndex = '9999';
|
|
}
|
|
""")
|
|
|
|
# 3. Click Messages tab
|
|
# Wait for animation/visibility
|
|
page.wait_for_timeout(500)
|
|
page.click("#profileNavMessages")
|
|
|
|
# 4. Wait for AppShell
|
|
page.wait_for_selector("#dmAppShellMount")
|
|
page.wait_for_timeout(2000)
|
|
|
|
# 5. Take screenshot
|
|
page.screenshot(path="verification_profile_messages.png")
|
|
browser.close()
|
|
|
|
if __name__ == "__main__":
|
|
verify_profile_messages()
|