You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 regels
686 B

  1. describe 'the `autosuggest-toggle` widget' do
  2. before do
  3. session.run_command('bindkey ^B autosuggest-toggle')
  4. end
  5. it 'toggles suggestions' do
  6. with_history('echo world', 'echo hello') do
  7. session.send_string('echo')
  8. wait_for { session.content }.to eq('echo hello')
  9. session.send_keys('C-b')
  10. wait_for { session.content }.to eq('echo')
  11. session.send_string(' h')
  12. sleep 1
  13. expect(session.content).to eq('echo h')
  14. session.send_keys('C-b')
  15. wait_for { session.content }.to eq('echo hello')
  16. session.send_keys('C-h')
  17. session.send_string('w')
  18. wait_for { session.content }.to eq('echo world')
  19. end
  20. end
  21. end