fix badge updating and xss e2e test for projects list updates

This commit is contained in:
John Mitchell
2018-10-18 15:37:29 -04:00
parent 5e0ecc7f43
commit bb921af146
5 changed files with 30 additions and 26 deletions

View File

@@ -4,7 +4,7 @@ function IndexProjectsController ($scope, strings, dataset) {
vm.count = dataset.data.count;
$scope.$on('updateCount', (e, count) => {
if (count) {
if (typeof count === 'number') {
vm.count = count;
}
});

View File

@@ -27,6 +27,9 @@ function projectsListController (
};
vm.dataset = Dataset.data;
vm.projects = Dataset.data.results;
$scope.$watch('vm.dataset.count', () => {
$scope.$emit('updateCount', vm.dataset.count, 'projects');
});
// build tooltips
_.forEach(vm.projects, buildTooltips);
$rootScope.flashMessage = null;

View File

@@ -21,7 +21,8 @@
</div>
<at-list results="vm.projects">
<at-row ng-repeat="project in vm.projects"
ng-class="{'at-Row--active': (project.id === vm.activeId)}">
ng-class="{'at-Row--active': (project.id === vm.activeId)}"
id="row-{{ project.id }}">
<div class="at-Row-items">
<at-row-item
status="{{ project.statusIcon }}"