Skip to content
Extraits de code Groupes Projets
  1. août 19, 2017
  2. août 17, 2017
  3. août 16, 2017
  4. août 12, 2017
  5. août 10, 2017
  6. août 09, 2017
  7. août 07, 2017
  8. juil. 23, 2017
  9. juil. 14, 2017
    • Finn Woelm's avatar
      Fix: Use Capybara#fill_in for appending to publisher · 14b7c105
      Finn Woelm a rédigé
      Capybara's native#send_key function is slow when it is passed a string
      longer than just a few characters. This often results in timeout issues
      and Capybara (falsely) reporting feature as failing.
      
      To fix this, we use the faster function #fill_in. This does not trigger
      JavaScript events on the input, so we manually trigger them after
      fill_in by just sending a single key. This can be any key but since we
      do not want to modify the text in the input, non-text keys should be
      used. For a list of non-text keys, see
      http://www.rubydoc.info/github/jnicklas/capybara/Capybara%2FNode%2FElement%3Asend_keys
      
      There is an alternative to the above:
      1) Use #fill_in to enter all text except for the last character:
          fill_in ..., with: "#{status_message_text} #{txt[0..-2]}"
      2) And then use #send_key to send that last character:
          find("#status_message_text").native.send_key(txt.last)
      
      At the moment, both approaches work equally well but the second approach
      is documented here just in case it becomes relevant in the future.
      14b7c105
  10. juil. 07, 2017
  11. juil. 06, 2017
  12. juil. 04, 2017
  13. juil. 03, 2017
  14. mai 03, 2017
  15. avr. 02, 2017
  16. mars 28, 2017
  17. mars 23, 2017
  18. mars 21, 2017
  19. mars 04, 2017
  20. fév. 13, 2017
  21. fév. 12, 2017
  22. fév. 08, 2017
  23. jan. 22, 2017
  24. jan. 15, 2017
Chargement en cours