From c4b0e8cbe0544ffb1f249ae2c6489e6e5c48b8df Mon Sep 17 00:00:00 2001 From: Anish George Date: Fri, 7 Jul 2023 12:53:16 +0530 Subject: [PATCH] Fix build and test issues after introducing micro-frontend setup --- ui/Gruntfile.js | 10 +++++++--- ui/app/clinical/index.html | 13 +++++++------ ui/test/config/karma.conf.js | 10 ++++++++-- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/ui/Gruntfile.js b/ui/Gruntfile.js index 49d271303a..df8fbe64e6 100755 --- a/ui/Gruntfile.js +++ b/ui/Gruntfile.js @@ -20,7 +20,8 @@ module.exports = function (grunt) { 'components/ngDialog/css/ngDialog-theme-plain.min.css', 'components/ng-tags-input/ng-tags-input.bootstrap.min.css', 'components/ng-tags-input/ng-tags-input.min.css', - 'components/jquery-ui/themes/smoothness/jquery-ui.min.css' + 'components/jquery-ui/themes/smoothness/jquery-ui.min.css', + 'common/mfe-build/ipd.min.css' ]; var libraryJSFiles = [ @@ -62,7 +63,10 @@ module.exports = function (grunt) { 'components/angular-route/angular-route.min.js', 'components/crypto-js/crypto-js.js', 'components/jquery-ui/ui/minified/jquery-ui.custom.min.js', - 'components/angular-ivh-treeview/dist/ivh-treeview.min.js' + 'components/angular-ivh-treeview/dist/ivh-treeview.min.js', + + 'common/mfe-build/ipd.min.js', + 'common/mfe-build/mfe_polyfills_angular_1_4.min.js' ]; try { @@ -483,7 +487,7 @@ module.exports = function (grunt) { files: { expand: true, cwd: '<%= yeoman.dist %>', - src: ['**/*.min.*.js'], + src: ['**/*.min.*.js', '!common/mfe-build/**/*.js'], dest: '<%= yeoman.dist %>' } }, diff --git a/ui/app/clinical/index.html b/ui/app/clinical/index.html index f61fb00f04..2dfad4c5d3 100644 --- a/ui/app/clinical/index.html +++ b/ui/app/clinical/index.html @@ -88,6 +88,13 @@

+ + + + + + + @@ -320,12 +327,6 @@

- - - - - - diff --git a/ui/test/config/karma.conf.js b/ui/test/config/karma.conf.js index 503e65bebe..e759464ff1 100644 --- a/ui/test/config/karma.conf.js +++ b/ui/test/config/karma.conf.js @@ -9,8 +9,14 @@ module.exports = function (config) { files: [ {pattern: 'test/data/*.json', watched: true, served: true, included: false}, {pattern: 'app/images/*', included: false, served: true}, + // angular core 'app/components/q/q.js', 'app/components/angular/angular.js', + 'app/common/mfe-build/mfe_polyfills_angular_1_4.min.js', + // react core + 'app/components/react/react.production.min.js', + 'app/components/react-dom/react-dom.production.min.js', + // other stuff 'app/components/ngDialog/js/ngDialog.js', 'app/components/angular-route/angular-route.js', 'app/components/angular-sanitize/angular-sanitize.js', @@ -46,6 +52,7 @@ module.exports = function (config) { 'app/components/angular-translate-storage-cookie/angular-translate-storage-cookie.js', 'app/components/angular-translate-loader-static-files/angular-translate-loader-static-files.js', 'app/components/hustle/hustle.js', + 'app/components/mfe-build/ipd.min.js', 'app/lib/modernizr.custom.80690.js', 'app/lib/angular-workers/dist/angular-workers.js', 'app/common/constants.js', @@ -77,8 +84,7 @@ module.exports = function (config) { 'app/components/moment/src/**/*.js', 'app/components/moment/meteor/**/*.js', 'app/components/jquery/src/**/*.js', - 'app/components/**/test/**/*.js', - + 'app/components/**/test/**/*.js' ], reporters: ['junit', (process.env.CI === 'true' ? 'dots' : 'progress'), 'coverage'], preprocessors: {