forked from retoor/devplacepy
ipdatepppdate
This commit is contained in:
@@ -311,18 +311,19 @@ def test_optimistic_send_pending_then_reconciles_no_double_render(alice, bob):
|
||||
textarea.fill(msg)
|
||||
page_a.locator(".messages-send-btn").click()
|
||||
|
||||
pending = page_a.locator(f".message-bubble.mine.pending:has-text('{msg}')")
|
||||
pending.wait_for(state="visible", timeout=5000)
|
||||
client_id = pending.get_attribute("data-client-id")
|
||||
bubble = page_a.locator(f".message-bubble.mine:has-text('{msg}')").first
|
||||
bubble.wait_for(state="visible", timeout=10000)
|
||||
client_id = bubble.get_attribute("data-client-id")
|
||||
assert client_id
|
||||
|
||||
reconciled = page_a.locator(
|
||||
f".message-bubble.mine[data-client-id='{client_id}'][data-msg-uid]:not(.pending)"
|
||||
)
|
||||
reconciled.wait_for(state="visible", timeout=6000)
|
||||
reconciled.wait_for(state="visible", timeout=10000)
|
||||
assert page_a.locator(f".message-bubble.mine:has-text('{msg}')").count() == 1
|
||||
|
||||
received = page_b.locator(f".message-bubble.theirs:has-text('{msg}')")
|
||||
received.wait_for(state="visible", timeout=6000)
|
||||
received.wait_for(state="visible", timeout=10000)
|
||||
assert received.count() == 1
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user