Skip to content

Commit

Permalink
Fix (password): update hint message
Browse files Browse the repository at this point in the history
  • Loading branch information
matteosacchetto committed Dec 4, 2023
1 parent 583aa9f commit 6bbceb8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/password/password.test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -132,47 +132,47 @@ describe('password prompt', () => {
});

expect(getScreen()).toMatchInlineSnapshot(
'"? Enter your password (press CTRL+Space to show the password)"',
'"? Enter your password (CTRL+Space to show/hide the password)"',
);

events.type('J');
expect(getScreen()).toMatchInlineSnapshot(
'"? Enter your password (press CTRL+Space to show the password) *"',
'"? Enter your password (CTRL+Space to show/hide the password) *"',
);

events.type('ohn');
expect(getScreen()).toMatchInlineSnapshot(
'"? Enter your password (press CTRL+Space to show the password) ****"',
'"? Enter your password (CTRL+Space to show/hide the password) ****"',
);

events.keypress({
name: '`',
ctrl: true,
});
expect(getScreen()).toMatchInlineSnapshot(
'"? Enter your password (press CTRL+Space to show the password) John"',
'"? Enter your password (CTRL+Space to show/hide the password) John"',
);

events.keypress({
name: '`',
ctrl: true,
});
expect(getScreen()).toMatchInlineSnapshot(
'"? Enter your password (press CTRL+Space to show the password) ****"',
'"? Enter your password (CTRL+Space to show/hide the password) ****"',
);

events.keypress({
name: '`',
ctrl: true,
});
expect(getScreen()).toMatchInlineSnapshot(
'"? Enter your password (press CTRL+Space to show the password) John"',
'"? Enter your password (CTRL+Space to show/hide the password) John"',
);

events.keypress('enter');
await expect(answer).resolves.toEqual('John');
expect(getScreen()).toMatchInlineSnapshot(
'"? Enter your password (press CTRL+Space to show the password) ****"',
'"? Enter your password (CTRL+Space to show/hide the password) ****"',
);
});
});

0 comments on commit 6bbceb8

Please sign in to comment.