Giter VIP home page Giter VIP logo

pioneer's Introduction

pioneer's People

Contributors

codeorganic avatar cpjolicoeur avatar daviddufresne avatar diogenes avatar erlikh avatar jamiebuilds avatar jaridmargolin avatar jasonlaster avatar los83 avatar mforsyth avatar mojojosh avatar planetmcd avatar sabarasaba avatar samccone avatar sethkrasnianski avatar shoe avatar tomhicks-bsf avatar tsgautier avatar wkf avatar ziagrosvenor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pioneer's Issues

Instantiated Widgets should maintain a persistent reference to a WebElement.

In other words, a widget's "root" css selector should only be used to acquire a reference to an element. Once the reference is obtained, operations like finding its children should use find() on the original webElement rather than trying to construct an unique css selector for each child. Widgets should be constructable using a previously existing WebElement, which would mean the CSS root selector was never used at all. Child widgets in the case of List would then simply inherit WebElements that were optained from their parent List Widget's WebElement.find().

A widget should have an el based constructor

Currently the only way that you can create a new widget and find its sub elements is for that widget to have a selector. There are cases where you want to have an raw webElement and want to interact with it via the DIll.js API.

This API change should resolve multiple open bugs

fixes #20
fixes #14
fixes #8

Dill.List child selector is invalid

consider the following DOM

ul
  li
    a
  li
    a
  li
    a
  li
    a

and the following widget

Dill.List.extend({
  root: "ul",
  itemSelector: "a"
});

the selector that is generated for each list item is

ul a:nth-child(n) which will never be correct, since the nesting is > 1 node deep from the root.

coffeescript parsing fails with node v10

I'm not able to run my tests with node v10

It looks like dill.js extends Object with a function named '$'

Coffeescript uses the the dollar-sign as an object member in the parser.js file
yyval = {}
...
yyval.$ = vstack[vstack.length - len];

Using node v8, the assignment operation over-writes yyval's dollar-sign variable and everything works properly.

Using node v10, the assignment operation fails, yyval's dollar-sign variable remains a [Function] and the parsing fails.

Getting started video

Dill.js is hard to get your head wrapped around.
A video that steps someone through writing their first test would be super super helpful.

simplify Dill.js stack traces

Currently the stack traces are insane, since it is going through the promise API as well as webdrivers internal queue.

I think it should be quite possible to make these stack traces much shorter and more legible via a custom error base class.

The first tests

I think the best way to test dill is going to be to actually use the framework to test some fixtures. We can then make assertions about the return values of the dill.js widgets.

Another approach would be to stub out the selenium piece and then only test the dill.js interactions with the stubbed selenium.

I am open to either.

a dill widget extend should be able to take a flat object as well as a function

this.Widget.Form.extend(function() {
  this.getFoo = function(){...}
...
})

Should be the same as

this.Widget.Form.extend({
  getFoo: function(){...}
...
})

This will allow for a friendlier interface for creating custom classes.
Under the hood not much will change, this will basically add some public interface sugar.

Fix cucumber step generator.

Currently when you have an unimplemented step cucumber gives you a function that has a callback argument. This does not apply in our context since you are supposed to return a promise and or flat value to resolve the step.

We should fix this.

Dill.js should define a shorthand for reading elements via a widget hash

more and more I find myself doing this in my widgets

  return this.Widgets.MarketItem = this.Widget.extend({
    root: '.marketplace',

    description: function() {
      return this.read('.market-description');
    },
    vendors: function() {
      return this.read('.vendor');
    },

    format: function() {
      return this.read('.format');
    },

Where this is no more than a mapping of selectors to methods, it would be handy to be able to define a shorthand hash like

  return this.Widgets.MarketItem = this.Widget.extend({
    readable: {
      description: '.market-description',
      vendor: {
        // allow for custom matchers
        // such as by inner text
        selectBy: "contents",
        matcher: "foo bar zap"
      }
    }
  });

Which would then expose

MarketItem.read('description').then(function(contents){....});

Getting started example

Right now there are 0 instructions for how to use dill.js on a project. That makes this lib basically unusable. We should put together a basic readme file that contains the steps needed to test a basic static html page.

Cucumber is great and all but it should be optional for dill

Cucumber can be a hard sell for people, This however does not invalidate the fact that Dill is a great wrapper around WebDriver.

Dill should be able to used in standalone mode.

I think currently this is possible however we do not show people how to do this, should be quite simple.

Pioneer should expose a mock command to stub URL requests

Driver.stub("http://wow.com/api/tom/22", {data: struc}).then ->

It is naive to think that everyone who is interested in writing javascript integration tests has the time / ability / permissions to change the server on which the front end app interfaces. Providing a stub interface allows users to fake API requests with fixtures to easily add integration esk tests for SPAs.

add findWhere to dill.list

Currently filter is helpful when reducing a list to an array of results. sometimes however you just want 1 result. It would be excellent to do this

MyListInstance.findWhere(function(){...}).then(function(widget){...})

Dill.js should abstract interating with an iframe

currently you have to do something like this

return this.Widgets.BeakerFrame = this.Widget.extend({
    root: 'iframe.my-iframe',

     focus: function() {
         return this.driver.switchTo().frame(0);
     }
});

seems prime for abstraction into an iframe widget.

Show visual diffs for array matching.

currently the message is like

array length<1> to deeply eql array length<1> which is really hard to debug. We need to add a visual diff like mocha does.

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.