From 300dfc5772d4ca856bdf5d05df0a9dd95f92cb03 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Mon, 30 Sep 2019 11:47:39 +0200 Subject: [PATCH] =?UTF-8?q?#1726=20client.index=20a=C3=B1adir=20icono=20de?= =?UTF-8?q?=20Listado=20tickets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/client/front/index/index.html | 5 ++++ modules/client/front/index/index.js | 13 +++++++++-- modules/client/front/index/index.spec.js | 29 ++++++++++++++++++++++++ modules/client/front/index/locale/es.yml | 3 ++- 4 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 modules/client/front/index/index.spec.js diff --git a/modules/client/front/index/index.html b/modules/client/front/index/index.html index d4bbcd198..8321f99d1 100644 --- a/modules/client/front/index/index.html +++ b/modules/client/front/index/index.html @@ -40,6 +40,11 @@ + + { + let $scope; + let controller; + + beforeEach(angular.mock.module('client', $translateProvider => { + $translateProvider.translations('en', {}); + })); + + beforeEach(angular.mock.inject(($componentController, $rootScope, $state) => { + $scope = $rootScope.$new(); + controller = $componentController('vnClientIndex', {$scope, $state}); + })); + + describe('x()', () => { + it('should request to patch the propagation of tax status', () => { + const client = {id: 101}; + const event = {preventDefault: () => {}}; + spyOn(event, 'preventDefault'); + spyOn(controller.$state, 'go'); + + controller.filterTickets(client, event); + + expect(event.preventDefault).toHaveBeenCalledWith(); + expect(controller.$state.go).toHaveBeenCalledWith('ticket.index', jasmine.any(Object)); + }); + }); +}); diff --git a/modules/client/front/index/locale/es.yml b/modules/client/front/index/locale/es.yml index 35c21976c..bfbbbddd0 100644 --- a/modules/client/front/index/locale/es.yml +++ b/modules/client/front/index/locale/es.yml @@ -2,4 +2,5 @@ Client id: Id cliente Phone: Teléfono Town/City: Ciudad Email: E-mail -View client: Ver cliente \ No newline at end of file +View client: Ver cliente +Client tickets: Listado de tickets del cliente \ No newline at end of file