Code Monkey home page Code Monkey logo

ex_cucumber's People

Contributors

elepedus avatar kevin-johnson-shopify avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ex_cucumber's Issues

Features Dir

@Ajwah

I tried the following:

 23   @shortdoc "Run cucumber framework"
  24   @impl Mix.Task
  25   def run(opts) do
  26     Code.compiler_options(ignore_module_conflict: true)
  27     IEx.Helpers.r(ExCucumber.Config)
  28     IEx.Helpers.r(ExCucumber)
  29     IEx.Helpers.r(ExCucumber.Gherkin.Keywords)
  30
  31     Code.compiler_options(ignore_module_conflict: false)
  32
  33     Mix.Task.run("app.start")
  34     _ = opts(opts)
  35
  36     report =
  37       "#{ExCucumber.Config.feature_dir()}/**/*.exs" # HERE
  38       |> Path.wildcard()
  39       |> Enum.reduce(Report.new(), fn e, a = %Report{} ->
  40         try do
  41           Code.compile_file(e)
  42           Report.record(a, :passed)
  43         rescue
  44           error in @cucumber_related_error_types -> Report.record(a, %{file: e, er
     ror: error})
  45         end
  46       end)
  47
  48     report.failed
  49     |> Enum.each(&(Messages.render(&1.error, false) |> IO.inspect()))
  50
  51     IO.puts("""
  52     Total: #{report.total}
  53     Passed: #{report.passed}
  54     Failed: #{Enum.count(report.failed)}
  55     """)
  56   end
  57
  58   defp opts(opts) do
  59     opts
  60     # |> OptionParser.parse
  61   end

In order to load features within feature_dir. However, I was naive. I had to tell @feature the relative path since

 147   defmacro __after_compile__(env, _) do
 148     quote do
 149       custom_param_types = ExCucumber.CustomParameterType.Loader.run(@custom_param
     _types)
 150       @feature
 151       |> ExCucumber.Config.feature_path()
 152       |> ExCucumber.Gherkin.run(
 153         __MODULE__,
 154         unquote(Macro.escape(env)).file,
 155         @cucumber_expressions_parse_tree,
 156         custom_param_types
 157       )
 158     end
 159   end

uses the feature_path().

So, I was wondering since I'm still new to Elixir and that piece of code looks like the inscriptions in the spaceship at Roswell, what changes will be needed to be done in order to just tell @feature the file name and internally ex_cucumber will know to look for the file the current dir?

Again, thanks for the great work!

Why do I have to manually download gherkin-languages.json, when it's already included in this library?

Hi,

Thanks for your work on ex_cucumber.

I'm just coming to it for the first time, and struggling to understand why I have to manually download the gherkin-languages.json file, even though it's included in the sources of this library and of my_ex_gherkin. Can the library not just use its built-in version by default?

Having to hunt down a json file in some external repository is quite jarring to the onboarding experience, and having that file copied into the consuming app's repository just adds clutter.

About Data Table

@Ajwah in the HexDocs you mentioned this

I just one to confirm something: I got the idea somehow that once you defined the Scenario Outline, all the cases defined in the data table will be tested, however, I think i got the wrong idea. Can you clarify this? ๐Ÿ™๐Ÿป thanks a bunch, this is lib is effing amazing.

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.