Giter Club home page Giter Club logo

Comments (4)

jonleighton avatar jonleighton commented on August 19, 2024 1

I don't think you need to monkey patch. You can just do (e.g. in rspec)

before do
  page.driver.resize ...
end

In terms of also having a config option, I'm not against that.

from poltergeist.

jonleighton avatar jonleighton commented on August 19, 2024

Huh, weird. It should only need to be set once per window opened. So setting it at the very beginning of your test run should be sufficient. Is this not the case? Can you provide a minimal example to reproduce the problem?

from poltergeist.

botandrose avatar botandrose commented on August 19, 2024

Jon, you're right, my mistake. I've been able to reduce it to just monkeypatching Capybara's visit method, so that it is only resized once at the beginning of each test.

However, ideally, I'd like to be able to specify this default size just one time, perhaps when I declare poltergeist as the capybara driver, as a sort of poltergeist "configuration option." If I were to develop a patch for this, would you be interested in taking a look at it?

from poltergeist.

rentalcustard avatar rentalcustard commented on August 19, 2024

@botandrose There's a config option for this on latest master and in the upcoming 0.7 release. See #74. Please reopen this issue if it fails to do what you expect!

from poltergeist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.