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:
+10
-10
@@ -5,7 +5,7 @@ import time
|
||||
from playwright.sync_api import expect
|
||||
|
||||
from devplacepy.database import get_table, refresh_snapshot, set_setting
|
||||
from tests.conftest import BASE_URL, CACHE_VERSION_PROPAGATION_SECONDS
|
||||
from tests.conftest import BASE_URL, CACHE_VERSION_PROPAGATION_SECONDS, click_menu_action, open_action_menu
|
||||
|
||||
|
||||
def _create_post(page, content):
|
||||
@@ -24,8 +24,9 @@ def test_the_report_control_is_present_on_the_feed_and_a_post(alice, bob):
|
||||
_create_post(alice_page, "A post that another member can report from the feed.")
|
||||
|
||||
bob_page.goto(f"{BASE_URL}/feed", wait_until="domcontentloaded")
|
||||
expect(bob_page.locator(".report-btn").first).to_be_visible()
|
||||
expect(bob_page.locator(".block-btn").first).to_be_attached()
|
||||
report = open_action_menu(bob_page.locator(".post-card .report-btn").first)
|
||||
expect(report).to_be_visible()
|
||||
expect(bob_page.locator(".post-card .block-btn").first).to_be_attached()
|
||||
|
||||
|
||||
def test_the_report_control_is_absent_on_your_own_content(alice):
|
||||
@@ -41,7 +42,7 @@ def test_reporting_a_post_end_to_end_through_the_dialog(alice, bob):
|
||||
slug = _create_post(alice_page, "A post reported end to end through the dialog.")
|
||||
|
||||
bob_page.goto(f"{BASE_URL}/posts/{slug}", wait_until="domcontentloaded")
|
||||
bob_page.locator(".report-btn").first.click()
|
||||
click_menu_action(bob_page.locator("#post-actions-panel .report-btn"))
|
||||
|
||||
dialog = bob_page.locator("#report-dialog")
|
||||
dialog.wait_for(state="visible")
|
||||
@@ -61,7 +62,7 @@ def test_the_admin_queue_shows_the_report_and_its_sla_badge(alice, bob):
|
||||
slug = _create_post(alice_page, "A post that must appear in the moderation queue.")
|
||||
|
||||
bob_page.goto(f"{BASE_URL}/posts/{slug}", wait_until="domcontentloaded")
|
||||
bob_page.locator(".report-btn").first.click()
|
||||
click_menu_action(bob_page.locator("#post-actions-panel .report-btn"))
|
||||
bob_page.locator("#report-dialog").wait_for(state="visible")
|
||||
bob_page.select_option("#report-reason", "spam")
|
||||
bob_page.locator("#report-form button[type='submit']").click()
|
||||
@@ -88,9 +89,10 @@ def test_blocking_from_a_content_action_bar_hides_the_author(alice, bob):
|
||||
_create_post(alice_page, marker)
|
||||
|
||||
bob_page.goto(f"{BASE_URL}/feed", wait_until="domcontentloaded")
|
||||
expect(bob_page.locator(".post-card").first).to_be_visible()
|
||||
card = bob_page.locator(".post-card").filter(has_text=marker).first
|
||||
expect(card).to_be_visible()
|
||||
|
||||
bob_page.locator(".block-btn").first.click()
|
||||
click_menu_action(card.locator(".block-btn"))
|
||||
bob_page.locator(".dialog-overlay.visible .dialog-confirm").click()
|
||||
bob_page.wait_for_load_state("domcontentloaded")
|
||||
|
||||
@@ -100,9 +102,7 @@ def test_blocking_from_a_content_action_bar_hides_the_author(alice, bob):
|
||||
bob_page.goto(
|
||||
f"{BASE_URL}/profile/{alice_user['username']}", wait_until="domcontentloaded"
|
||||
)
|
||||
bob_page.locator("[data-action-menu-trigger]").first.click()
|
||||
bob_page.locator("[data-action-menu-panel]").wait_for(state="visible")
|
||||
bob_page.locator("button:has-text('Unblock')").first.click()
|
||||
click_menu_action(bob_page.locator("#profile-actions-panel button:has-text('Unblock')"))
|
||||
bob_page.locator(".dialog-overlay.visible .dialog-confirm").click()
|
||||
bob_page.wait_for_load_state("domcontentloaded")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user