Skip to content

Commit 6179bd9

Browse files
committed
Wait for the Terminal help's last line, which a short window still shows
xterm draws only the rows on screen. In the pseudo-locale the help's lines are longer and wrap, so on CI's macOS window its first line had scrolled out of view and the journey timed out waiting for it.
1 parent 274bb2d commit 6179bd9

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎tests/e2e/journeys/i18n.spec.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,11 @@ test( 'the Terminal is fully translatable: what it prints, a command it does not
717717
};
718718
const printed = async () => ( await terminalLines( screen ) ).filter( ( line ) => ! line.startsWith( '$' ) && ! ( line.startsWith( '[' ) && whole( line ) ) );
719719

720-
// The banner and the help it prints as it starts.
721-
await expect( screen ).toContainText( pseudoLocalize( 'Available commands:' ), { timeout: 30_000 } );
720+
// The banner and the help it prints as it starts. Waited for by its last
721+
// line: xterm draws only the rows on screen, and on a short window the
722+
// help's first lines, longer in the pseudo-locale, have already scrolled
723+
// out of them.
724+
await expect( screen ).toContainText( pseudoLocalize( 'Run them here whenever you change files or add a dependency afterwards.' ), { timeout: 30_000 } );
722725
expect( await printed() ).toEqual( [] );
723726

724727
// The help asked for, and a command it does not know. The terminal's

0 commit comments

Comments
 (0)