Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Wataru MIYAGUNI
    @gongo
    Turnip 1.3.1 has been released on June 23. Enjoy!!
    Wataru MIYAGUNI
    @gongo
    I will try to reduce RSpec version that is supported by turnip.
    Now, more more ..
    create issue later.
    Wataru MIYAGUNI
    @gongo
    jnicklas/turnip#158
    Akira Suenami
    @a-suenami
    LGTM :meat_on_bone:
    Wataru MIYAGUNI
    @gongo
    Thanks for reply :smile:
    Jared Beck
    @jaredbeck
    Hi, are there instructions for upgrading from 0.3.1 to 1.0?
    Wataru MIYAGUNI
    @gongo
    sorry, no instruction.
    Wataru MIYAGUNI
    @gongo
    Is there any problem during upgrade?
    Jared Beck
    @jaredbeck
    Yes, many problems.
    It seems like turnip is completely different.
    Wataru MIYAGUNI
    @gongo
    @jaredbeck OK. Please create a new issue about many probelms :smile:
    Wataru MIYAGUNI
    @gongo
    I wrote about RSpec support policy and turnip release plan. Please check it! https://github.com/jnicklas/turnip/issues/158#issuecomment-119049054
    Wataru MIYAGUNI
    @gongo
    Turnip 2.0.0 has been released on Nov 19
    Thanks :pizza:
    Wataru MIYAGUNI
    @gongo
    I plan to release 3.0.0 and I've released 3.0.0.beta.2 https://github.com/jnicklas/turnip/releases/tag/v3.0.0.pre.beta.2 :muscle:
    Please try 3.0.0.beta2 in your code if you are free :bow:
    Scott Jacobsen
    @scottjacobsen
    Can you interpolate strings in turnip features, like Then "I should see #{I18n.t(:my_key)}"
    Tadashi Nemoto
    @tadashi0713
    @gongo Hi, is it possible to create new release after this pr?
    jnicklas/turnip#214
    Wataru MIYAGUNI
    @gongo
    @tadashi0713 I'll release it tonight!
    Tadashi Nemoto
    @tadashi0713
    Thank you!
    Wataru MIYAGUNI
    @gongo
    Turnip 4.0.1 has been released now https://rubygems.org/gems/turnip/versions/4.0.1 ( @tadashi0713 )
    Tadashi Nemoto
    @tadashi0713
    :tada:
    Erik Jacobs
    @thoraxe
    i'm trying to use turnip to do some tests with selenium... my code works fine in dev, but in test it's not working, and I'm not sure how to troubleshoot the javascript in test mode
    hmm ok it seems that when capybara is clicking the link, it's actually going to the destination of the link, and not doing the ajax thing
    the link being clicked looks like:
    <a class="pb-1 border-bottom border-light relevance-label-control" id="55-relevant-label-control" data-remote="true" rel="nofollow" data-method="patch" href="/relevance_labels/55?filter=1&amp;project=1&amp;relevance=true&amp;user=1"><i aria-hidden="true" class="fa-lg fa-thumbs-up grey-text far" data-html="true" data-toggle="tooltip" id="55-relevant-label-icon" title="" data-original-title="Label this article as <strong>relevant</strong> to this stream"></i></a>
    so, it's data-remote and patch and definitely uses ajax in the regular browser. it just doesn't seem like capybara is using the selenium driver
    Here's the feature:
    @elasticsearch @javascript
    Scenario Outline: Labeling articles
      When a specific stream is viewed
      And the label <new_label> is applied to an article whose label is <current_label>
      Then only the label <new_label> is indicated
      And a message about <new_label> is displayed
    
      Examples:
        | current_label | new_label   |
        | unlabeled     | relevant    |
    the @elasticsearch part definitely works
    Erik Jacobs
    @thoraxe
    OH
    that should probably be selenium
    and not javascript
    hmm no change
    Erik Jacobs
    @thoraxe
    pry(#<RSpec::ExampleGroups::UsersCanManageRelevanceLabelsOnArticles::LabelingArticles>)> Capybara.current_driver
    => :rack_test
    so, it appears that the @javacript / @selenium are being ignored
    Erik Jacobs
    @thoraxe

    ok, getting further. here's my turnip_helper.rb now:

    require 'rails_helper'
    require 'turnip/capybara' # to use Capybara DSL methods in steps
    require 'capybara'
    require 'webdrivers'
    
    Dir.glob("spec/steps/**/*steps.rb") { |f| load f, true }
    
    Capybara.current_driver = :selenium
    Capybara.javascript_driver = :selenium

    But now when I run the feature, I get the following error:

         Failure/Error: visit(project_path(@labeling_project.slug, f: @labeling_stream.slug, q: @labeling_stream.query))
    
         Selenium::WebDriver::Error::UnknownError:
           invalid argument: can't kill an exited process
    ok, i'm running this in a container, and found SeleniumHQ/selenium#6622, which implies running headless firefox, and now I've made progress. Finally at the point of getting a failed test, but for a weird reason
    Erik Jacobs
    @thoraxe
    Given css selector expression "#1-relevant-label-icon.fas.fa-thumbs-up.avogadro-text" is invalid: SyntaxError: '#1-relevant-label-icon.fas.fa-thumbs-up.avogadro-text' is not a valid selector
    tl;dr: now this is pure user error and nothing to do with turnip
    Erik Jacobs
    @thoraxe

    ok, now I am having an issue with the "Wrong" javascript driver being run...

    require 'rails_helper'
    require 'turnip/capybara' # to use Capybara DSL methods in steps
    require 'capybara'
    require 'webdrivers'
    
    Dir.glob("spec/steps/**/*steps.rb") { |f| load f, true }
    
    Capybara.register_driver :firefox_headless do |app|
      options = ::Selenium::WebDriver::Firefox::Options.new
      options.args << '--headless'
    
      Capybara::Selenium::Driver.new(app, browser: :firefox, options: options)
    end
    
    Capybara.javascript_driver = :firefox_headless
    Capybara.current_driver = :firefox_headless

    When I get down into a test and use a binding.pry, I get the following:

    [1] pry(#<RSpec::ExampleGroups::UsersCanManageRelevanceLabelsOnArticles::LabelingArticles>)> Capybara.current_driver
    => :rack_test
    [2] pry(#<RSpec::ExampleGroups::UsersCanManageRelevanceLabelsOnArticles::LabelingArticles>)> Capybara.javascript_driver
    => :firefox_headless
    This message was deleted
    something seems like it's resetting the javascript driver to :rack_test and I don't know why
    Erik Jacobs
    @thoraxe
    forcing the feature to use @javascript seemed to fix that
    on to the next problem