Skip to content

Commit 10af17e

Browse files
committed
Wait for publication journey settlement before clicking Exit
1 parent f0cca62 commit 10af17e

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎packages/cli/tests/support/repl-pull-request-journey.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ export function replPullRequestJourney(repl: ReplCommand): Operation<void> {
451451
]);
452452
expect(JSON.stringify(answered)).not.toContain(TOKEN);
453453

454+
yield* showing(second, "HEAD · SETTLED", ACT_MS);
454455
yield* click(second, "[exit]");
455456
expect(yield* ended(second)).toBe(0);
456457
});
@@ -514,6 +515,7 @@ export function replUnsupportedPullRequest(repl: ReplCommand): Operation<void> {
514515
expect(yield* exists(join(home, ".xmd", "repositories"))).toBe(false);
515516

516517
yield* settledEntry(pty, 1, "ok", ACT_MS);
518+
yield* showing(pty, "HEAD · SETTLED", ACT_MS);
517519
yield* click(pty, "[exit]");
518520
expect(yield* ended(pty)).toBe(0);
519521
});

‎packages/cli/tests/support/repl-push-journey.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ export function replPushJourney(repl: ReplCommand): Operation<void> {
178178
expect(yield* pushes(shim.log)).toEqual([]);
179179
expect(yield* remoteRef(origin, BRANCH, home)).toBe(published);
180180

181+
yield* showing(second, "HEAD · SETTLED", ACT_MS);
181182
yield* click(second, "[exit]");
182183
expect(yield* ended(second)).toBe(0);
183184

@@ -194,6 +195,8 @@ export function replPushJourney(repl: ReplCommand): Operation<void> {
194195
expect(yield* pushes(shim.log)).toHaveLength(1);
195196
expect(yield* remoteRef(origin, "main", home)).toBe(primary);
196197

198+
yield* settledEntry(third, 2, "ok", ACT_MS);
199+
yield* showing(third, "HEAD · SETTLED", ACT_MS);
197200
yield* click(third, "[exit]");
198201
expect(yield* ended(third)).toBe(0);
199202
});
@@ -244,6 +247,8 @@ export function replUnsupportedPush(repl: ReplCommand): Operation<void> {
244247
expect(yield* remoteRef(origin, "main", home)).toBe(head);
245248
expect(yield* exists(join(home, ".xmd", "repositories"))).toBe(false);
246249

250+
yield* settledEntry(pty, 1, "ok", ACT_MS);
251+
yield* showing(pty, "HEAD · SETTLED", ACT_MS);
247252
yield* click(pty, "[exit]");
248253
expect(yield* ended(pty)).toBe(0);
249254
});

0 commit comments

Comments
 (0)