diff --git a/docs/changes/unreleased/2185-stale-publish-test.md b/docs/changes/unreleased/2185-stale-publish-test.md new file mode 100644 index 0000000000..405d5b9048 --- /dev/null +++ b/docs/changes/unreleased/2185-stale-publish-test.md @@ -0,0 +1,6 @@ +--- +kind: internal +title: The stale-publish test waits for the announced move, not the first viewer line +pr: 2185 +surface: [chat] +--- diff --git a/internal/syncsetup/drive_refusal_safety_test.go b/internal/syncsetup/drive_refusal_safety_test.go index 059731fd50..38f9f8cda8 100644 --- a/internal/syncsetup/drive_refusal_safety_test.go +++ b/internal/syncsetup/drive_refusal_safety_test.go @@ -46,7 +46,10 @@ func TestStalePublishRefusalMakesViewerAndNotifiesOnce(t *testing.T) { } h.block.set(false) want := chatlist.Superseded(nameB) - waitFor(t, "A to become a viewer after stale publish", func() bool { _, viewer := a.drive.Viewer(); return viewer }) + // The window refuses work at once, first with an unnamed line while the + // holder's name is read, and announces the move once pending saves have + // settled (#1971). The announcement is the settled state. + waitFor(t, "A to announce the move after stale publish", func() bool { return h.wall.has(want) }) if line, viewer := a.drive.Viewer(); !viewer || line != want { t.Fatalf("viewer = %q, %v; want %q, true", line, viewer, want) }