+ Failed to load the URL
+
+ { 'URL: ' }
+ { this.props.errorInfo.validatedURL }
+
+
+ { 'Error code: ' }
+ { this.props.errorInfo.errorCode }
+
+
+ { this.props.errorInfo.errorDescription }
+
+ Please check below. Then, reload this window. (Ctrl+R or Command+R)
+
+ Is your computer online?
+ Is the server alive?
+ Is the URL correct?
+
+
+ );
}
});
diff --git a/test/browser_test.js b/test/browser_test.js
index a30ae701..33bb44fb 100644
--- a/test/browser_test.js
+++ b/test/browser_test.js
@@ -166,6 +166,21 @@ describe('electron-mattermost', function() {
})
.end();
});
+
+ it('should show error when using incorrect URL', function() {
+ this.timeout(30000)
+ fs.writeFileSync(config_file_path, JSON.stringify({
+ version: 1,
+ teams: [{
+ name: 'error_1',
+ url: 'http://false'
+ }]
+ }));
+ return client
+ .init()
+ .waitForVisible('#mattermostView0-fail', 20000)
+ .end();
+ });
});
describe('settings.html', function() {