Add a cookie advanced option on the front page

This commit is contained in:
Gaël Métais
2015-05-04 15:24:00 +02:00
parent b2f6f68d1a
commit bb2f0e6c55
6 changed files with 47 additions and 10 deletions
+10 -2
View File
@@ -97,7 +97,11 @@ describe('api', function() {
url: wwwUrl + '/simple-page.html',
waitForResponse: true,
screenshot: true,
device: 'tablet'
device: 'tablet',
waitForSelector: '*',
cookie: 'foo=bar',
authUser: 'joe',
authPass: 'secret'
},
json: true,
headers: {
@@ -165,8 +169,12 @@ describe('api', function() {
body.should.have.a.property('javascriptExecutionTree').that.is.an('object');
body.javascriptExecutionTree.should.deep.equal({});
// Check if the device is set to tablet
// Check if settings are correctly sent and retrieved
body.params.options.should.have.a.property('device').that.equals('tablet');
body.params.options.should.have.a.property('waitForSelector').that.equals('*');
body.params.options.should.have.a.property('cookie').that.equals('foo=bar');
body.params.options.should.have.a.property('authUser').that.equals('joe');
body.params.options.should.have.a.property('authPass').that.equals('secret');
// Check if the screenshot temporary file was correctly removed
body.params.options.should.not.have.a.property('screenshot');