Merge "Fix data binding for project state"
This commit is contained in:
@@ -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;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user