You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.
Kevin Miller edited this page Apr 1, 2014
·
1 revision
These are notes on how to convert quail tests to the new guideline branch.
Convert test signature
quail.myTest=function(quail,test,Case){
Replace quail.html
Use test.get('$scope')
test.get('$scope').find('a').each(function(){
Find the potential elements that could be tested
test.get('$scope').find('my jquery selector').each(function(){//Enter logic to determine if element is not within scope to testif(myLogic===true){var_case=Case({element : this});test.add(_case);_case.set({'status': 'notApplicable',expected: $(this).closest('.quail-test').data('expected')});}});
Find element that failed or pass
Find all the elements that are in $applicableElements, a filter method is helpful here before iterating over the element list for certain tests.
$applicableElements.each(function(){var_case=Case({element: this,expected: $(this).closest('.quail-test').data('expected')});test.add(_case);// Do some logic to determine if the element failedif(testfailslogic){_case.set({'status': 'failed'});}// Otherwise, the element passedelse{_case.set({'status': 'passed'});}});