-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added tests for Template versioning #132
Conversation
… for complete versioning of template.
@briri, I ran a manual test of this branch on Apollo sandbox, and I saw some errors that I actually ran across and fixed in a previous branch. There are these types of conditions being used in questionService and sectionService, I updated those instances and I got past some errors, but I am seeing some new ones. I will keep you posted. |
@briri I was able to get the versionedQuestionCondition table to be updated after fixing a couple of bugs:
|
Oh great catch on the MariaDb condition reserved word! Thanks. I will update the data migration and the field in the model to something else. Thanks for doing the research and the additional typos. Progress! |
…e into feature/finish-versioning
… and updated MySQLModel and helpers to use that Date package
Hi @briri , I noticed that I didn't check in some of my changes in my local copy of this branch:
Sorry, for the late notice, I thought I checked those changes in. |
thanks @jupiter007 I have updated them all. I also had to make some additional changes after doing some testing of the functionality and finding some bugs in the Apollo explorer |
Oh ok. Thanks @briri. I think your changes should be good to go, but I will take a quick look. |
@@ -62,7 +62,7 @@ CREATE TABLE `versionedQuestions` ( | |||
INDEX versionedQuestions_section_idx (`versionedSectionId`, `displayOrder`) | |||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3; | |||
|
|||
CREATE TABLE `versionedQuestionCondition` ( | |||
CREATE TABLE `versionedQuestionConditions` ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@briri: I believe that "condition" needs to still be updated to conditionType on line 70.
Thanks Brian. LGTM. |
Description
Fixes #125
generateVersionedTemplate
.Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Include any relevant details for your test configuration.
Ran the tests
Currently stuck with an async/timing issue in the
integrationVersioning.spec.ts
. The test uses local arrays and mockimplemepntations to get the code to store the results of the versioning process in the local arrays instead of a DB. That way we can inspect them to ensure that the foreign key relationships are correct and that changes made to the template, sections, questions and questionConditions are reflected the next time the template is versioned.Checklist: