Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
36 lines
780 B
JavaScript
Executable file
36 lines
780 B
JavaScript
Executable file
marionette('Capture', function() {
|
|
'use strict';
|
|
|
|
teardown(function() {
|
|
camera.close();
|
|
});
|
|
|
|
var assert = require('assert');
|
|
var client = marionette.client({
|
|
desiredCapabilities: { raisesAccessibilityExceptions: false }
|
|
});
|
|
var camera = new (require('./lib/camera'))(client);
|
|
|
|
setup(function() {
|
|
camera.launch();
|
|
});
|
|
|
|
test('capture a picture', function() {
|
|
camera.tapCapture();
|
|
camera.waitForThumbnail();
|
|
});
|
|
|
|
test('capture a video', function(done) {
|
|
camera.tapModeSwitch();
|
|
camera.waitForPreviewReady();
|
|
camera.tapCapture();
|
|
camera.waitForRecordingTimer();
|
|
// It records a 3 seconds video
|
|
setTimeout(function(){
|
|
camera.tapCapture();
|
|
camera.waitForThumbnail();
|
|
done();
|
|
}, 3000);
|
|
});
|
|
|
|
});
|