mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 03:35:10 +08:00
CB-12982: (Android, iOS) Appium tests: try to create a session harder
This commit is contained in:
parent
77539558e6
commit
f667ba6179
@ -369,12 +369,20 @@ describe('Camera tests Android.', function () {
|
|||||||
}, MINUTE);
|
}, MINUTE);
|
||||||
|
|
||||||
it('camera.ui.util configuring driver and starting a session', function (done) {
|
it('camera.ui.util configuring driver and starting a session', function (done) {
|
||||||
|
// retry up to 3 times
|
||||||
getDriver()
|
getDriver()
|
||||||
|
.fail(function () {
|
||||||
|
return getDriver()
|
||||||
|
.fail(function () {
|
||||||
|
return getDriver()
|
||||||
|
.fail(fail);
|
||||||
|
});
|
||||||
|
})
|
||||||
.then(function () {
|
.then(function () {
|
||||||
appiumSessionStarted = true;
|
appiumSessionStarted = true;
|
||||||
}, fail)
|
})
|
||||||
.done(done);
|
.done(done);
|
||||||
}, 10 * MINUTE);
|
}, 30 * MINUTE);
|
||||||
|
|
||||||
it('camera.ui.util determine screen dimensions', function (done) {
|
it('camera.ui.util determine screen dimensions', function (done) {
|
||||||
checkSession(done, /*skipResolutionCheck?*/ true); // skip the resolution check here since we are about to find out in this spec!
|
checkSession(done, /*skipResolutionCheck?*/ true); // skip the resolution check here since we are about to find out in this spec!
|
||||||
@ -732,3 +740,4 @@ describe('Camera tests Android.', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -273,10 +273,18 @@ describe('Camera tests iOS.', function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
it('camera.ui.util configure driver and start a session', function (done) {
|
it('camera.ui.util configure driver and start a session', function (done) {
|
||||||
|
// retry up to 3 times
|
||||||
getDriver()
|
getDriver()
|
||||||
|
.fail(function () {
|
||||||
|
return getDriver()
|
||||||
|
.fail(function () {
|
||||||
|
return getDriver()
|
||||||
|
.fail(fail);
|
||||||
|
});
|
||||||
|
})
|
||||||
.fail(fail)
|
.fail(fail)
|
||||||
.done(done);
|
.done(done);
|
||||||
}, 15 * MINUTE);
|
}, 30 * MINUTE);
|
||||||
|
|
||||||
describe('Specs.', function () {
|
describe('Specs.', function () {
|
||||||
afterEach(function (done) {
|
afterEach(function (done) {
|
||||||
@ -291,13 +299,20 @@ describe('Camera tests iOS.', function () {
|
|||||||
return driver
|
return driver
|
||||||
.quit()
|
.quit()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return getDriver();
|
return getDriver()
|
||||||
|
.fail(function () {
|
||||||
|
return getDriver()
|
||||||
|
.fail(function () {
|
||||||
|
return getDriver()
|
||||||
|
.fail(fail);
|
||||||
|
});
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.done(done);
|
.done(done);
|
||||||
} else {
|
} else {
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
}, 15 * MINUTE);
|
}, 30 * MINUTE);
|
||||||
|
|
||||||
// getPicture() with mediaType: VIDEO, sourceType: PHOTOLIBRARY
|
// getPicture() with mediaType: VIDEO, sourceType: PHOTOLIBRARY
|
||||||
it('camera.ui.spec.1 Selecting only videos', function (done) {
|
it('camera.ui.spec.1 Selecting only videos', function (done) {
|
||||||
|
Loading…
Reference in New Issue
Block a user