I’m facing a blocker situation with unit testing. Below is my commit.
When I try to use the snapshot testing, the snapshot file doesn’t have the expected component values. I have even checked it by passing the mock through my actual code flow and it rendered as I was expecting. Can you spot what I’m doing wrong there? @dkayiwa
Hi,
I was able to solve that problem by making the fakeRequestLibrary.js return value to run synchronously. Removed the Promise(). Now I’m facing a different issue when I run the jest.
While I am trying to solve the problem with Jest Test case, I have modified the report column names in referenceMetaData module. Here is my PR,
I was limited to use a single word for those SQLDataSets. Because in usual SQL syntax, we cannot have space separated name for alias. Please let me know if there is anything that needs to be modified.
I have almost finishing up the things right now. I tried to pass an JS array to rowGetter function and it didn’t work. I looked in the official doc and I didn’t find that it supports for arrays. It says it accepts a function. So, currently I’m having an function and which made the snapshot file to be looks like this:
Meanwhile, I tried the test for chart objects and it has no luck on see the things inside the <canvas>. But for now, I have written the tests at least for those.
I have fixed the UI issues which we found on our last meeting. Now I am trying configure the continuous integration to this project. I have registered on bintray and also in Travis CI.
I have added the travis.yml file by following the cohort-builder-owa. But the build keeps failing.
I have tried to release new version by correcting small changes. TravisCI build is getting passed but the release is not made to bintray. In the build log there is a message as follows:
The command "npm run build:prod" exited with 0.
dpl.0
6.44sSuccessfully installed dpl-1.8.42
1 gem installed
7.29s
dpl.1
Installing deploy dependencies
[Bintray Upload] Reading descriptor file: bintray.json
[Bintray Upload] Creating version '0.9.3'...
[Bintray Upload] Bintray response: 201 Created.
[Bintray Upload] Uploading file 'openmrs-owa-built-in-reports.zip' to openmrs-owa-built-in-reports.zip
[Bintray Upload] Bintray response: 409 Conflict. Unable to upload files: An artifact with the path 'openmrs-owa-built-in-reports.zip' already exists under another version
[Bintray Upload] Publishing version '0.9.3' of package 'openmrs-owa-built-in-reports'...
[Bintray Upload] Bintray response: 200 OK.
Done. Your build exited with 0.
I have even added a property to override the existing files in bintray. But it didn’t work.
You will need to set the version in both package.json and bintray.json. If you don’t like that you could try to produce bintray.json as part of the build with the version set automatically.
Thank you for your infomation. I was able to make it by manually putting the version number into the distribution file. Now it is shown in bintray as well
I was trying to build the zip from https://github.com/JudeNiroshan/openmrs-owa-built-in-reports when I run npm run build:prod, it gives me an error ‘jest’ is not recognized as an internal or external command, operable program or batch file.
npm ERR! code ELIFECYCLE