From 61d41fb687580387976a1b15d6c1dd2d64f5aa54 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 19 Apr 2023 08:54:58 +0200 Subject: [PATCH 1/4] refs #5507 --- front/salix/routes.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/front/salix/routes.js b/front/salix/routes.js index f32c143ef..28e227d15 100644 --- a/front/salix/routes.js +++ b/front/salix/routes.js @@ -1,8 +1,8 @@ import ngModule from './module'; import getMainRoute from 'core/lib/get-main-route'; -config.$inject = ['$stateProvider', '$urlRouterProvider']; -function config($stateProvider, $urlRouterProvider) { +config.$inject = ['$stateProvider', '$urlRouterProvider', 'vnConfig']; +function config($stateProvider, $urlRouterProvider, vnConfig) { $urlRouterProvider .otherwise('/'); @@ -10,6 +10,7 @@ function config($stateProvider, $urlRouterProvider) { .state('layout', { abstract: true, template: '', + resolve: () => vnConfig.initialize() }) .state('outLayout', { abstract: true, From a7363ce2a4e5d0461ea460aa1d7e13d89b8107bd Mon Sep 17 00:00:00 2001 From: alexandre Date: Thu, 25 May 2023 11:23:33 +0200 Subject: [PATCH 2/4] refs #5507 added service --- front/core/services/index.js | 1 - front/salix/components/user-popover/index.js | 2 -- front/salix/index.js | 1 + front/salix/routes.js | 8 +++++--- front/{core => salix}/services/config.js | 0 front/salix/services/index.js | 1 + 6 files changed, 7 insertions(+), 6 deletions(-) rename front/{core => salix}/services/config.js (100%) create mode 100644 front/salix/services/index.js diff --git a/front/core/services/index.js b/front/core/services/index.js index 867a13df0..f61ad125e 100644 --- a/front/core/services/index.js +++ b/front/core/services/index.js @@ -5,7 +5,6 @@ import './auth'; import './token'; import './modules'; import './interceptor'; -import './config'; import './week-days'; import './report'; import './email'; diff --git a/front/salix/components/user-popover/index.js b/front/salix/components/user-popover/index.js index 6cc47db7d..1d88137ff 100644 --- a/front/salix/components/user-popover/index.js +++ b/front/salix/components/user-popover/index.js @@ -20,8 +20,6 @@ class Controller { name: config.languages[code] ? config.languages[code] : code }); } - - vnConfig.initialize(); } set lang(value) { diff --git a/front/salix/index.js b/front/salix/index.js index 2488ef9b6..cac169405 100644 --- a/front/salix/index.js +++ b/front/salix/index.js @@ -3,3 +3,4 @@ import './routes'; import './components'; import './styles'; import 'vn-loopback/server/boot/date'; +import './services'; diff --git a/front/salix/routes.js b/front/salix/routes.js index 28e227d15..4cc72ec95 100644 --- a/front/salix/routes.js +++ b/front/salix/routes.js @@ -1,8 +1,8 @@ import ngModule from './module'; import getMainRoute from 'core/lib/get-main-route'; -config.$inject = ['$stateProvider', '$urlRouterProvider', 'vnConfig']; -function config($stateProvider, $urlRouterProvider, vnConfig) { +config.$inject = ['$stateProvider', '$urlRouterProvider']; +function config($stateProvider, $urlRouterProvider) { $urlRouterProvider .otherwise('/'); @@ -10,7 +10,9 @@ function config($stateProvider, $urlRouterProvider, vnConfig) { .state('layout', { abstract: true, template: '', - resolve: () => vnConfig.initialize() + resolve: { + config: ['vnConfig', vnConfig => vnConfig.initialize()] + } }) .state('outLayout', { abstract: true, diff --git a/front/core/services/config.js b/front/salix/services/config.js similarity index 100% rename from front/core/services/config.js rename to front/salix/services/config.js diff --git a/front/salix/services/index.js b/front/salix/services/index.js new file mode 100644 index 000000000..c791e6492 --- /dev/null +++ b/front/salix/services/index.js @@ -0,0 +1 @@ +import './config'; From be06a65a45dd8050ec4d0edf9d37c3e0d070202b Mon Sep 17 00:00:00 2001 From: alexandre Date: Fri, 26 May 2023 11:53:32 +0200 Subject: [PATCH 3/4] refs #5507 fixed e2e --- .../01-salix/03_smartTable_searchBar_integrations.spec.js | 2 +- e2e/paths/04-item/13_fixedPrice.spec.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e/paths/01-salix/03_smartTable_searchBar_integrations.spec.js b/e2e/paths/01-salix/03_smartTable_searchBar_integrations.spec.js index c4f091d1f..526afa140 100644 --- a/e2e/paths/01-salix/03_smartTable_searchBar_integrations.spec.js +++ b/e2e/paths/01-salix/03_smartTable_searchBar_integrations.spec.js @@ -64,6 +64,6 @@ describe('SmartTable SearchBar integration', () => { await page.reload({ waitUntil: 'networkidle2' }); - await page.waitForTextInField(selectors.itemFixedPrice.firstItemID, '13'); + await page.waitForTextInField(selectors.itemFixedPrice.firstItemID, '3'); }); }); diff --git a/e2e/paths/04-item/13_fixedPrice.spec.js b/e2e/paths/04-item/13_fixedPrice.spec.js index 37c4401b0..f36138e18 100644 --- a/e2e/paths/04-item/13_fixedPrice.spec.js +++ b/e2e/paths/04-item/13_fixedPrice.spec.js @@ -88,7 +88,8 @@ describe('Item fixed prices path', () => { it('should reload the section and check the created price has the expected ID', async() => { await page.goto(`http://localhost:5000/#!/item/fixed-price`); - + await page.autocompleteSearch($.warehouseFilter, 'Warehouse one'); + await page.click($.chip); const result = await page.waitToGetProperty($.fourthItemID, 'value'); expect(result).toContain('13'); From bda1ed41ae5ad9563d2b7c8d434378244c3082d4 Mon Sep 17 00:00:00 2001 From: alexandre Date: Tue, 6 Jun 2023 14:14:31 +0200 Subject: [PATCH 4/4] refs #5507 vnConfig moved to core --- front/{salix => core}/services/config.js | 0 front/core/services/index.js | 1 + front/salix/index.js | 1 - front/salix/services/index.js | 1 - 4 files changed, 1 insertion(+), 2 deletions(-) rename front/{salix => core}/services/config.js (100%) delete mode 100644 front/salix/services/index.js diff --git a/front/salix/services/config.js b/front/core/services/config.js similarity index 100% rename from front/salix/services/config.js rename to front/core/services/config.js diff --git a/front/core/services/index.js b/front/core/services/index.js index f61ad125e..867a13df0 100644 --- a/front/core/services/index.js +++ b/front/core/services/index.js @@ -5,6 +5,7 @@ import './auth'; import './token'; import './modules'; import './interceptor'; +import './config'; import './week-days'; import './report'; import './email'; diff --git a/front/salix/index.js b/front/salix/index.js index cac169405..2488ef9b6 100644 --- a/front/salix/index.js +++ b/front/salix/index.js @@ -3,4 +3,3 @@ import './routes'; import './components'; import './styles'; import 'vn-loopback/server/boot/date'; -import './services'; diff --git a/front/salix/services/index.js b/front/salix/services/index.js deleted file mode 100644 index c791e6492..000000000 --- a/front/salix/services/index.js +++ /dev/null @@ -1 +0,0 @@ -import './config';