Giter VIP home page Giter VIP logo

garnet-spec's People

Contributors

eliasjpr avatar elorest avatar faustinoaq avatar katafrakt avatar marksiemers avatar renfontes avatar robacarp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

garnet-spec's Issues

Example test doesn't work

Walking through the readme, I copied (close to) this code out to run:

class SomeFeatureSpec < GarnetSpec::System::Test
  describe "Some Feature test" do
    it "works" do
      visit "http://crystal-lang.org/api"
      fill "", "Client", "search"

      types_list = page.find_element(:id, "types-list")
      types = types_list.find_elements(:css, "li:not([class~='hide'])")

      types.size.should eq 512
    end
  end
end

however:

[lots of backtrace]

instantiating 'GarnetSpec::SeleniumServer:Class#boot()'
in lib/garnet_spec/src/garnet_spec/selenium_server.cr:10: no overload matches 'Process.new', command: String, output: Bool, error: Bool
Overloads are:
 - Process.new(command : String, args = nil, env : Env = nil, clear_env : Bool = false, shell : Bool = false, input : Stdio = Redirect::Close, output : Stdio = Redirect::Close, error : Stdio = Redirect::Close, chdir : String | ::Nil = nil)
 - Process.new(pid)

      Process.new(command: "selenium-server", output: true, error: true)

Perhaps this is out of date with the Crystal API?

Add helper methods to ease controller testing

Right know is possible to test controller actions preloading routes of your application and borrowing a helper method from Amber's source.

For example, for making an HTTP GET request we could do the following:

 def get(path)
   handler = Amber::Server.instance.handler
   handler.prepare_pipelines # Preload routes
   request = HTTP::Request.new("GET", path) # Create request
   create_request_and_return_io(handler, request) # Generate response
 end

With that a user could test its route as this:

response = get("/my_path")
response.status_code.should eq 200

It would be very useful to have a method for each HTTP verb to make requests and be able to attach params and headers as well.

Version of selenium-webdriver-crystal uses a deprecated method

JSON.mapping is being used which is deprecated.
Seems to be fixed in amberframework/selenium-webdriver-crystal but the version downloaded by garnet still has the issue.

Probably needs to be fixed here and on amberframework/selenium-webdriver-crystal.

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.