Fixes filter

This commit is contained in:
Filipa Lacerda 2016-10-26 09:17:32 +01:00
parent a2dbdb88be
commit 3c383f9f76
3 changed files with 22 additions and 10 deletions

View file

@ -51,14 +51,6 @@ $(() => {
computed: {
filteredEnvironments () {
return recursiveMap(filterState(this.visibility), this.state.environments);
},
countStopped () {
},
countAvailable () {
// return recursiveMap(filterState('available'), this.state.environments).length;
}
},

View file

@ -1,6 +1,8 @@
//= require vue
//= require vue-resource
//= require lib/utils/url_utility
//= require environments/services/environments_service
//= require environments/stores/environments_store
//= require ./mock_data
//
@ -14,6 +16,6 @@
it('starts with a blank state', () => {
expect(gl.environmentsList.EnvironmentsStore.state.environments.length).toBe(0);
});
});
})();

View file

@ -73,5 +73,23 @@ const environmentsList = [
"name": "root"
}
}
},
{
"id": 18,
"project_id": 11,
"name": "review/test-environment-1",
"created_at": "2016-10-19T14:59:59.303Z",
"updated_at": "2016-10-19T14:59:59.303Z",
"external_url": "http://test-1.com",
"environment_type": "review",
"state": "stopped",
"project": {
"id": 11,
"name": "review-apps",
"namespace": {
"id": 1,
"name": "root"
}
}
}
];
];