forked from retoor/devplacepy
Keep composers usable, group actions and notifications, and drop the tool-count cap
Comment and post layouts stay full width on small screens. Secondary actions live in the More menu. Notifications can be grouped and throttled, and Enter can submit when that profile setting is on. Emulated-tool models accept large catalogs, with reserved names aliased on the wire and the catalog cached per owner. A dropped service-worker navigation is retried once. The test server waits 120s to finish importing before it is stopped.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
from uuid import uuid4
|
||||
from datetime import datetime, timezone
|
||||
from playwright.sync_api import expect
|
||||
from tests.conftest import BASE_URL
|
||||
from tests.conftest import BASE_URL, open_action_menu
|
||||
from devplacepy.database import get_table
|
||||
from devplacepy.utils import make_combined_slug
|
||||
|
||||
@@ -15,33 +15,15 @@ def _confirm(page):
|
||||
page.locator(".dialog-overlay.visible .dialog-confirm").click()
|
||||
|
||||
|
||||
TRIGGER = "[data-action-menu-trigger]"
|
||||
|
||||
|
||||
def _open_menu(page):
|
||||
# aria-expanded can lag behind the popover (a dialog closing, a light
|
||||
# dismiss), so the open state that counts is whether the panel shows.
|
||||
page.wait_for_function(
|
||||
"() => document.querySelector('[data-action-menu-panel]') !== null"
|
||||
" || document.querySelector('[data-action-menu-trigger]') === null"
|
||||
)
|
||||
panel = page.locator("[data-action-menu-panel]")
|
||||
if panel.count() and panel.evaluate("(el) => el.matches(':popover-open')"):
|
||||
return
|
||||
page.click(TRIGGER)
|
||||
page.wait_for_function(
|
||||
"() => document.querySelector('[data-action-menu-panel]').matches(':popover-open')"
|
||||
)
|
||||
|
||||
|
||||
def _has(page, selector):
|
||||
_open_menu(page)
|
||||
return page.is_visible(selector)
|
||||
loc = page.locator(selector)
|
||||
if loc.count() == 0:
|
||||
return False
|
||||
return open_action_menu(loc).is_visible()
|
||||
|
||||
|
||||
def _pick(page, selector):
|
||||
_open_menu(page)
|
||||
page.click(selector)
|
||||
open_action_menu(page.locator(selector)).click()
|
||||
|
||||
|
||||
def _reset_block(page):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# retoor <retoor@molodetz.nl>
|
||||
|
||||
from playwright.sync_api import expect
|
||||
from tests.conftest import BASE_URL
|
||||
from tests.conftest import BASE_URL, open_action_menu
|
||||
|
||||
MUTE = "form[action='/mute/bob_test'] button"
|
||||
UNMUTE = "form[action='/mute/unmute/bob_test'] button"
|
||||
@@ -11,33 +11,15 @@ def _confirm(page):
|
||||
page.locator(".dialog-overlay.visible .dialog-confirm").click()
|
||||
|
||||
|
||||
TRIGGER = "[data-action-menu-trigger]"
|
||||
|
||||
|
||||
def _open_menu(page):
|
||||
# aria-expanded can lag behind the popover (a dialog closing, a light
|
||||
# dismiss), so the open state that counts is whether the panel shows.
|
||||
page.wait_for_function(
|
||||
"() => document.querySelector('[data-action-menu-panel]') !== null"
|
||||
" || document.querySelector('[data-action-menu-trigger]') === null"
|
||||
)
|
||||
panel = page.locator("[data-action-menu-panel]")
|
||||
if panel.count() and panel.evaluate("(el) => el.matches(':popover-open')"):
|
||||
return
|
||||
page.click(TRIGGER)
|
||||
page.wait_for_function(
|
||||
"() => document.querySelector('[data-action-menu-panel]').matches(':popover-open')"
|
||||
)
|
||||
|
||||
|
||||
def _has(page, selector):
|
||||
_open_menu(page)
|
||||
return page.is_visible(selector)
|
||||
loc = page.locator(selector)
|
||||
if loc.count() == 0:
|
||||
return False
|
||||
return open_action_menu(loc).is_visible()
|
||||
|
||||
|
||||
def _pick(page, selector):
|
||||
_open_menu(page)
|
||||
page.click(selector)
|
||||
open_action_menu(page.locator(selector)).click()
|
||||
|
||||
|
||||
def _reset_mute(page):
|
||||
|
||||
Reference in New Issue
Block a user