Merge "Fix data binding for project state"

This commit is contained in:
Becky Siegel
2017-12-08 17:59:13 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 3 deletions

View File

@@ -129,10 +129,10 @@
promises.push(this.$.restAPI.getProjectConfig(this.project).then( promises.push(this.$.restAPI.getProjectConfig(this.project).then(
config => { config => {
this._projectConfig = config; if (!config.state) {
if (!this._projectConfig.state) { config.state = STATES.active.value;
this._projectConfig.state = STATES.active.value;
} }
this._projectConfig = config;
this._loading = false; this._loading = false;
})); }));

View File

@@ -247,6 +247,7 @@ limitations under the License.
test('state gets set correctly', done => { test('state gets set correctly', done => {
element._loadProject().then(() => { element._loadProject().then(() => {
assert.equal(element._projectConfig.state, 'ACTIVE'); assert.equal(element._projectConfig.state, 'ACTIVE');
assert.equal(element.$.stateSelect.bindValue, 'ACTIVE');
done(); done();
}); });
}); });