Skip to content

Commit

Permalink
Fix build and test issues after introducing micro-frontend setup
Browse files Browse the repository at this point in the history
  • Loading branch information
bassoGeorge authored and tanyaa-tw committed Mar 26, 2024
1 parent 7421acc commit c4b0e8c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
10 changes: 7 additions & 3 deletions ui/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 %>'
}
},
Expand Down
13 changes: 7 additions & 6 deletions ui/app/clinical/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ <h3 class="close" ng-click="closeTeleConsultation()">
<script src="../components/bahmni-form-controls/helpers.js"></script>
<script src="../components/bahmni-form-controls/bundle.js"></script>


<!-- polyfill to add angular feature which will allow easy loading of mfe into angular component -->
<script src="../common/mfe-build/mfe_polyfills_angular_1_4.min.js"></script>

<!-- load the ipd mfe as angular components -->
<script src="../common/mfe-build/ipd.min.js"></script>

<!-- build:js clinical.min.js -->
<script src="../common/constants.js"></script>
<script src="../components/lodash/dist/lodash.min.js"></script>
Expand Down Expand Up @@ -320,12 +327,6 @@ <h3 class="close" ng-click="closeTeleConsultation()">
<script src="../common/uicontrols/concept-dropdown/directives/conceptDropdown.js"></script>
<script src="../common/domain/services/programService.js"></script>

<!-- polyfill to add angular feature which will allow easy loading of mfe into angular component -->
<script src="../common/mfe-build/mfe_polyfills_angular_1_4.min.js"></script>

<!-- load the ipd mfe as angular components -->
<script src="../common/mfe-build/ipd.min.js"></script>



<!--All clinical includes-->
Expand Down
10 changes: 8 additions & 2 deletions ui/test/config/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit c4b0e8c

Please sign in to comment.