This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Jason Stahl (author)
Thu Jan 29 22:19:42 -0800 2009
TestMonkey
Automated HTML and Javascript Unit Test Framework
WARNING: This is brand new spanking code and is not yet stable and should be used with precaution.
Look in the tests folder for the manifest.js file for an example of a set of suites.
Each test suite has one or more tests. Each test has one or more test assertions.
For each assertion, there are some built-in assertion helpers:
- assert: generic assertion
- assertVisible: assert that visibility:visible
- assertHidden: assert that visibility:hidden
- assertDisabled: assert that the element is disabled
- assertEnabled: assert that the element is enabled
- assertCSS: assert a CSS value, for example a border
- assertValue: assert the value of an element, usually a form element
- assertText: assert the text value of an element
- assertAttr: assert an element's attribute value
- assertClass: assert that an element has a specific CSS class
- assertHTML: assert that an element's HTML equals a specific value
- assertEmpty: assert that an element is empty (no children)
- assertChecked: assert that a checkbox is checked
- assertUnchecked: assert that a checkbox is unchecked
You use the assertions with a jQuery selector. For example:
$('#my_div').assertHidden();
or
$('#my_div').assertCSS('border','1px solid red');
You can introduce your own new assertion types by calling the function
TestMonkey.installAssertionType. Example for empty:
TestMonkey.installAssertionType('Empty',function(testcase,assertion,args)
{
return [this.text()=='',this.text()];
});
Interested in helping out? Email me at jhaynie@gmail.com.
Copyright 2008 Appcelerator, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.












