From b715637136dae57a54e5f4a4dd69bb914b698cd8 Mon Sep 17 00:00:00 2001 From: Jonas Schwabe Date: Tue, 15 Nov 2016 18:06:23 +0100 Subject: [PATCH] Update settings specs to check for the webpreferences attribute --- test/specs/browser/settings_test.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/specs/browser/settings_test.js b/test/specs/browser/settings_test.js index 1ae061ce..ff1e07a5 100644 --- a/test/specs/browser/settings_test.js +++ b/test/specs/browser/settings_test.js @@ -92,7 +92,9 @@ describe('browser/settings.html', function desc() { describe('Allow mixed content', () => { [true, false].forEach((v) => { it(`should be saved and loaded: ${v}`, () => { + const webPreferences = v ? 'allowDisplayingInsecureContent' : ''; env.addClientCommands(this.app.client); + return this.app.client. loadSettingsPage(). scroll('#inputDisableWebSecurity'). @@ -107,19 +109,19 @@ describe('browser/settings.html', function desc() { const savedConfig = JSON.parse(fs.readFileSync(env.configFilePath, 'utf8')); savedConfig.disablewebsecurity.should.equal(v); }). - getAttribute('.mattermostView', 'disablewebsecurity').then((disablewebsecurity) => { // confirm actual behavior + getAttribute('.mattermostView', 'webpreferences').then((disablewebsecurity) => { // confirm actual behavior // disablewebsecurity is an array of String disablewebsecurity.forEach((d) => { - v.toString().should.equal(d); + d.should.equal(webPreferences); }); }).then(() => { return this.app.restart(); }).then(() => { env.addClientCommands(this.app.client); return this.app.client. // confirm actual behavior - getAttribute('.mattermostView', 'disablewebsecurity').then((disablewebsecurity) => { // disablewebsecurity is an array of String + getAttribute('.mattermostView', 'webpreferences').then((disablewebsecurity) => { // disablewebsecurity is an array of String disablewebsecurity.forEach((d) => { - v.toString().should.equal(d); + d.should.equal(webPreferences); }); }). loadSettingsPage().