-
Notifications
You must be signed in to change notification settings - Fork 6
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
Phase 2 Store Refactor - Integration Part 1 - Annotation page access, tabs refactor, column-category unlinking #375
Phase 2 Store Refactor - Integration Part 1 - Annotation page access, tabs refactor, column-category unlinking #375
Conversation
Okay @rmanaem, test fixes are up. Ready to review. |
Okay @rmanaem. Seb's PR is merged in and tests are green. |
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.
Thanks for the well written PR description @jarmoza!
I added some in-line comments. Aside from that I was wondering why you decided to change component tests to use beforeEach
.
You're welcome! I thought it would be helpful given the amount of changes across files.
That is an excellent and relevant question. I mentioned this to Seb yesterday. I have noticed that when Cypress begins a new individual test that the functions defined in |
It really is!
Yea, I think we talked about this too but this only affects the unit test, not component tests. |
This is in reference to |
I was referring to component tests in general. I was curious why you decided to use this syntax instead of the old one.
I leave that up to you but other than that this PR is good to go! 👨🏼🍳 |
@rmanaem I think let's save that for another PR. I'll make an issue to look over the tests for consistency in setup. |
In an effort to keep PRs small, this PR closes the first step of restoring the annotation page (access + tabs) now that the second phase of our store refactor is (mostly) complete. As such this PR is not yet testable via our e2e page tests since the annotation page itself is functionally incomplete and its related e2e tests need to also be refactored to adapt to changes we have made. (Closes #348.)
In addition to basic access to the page with its primary components loading, this PR also addresses the following, as noted in #347 :
Here is a file by file explanation of the changes made thus far:
annot-categorical.vue
v-select
value attribute is temporarily disabled as this reflects a getter we missed in our refactor discussions:getSelectedOption
. @surchs also noticed this and there will be a brief discussion about this in Refactor: handle controlled terms as objects #374changeMissingStatus
andselectCategoricalOption
gettersannot-categorical.cy.js
annot-continuous-values
is tested (re: act/assert calls)annot-continuous-values.vue
setHeuristic
mutation brought in line with howannot-categorical
handlesv-select
input by calling the relevant mutation directly. Removed wrapper functioncommitHeuristic
annot-continuous-values.cy.js
changeMissingStatus
mock to take object argument its real store version takesannot-tab.vue
id-field
annotation.vue
annotationDetails
store field but rathercolumnToCategoryMapping
(andcolorInfo
for coloring)annot-tab
child component's props have been greatly reduced here. Keeping commented out version for now for any remaining functionality needed in the next integration PR; specifically for missing values.categorySkipList
field has been added to the page for generality. Really, our current hardcoded behavior is that no tab should be created forSubject ID
and this is passed to the newgetMappedCategories
getterindex.js
below for new criteria created for access to the annotation pageindex.js
getMappedCategories
that looks atcolumnToCategoryMapping
and returns a unique list of categories that have thus far been linked to columns in the input data table. A optional list of categories to skip returning is given as a parameter. The existence of this getter is up for discussion, but its creation seemed to make sense as opposed to placing this store functionality insideannotation.vue
missingValues
list in both thegetMappedColumns
getter andchangeMissingStatus
mutation.isPageAccessible
criterion has been added for moving to the annotation page:notOnlySubjectIDCategorized
. Discussion point here as well is whether or not we want to allow users to move to the annotation page without categorizing a column other than one as 'Subject ID'. This doesn't make sense if we have no other categorizations as with the current implementation no tabs would exist on the annotation page. In the previous implementation, all categories had hardcoded tabs viaannotationDetails
selectCategoricalOption
mutation's parameters to one parameter object to bring it line with the rest of our store mutationsgetUniqueValues
store-getter-getMappedCategories.cy.js
getMappedCategories
for annotation pagestore-getter-isPageAccessible.cy.js
store-mutation-selectCategoricalOption.cy.js
selectCategoricalOption
mutation