mirror of
https://github.com/appium/appium.git
synced 2026-05-03 08:51:18 -05:00
Add handling of boolean caps
This commit is contained in:
@@ -71,6 +71,15 @@ describe('AppiumDriver', () => {
|
||||
await appium.createSession(BASE_CAPS);
|
||||
mockFakeDriver.verify();
|
||||
});
|
||||
it('should call inner driver\'s createSession with desired capabilities with string booleans transformed to booleans', async () => {
|
||||
let sentCaps = _.extend({autoAcceptAlerts: 'false', autoDismissAlerts: 'true'}, BASE_CAPS);
|
||||
let expectedCaps = _.extend({autoAcceptAlerts: false, autoDismissAlerts: true}, BASE_CAPS);
|
||||
mockFakeDriver.expects("createSession")
|
||||
.once().withExactArgs(expectedCaps, undefined, [])
|
||||
.returns([1, expectedCaps]);
|
||||
await appium.createSession(sentCaps);
|
||||
mockFakeDriver.verify();
|
||||
});
|
||||
});
|
||||
describe('deleteSession', () => {
|
||||
let appium
|
||||
|
||||
Reference in New Issue
Block a user