Update settings specs to check for the webpreferences attribute
This commit is contained in:
@@ -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().
|
||||
|
Reference in New Issue
Block a user