Capybaraã§ä¸å®æã«ElementNotFoundï¼ç¹ã«CircleCIã§ï¼
ä½äºãall or nothingã«ãããã人ã¯ç½®ãã¨ãã¦ãã¼ãã¯ãã£ãã¨å¹æçãªç¯å²ã§ãã¹ããæ¸ãã¦ããããã¨æã£ã¦ãã¾ããããããªã¼ãã®å¿ãç¥ãããã¦ããCapybaraã¯ä¸å®æã«ä»¥ä¸ã®ãããªã¨ã©ã¼ãåããä½æ ãç¹ã«CircleCIã§ã
Capybara::ElementNotFound:
Unable to find css "#some_selector"
Bootsrapã使ã£ã¦ããã¨ãã«é¡èãªãã ãã©ãcssã®transitionãªã©ã®ã¨ãã§ã¯ããå®äºããã¾ãã«Capybaraãå èµ°ã£ã¦ãã¾ããã¨ãããã®ã§ä¸å®æã«èµ·ãã£ã¦ãã¾ããã¨ããã·ããªãªã
ã§ããã°ããã¹ãã®ã¨ãã¯ã¨ãã§ã¯ãåãã°ãããããªãã
http://stackoverflow.com/questions/14488836/capybara-2-having-trouble-interacting-with-bootstrap-modals
application.html.erb
~snip~ <%= javascript_tag '$.fx.off = true;' if Rails.env.test? %> <%= stylesheet_link_tag 'disable-transition' if Rails.env.test? %> </head> ~snip~ <% if Rails.env.test? %> <script> $(".fade").removeClass("fade"); </script> <% end %> </body>
disable-transition.css.scss
div, a, span, footer, header { -webkit-transition: none !important; -moz-transition: none !important; -ms-transition: none !important; -o-transition: none !important; transition: none !important; } .modal { display: none !important; } .modal.in { display: block !important; } .modal-backdrop { display: none !important; }
ããã§çºççããã£ã¨æ¸ãã¯ãã ã£ã¡ãã