Permalink
Browse files

Update tests

  • Loading branch information...
Ian Maffett
Ian Maffett committed Jan 30, 2015
1 parent d002522 commit dbda2226726f0c8d3e3d52206c5f0cd40fdd7f6a
Showing with 18 additions and 11 deletions.
  1. +4 −4 karma.conf.js
  2. +6 −1 src/af.shim.js
  3. +8 −6 test/popup.test.js
View
@@ -7,7 +7,7 @@ module.exports = function (karma) {
frameworks: ['mocha'],
preprocessors: {
'test/fixtures/*.html': ['html2js'],
'src/*.js': 'coverage',
'**/src/*.js': 'coverage'
},
// list of files / patterns to load in the browser
@@ -42,7 +42,7 @@ module.exports = function (karma) {
//- cobertura (xml format supported by Jenkins)
coverageReporter: {
// cf. http://gotwarlost.github.com/istanbul/public/apidocs/
type: 'lcov',
type: 'html',
dir: 'coverage/'
},
@@ -65,7 +65,7 @@ module.exports = function (karma) {
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
autoWatch: false,
// Start these browsers, currently available:
@@ -86,7 +86,7 @@ module.exports = function (karma) {
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false,
singleRun: true,
plugins: [
View
@@ -108,7 +108,7 @@
$.os.kindle=userAgent.match(/Silk-Accelerated/)?true:false;
//features
$.feat = {};
$.feat.cssPrefix = $.os.webkit ? "Webkit" : $.os.fennec ? "Moz" : $.os.ie ? "ms" : $.os.opera ? "O" : "";
$.feat.cssTransformStart = !$.os.opera ? "3d(" : "(";
$.feat.cssTransformEnd = !$.os.opera ? ",0)" : ")";
if ($.os.android && !$.os.webkit)
@@ -123,6 +123,11 @@
$.os.ie=true;
$.os.ieTouch=true;
}
var items=["Webkit","Moz","ms","O"];
for(var j=0;j<items.length;j++){
if(document.documentElement.style[items[j]+"Transform"]==="")
$.feat.cssPrefix=items[j];
}
}
View
@@ -15,7 +15,7 @@ describe("popup",function(){
$("#popuptest").remove();
});
it("should display a popup and dismiss it",function(done){
var msg="Hello 1";
@@ -52,7 +52,7 @@ describe("popup",function(){
});
setTimeout(function(){
$('#myTestPopup').length.should.eql(1);
$("#myTestPopup #action").trigger("click");
$("#myTestPopup #action").trigger("click");
setTimeout(function(){
$('#myTestPopup').length.should.eql(0);
expect(what).to.be.true;
@@ -84,7 +84,7 @@ describe("popup",function(){
});
setTimeout(function(){
$('#myTestPopup').length.should.eql(1);
$("#myTestPopup #cancel").trigger("click");
$("#myTestPopup #cancel").trigger("click");
setTimeout(function(){
$('#myTestPopup').length.should.eql(0);
expect(what).to.be.true;
@@ -113,14 +113,15 @@ describe("popup",function(){
$.afui.ready(function(){
done();
});
});
$.afui.launch();
});
/// data directives
/*
it("should display a data directive popup and dismiss it",function(done){
$("#popuptest a").trigger("click");
setTimeout(function(){
$('.afPopup').length.should.eql(1);
@@ -132,4 +133,5 @@ describe("popup",function(){
},200);
});
*/
});

0 comments on commit dbda222

Please sign in to comment.