GithubHelp home page GithubHelp logo

interactive_frontend_dev's People

Contributors

bfulop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

interactive_frontend_dev's Issues

Integrate Webdriver Standalone in the tests

Related to #4 and #1

The idea is to delegate all browser-related actions (testing) to WebdriverIO, while keeping Wallaby as a focused test runner.
The main issue with an Electron/Wallaby based browser testing is that the solution to resize the browser window is a bit hacky.

Hopefully WebdriverIO will bring more robust browser testing capabilities. Also, this strategy will hopefully make it easier to run the tests on a wide variety of browsers through Selenium.

Plan out (again) how independent components on a page should behave.

In the most urgent use case, we need to do two things with this tool:

  1. BDD workflow for writing HTML components
  2. Export components to be used in a Symfony backend

In both cases the components data can come from the file system. This is solved.

Sometimes (more rarely) we do need to add live components to a page. For example a list should update it's content. This is still not an SPA, so we don't need routing. We just need that the dispatch function updates the model and rerenders.

The realistic use case will be to have several independent components rendered on the page. Plan out the architecture, how they should be managed.

#16 #17

Add Wallaby Worker ID to browser window title

When there are several tests Wallaby runs them in parallel. In our case, this means it opens more than one browser window. When doing live editing and testing, Wallaby will most likely only use worker id 0 to update the browser.

This is to help find the browser window when doing live editing.

Update all instances of NightmareJS

The before hook does some setup on the browser ("arrange"). Usually, it updates the component in the browser. This should happen on all "browser sizes" i.e. all nightmarejs instances.

#14

Test file watching strategies

Related issue: #1

Ideally, we should see tests failing or passing when saving either the spec file or a component file.
This should be as fast as possible, so the browser should keep the window open, keep the page open and detect which component or spec file has changed and run only the minimum of tests needed.

A. Webdriver testrunner --watch mode

Webdriverio has its own test runner (using Mocha) that supports file watching by specifying the spec files in its config files. It seems quite fast, it doesn't reinitialise the browser, reloads the page etc.

Need to test if I can add non spec definitions to the spec list in config.

B. Using PhantomJS

Check if possible to use assertions (element relative position on page, etc) with PhantomJS

C. Webdriverio stand alone mode

Include webdriverio as a library in Mocha tests and set up watching manually (avoiding to rerun the complete suite).

D. Doing atomic renderings and running assertions with WallabyJS

Render the component in a before() hook in Mocha and using Electron then run the assertions.

Render CSS with Aphrodite in the target browser

This is for live unit testing. Related to #6, #5 and #1

The CSS lives in the JavaScript component as an object so it can be passed by WebdriverIO as a function or JSON and rendered on the client. This has to be synchronised with #5 as the CSS classes are being dynamically generated by Aphrodite. The className is a hash of the CSS rules.

Handle subcomponents in tests

Replace sub components (testdouble.js ?)

Instead of rendering the sub component, render a placeholder component

related to #1

Abstract out target browsers sizes

Let the user define in one place a list of target browser sizes he wants to test and the helpers should do all the necessary setup.

Related to #1

Use NightmareJs for interactive testing and WebdriverIO for integration tests

The current setup using WebdriverIO and Selenium works really well and the performance is great so far.

NightmareJS would probably even more performant when doing interactive testing with Wallaby. The fact that we're already using the PageObjects pattern should allow us to swap out the WebdriverIO to NigthmareJS. Then, we can still use the WeddriverIO test runner for running tests on a cloud service, or locally on several devices.

Will try this.

Clean out old style definitions when live testing

During live testing, at each keystroke aphrodite adds a new CSS definition to <styles>.

Old styles could be removed, but it has to be done through Inferno. If I revert the state of my CSS Aphrodite/Inferno will not add a new element but reuses the old style. So this has to be done with care...

Set up tests so that they can be run separately (integration tests)

The goal is that the layout unit test would also run in a cross browser testing platform (Browserstack, Saucelabs, Crossbrowsertesting, Testingbot), separately from the Wallaby interactive test runner.

  • add environment variables to toggle parts of the test related to Wallaby/Mocha
  • name the test files that should be run on the testing service (not business logic unit tests)

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.