ZingTouch
|
ZingTouch |
2 |
should be instantiated
|
- |
|
should have constructors for all of the gestures
|
- |
|
Binder
|
Binder |
3 |
should be instantiated
|
- |
|
should return a new object with a valid element parameter
|
- |
|
should return a chainable object with all of the current registered gestures
|
- |
|
Binding
|
Binding |
4 |
should be instantiated
|
- |
|
should have an element as a member
|
- |
|
should have an Gesture as a member
|
- |
|
should have an function as a member
|
- |
|
Input
|
Input |
4 |
should be instantiated
|
- |
|
should have an initial event
|
- |
|
should have an current event
|
- |
|
should have an previous event
|
- |
|
Input.update
|
Input.update |
1 |
should update the current event
|
- |
|
Input.getGestureProgress
|
Input.getGestureProgress |
2 |
should have no progress initially
|
- |
|
should have be able to store metadata in the progress object.
|
- |
|
Input.getCurrentEventType
|
Input.getCurrentEventType |
2 |
should be null for an event it does not understand
|
- |
|
should not be null for an event it does understand
|
- |
|
Input.resetProgress
|
Input.getCurrentEventType |
1 |
should reset the progress of an existing progress state
|
- |
|
Region
|
Region |
1 |
should be instantiated
|
- |
|
Region.bind(element)
|
Region.bind |
4 |
should exist
|
- |
|
should throw an error if the element parameter is invalid
|
- |
|
should return a chainable Binder object if only an element parameter is provided
|
- |
|
should return a chainable Binder object that contains all of the registered gestures
|
- |
|
State
|
State |
4 |
should be instantiated
|
- |
|
should have no inputs
|
- |
|
should have no bindings
|
- |
|
should have instances of the 6 default gestures
|
- |
|
State.addBinding
|
State.addBinding |
4 |
should add a binding to a registered gesture
|
- |
|
should add a binding to a gesture instance
|
- |
|
should not add a binding to a non-registered gesture
|
- |
|
should not add a binding to an object not of the Gesture type
|
- |
|
State.retrieveBindings
|
State.retrieveBindings |
2 |
should retrieve no bindings for elements without any
|
- |
|
should retrieve bindings for elements that are bound
|
- |
|
util
|
util |
1 |
should be instantiated
|
- |
|
util.normalizeEvent
|
util.normalizeEvent |
4 |
should expect to emit start
|
- |
|
should expect to emit move
|
- |
|
should expect to emit end
|
- |
|
should expect to emit null for unknown events
|
- |
|
util.isWithin
|
util.isWithin |
2 |
should expect be true when points are within a tolerance
|
- |
|
should expect be false when points are outside a tolerance
|
- |
|
util.distanceBetweenTwoPoints
|
util.distanceBetweenTwoPoints |
3 |
should return a distance of 5
|
- |
|
should return a distance of 0
|
- |
|
should return a distance of 0
|
- |
|
util.getAngle
|
util.getAngle |
3 |
should return an angle of 45
|
- |
|
should return an angle of 360
|
- |
|
should return an angle of 180
|
- |
|
util.getAngularDistance
|
util.getAngularDistance |
4 |
should return an angle of 45
|
- |
|
should return an angle of -15
|
- |
|
should return an angle of +15
|
- |
|
should return an angle of 0
|
- |
|
Gesture
|
Gesture |
1 |
should be instantiated
|
- |
|
Gesture.getType
|
Gesture.getType |
1 |
should return null for a generic gesture
|
- |
|
Tap
|
Tap |
3 |
should be instantiated
|
- |
|
should return a Tap object.
|
- |
|
should return accept delay and number of inputs as parameters
|
- |
|