Pass config into plugin loader correctly
Plugin section that includes .js and .html plugins was passed instead of the entire config. That is required to correctly recognize default site theme. Also fixes plugin name handling for site theme served from /static/gerrit-theme.html. Change-Id: I27ecc9f8698cb1ea359971ebeb6b14788fef51fd
This commit is contained in:
@@ -50,7 +50,7 @@ limitations under the License.
|
||||
getConfig() {
|
||||
return Promise.resolve({
|
||||
gerrit: {web_uis: ['GWT', 'POLYGERRIT']},
|
||||
plugin: {js_resource_paths: []},
|
||||
plugin: {},
|
||||
});
|
||||
},
|
||||
getPreferences() { return Promise.resolve({my: []}); },
|
||||
@@ -100,11 +100,9 @@ limitations under the License.
|
||||
});
|
||||
});
|
||||
|
||||
test('passes config to gr-plugin-host', done => {
|
||||
element.$.restAPI.getConfig.lastCall.returnValue.then(config => {
|
||||
const pluginConfig = config.plugin;
|
||||
assert.deepEqual(element.$.plugins.config, pluginConfig);
|
||||
done();
|
||||
test('passes config to gr-plugin-host', () => {
|
||||
return element.$.restAPI.getConfig.lastCall.returnValue.then(config => {
|
||||
assert.deepEqual(element.$.plugins.config, config);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user