diff --git a/src/App.vue b/src/App.vue index 8eae0d1a6..f381d2576 100644 --- a/src/App.vue +++ b/src/App.vue @@ -61,7 +61,7 @@ function responseError(error) { router.push({ path: '/login' }); } - return Promise.resolve(error); + return Promise.reject(error); } axios.interceptors.response.use((response) => { diff --git a/src/__tests__/App.spec.js b/src/__tests__/App.spec.js index c5be66823..8f87dbfb6 100644 --- a/src/__tests__/App.spec.js +++ b/src/__tests__/App.spec.js @@ -52,8 +52,7 @@ describe('App', () => { } }; - await vm.responseError(response); - + expect(vm.responseError(response)).rejects.toEqual(expect.objectContaining(response)); expect(vm.quasar.notify).toHaveBeenCalledWith(expect.objectContaining( { type: 'negative', @@ -73,8 +72,7 @@ describe('App', () => { } }; - await vm.responseError(response); - + expect(vm.responseError(response)).rejects.toEqual(expect.objectContaining(response)); expect(vm.quasar.notify).toHaveBeenCalledWith(expect.objectContaining( { type: 'negative', diff --git a/src/components/FetchData.vue b/src/components/FetchData.vue new file mode 100644 index 000000000..0110e5576 --- /dev/null +++ b/src/components/FetchData.vue @@ -0,0 +1,60 @@ + + diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue new file mode 100644 index 000000000..d36f8c4ea --- /dev/null +++ b/src/components/FormModel.vue @@ -0,0 +1,118 @@ + + diff --git a/src/components/SmartCard.vue b/src/components/Paginate.vue similarity index 67% rename from src/components/SmartCard.vue rename to src/components/Paginate.vue index b43c920ad..cd47ed331 100644 --- a/src/components/SmartCard.vue +++ b/src/components/Paginate.vue @@ -1,27 +1,39 @@