Git Product home page Git Product logo

arts's Introduction

ARTS is Another RJS Test System

For a complete tutorial, see http://glu.ttono.us/articles/2006/05/29/guide-test-driven-rjs-with-arts.

Usage:
  assert_rjs :alert, 'Hi!'
  assert_rjs :assign, 'a', '2'
  assert_rjs :call, 'foo', 'bar', 'baz'
  assert_rjs :draggable, 'draggable_item'
  assert_rjs :drop_receiving, 'receiving_item'
  assert_rjs :hide, "post_1", "post_2", "post_3"
  assert_rjs :insert_html, :bottom, 'posts'
  assert_rjs :redirect_to, :action => 'list'
  assert_rjs :remove, "post_1", "post_2", "post_3"
  assert_rjs :replace, 'completely_replaced_div'
  assert_rjs :replace, 'completely_replaced_div', '<p>This replaced the div</p>'
  assert_rjs :replace, 'completely_replaced_div', /replaced the div/
  assert_rjs :replace_html, 'replaceable_div', "This goes inside the div"
  assert_rjs :show, "post_1", "post_2", "post_3"
  assert_rjs :sortable, 'sortable_item'
  assert_rjs :toggle, "post_1", "post_2", "post_3"
  assert_rjs :visual_effect, :highlight, "posts", :duration => '1.0'

For the square bracket syntax (page['some_id'].toggle) use :page followed by the id and then subsequent method calls. Assignment requires a '=' at the end of the method name followed by the value.

  assert_rjs :page, 'some_id', :toggle
  assert_rjs :page, 'some_id', :style, :color=, 'red'

arts's People

Stargazers

 avatar

Watchers

 avatar

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.