Created
September 4, 2013 18:41
-
-
Save jlipps/6441023 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global it:true */ | |
"use strict"; | |
var describeWd = require("../../helpers/driverblock.js").describeForApp('UICatalog') | |
, should = require('should'); | |
describeWd('basic', function(h) { | |
it('should confirm element is not visible', function(done) { | |
h.driver.elementsByTagName('tableCell', function(err, els) { | |
els[0].click(function() { | |
h.driver.elementByName("UIButtonTypeContactAdd", function(err, el) { | |
should.not.exist(err); | |
el.displayed(function(err, val) { | |
should.not.exist(err); | |
val.should.equal(false); | |
done(); | |
}); | |
}); | |
}); | |
}); | |
}); | |
it('should confirm element is visible', function(done) { | |
h.driver.elementsByTagName('tableCell', function(err, els) { | |
els[0].click(function() { | |
h.driver.elementByName("UIButtonTypeRoundedRect", function(err, el) { | |
should.not.exist(err); | |
el.displayed(function(err, val) { | |
should.not.exist(err); | |
val.should.equal(true); | |
done(); | |
}); | |
}); | |
}); | |
}); | |
}); | |
it('should confirm element is selected', function(done) { | |
h.driver.elementByXPath("text[contains(@text, 'Picker')]", function(err, el) { | |
el.click(function() { | |
h.driver.elementByXPath("button[contains(@text, 'UIPicker')]", function(err, el1) { | |
should.not.exist(err); | |
el1.selected(function(err, val) { | |
should.not.exist(err); | |
val.should.equal(true); | |
done(); | |
}); | |
}); | |
}); | |
}); | |
}); | |
it('should confirm element is not selected returns false', function(done) { | |
h.driver.elementByXPath("text[contains(@text, 'Picker')]", function(err, el) { | |
el.click(function() { | |
h.driver.elementByXPath("button[contains(@text, 'Custom')]", function(err, el1) { | |
should.not.exist(err); | |
el1.selected(function(err, val) { | |
should.not.exist(err); | |
val.should.equal(false); | |
done(); | |
}); | |
}); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment