CCTC-team / redcap_cypress

REDCap Cypress Test Framework
MIT License
0 stars 0 forks source link

107. Action Tags #45

Open MintooXavier opened 5 months ago

MintooXavier commented 5 months ago

Brief description: Action Tags are an excellent way to customize the data entry experience for surveys and forms. e.g. @CALCTEXT, @DEFAULT etc. These are used for validating data.

User spec: https://github.com/CCTC-team/redcap_cypress/blob/redcap_val/user_requirement_specification/non_core/107_action_tags.spec

Feature link: https://github.com/CCTC-team/redcap_rsvc/blob/redcap_val/Feature%20Tests/D/Action%20Tags_107/D.107.100%20-%20Action%20Tags.feature

Pre review:

Post review:

MintooXavier commented 5 months ago

No need for another Field Embedding script. Incorporate Field embedding tests within this script as you have embedded fields in it.

MintooXavier commented 1 month ago

Review of Action tags:

  1. Use test_user1 as test_user is used for old versions. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L61
  2. Check the CDISC project name. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L62
  3. Before this add a step to verify there is no data in 'Next Visit Due'. Similarly do in other action tags.. Verify data before and after data input. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L81
  4. I cannot see this. Best to delete this. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L82
  5. This is relative, it depends on the date being tested. Hence best to not use this. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L103. Probably better to test as follows: 1. visit the CRF, verify 'Years old' field is empty and "This is a CALCTEXT'' is 'Your child'.
    1. Then enter the DOB and verify data in "This is a CALCTEXT'' is 'You'. No need to verify the data in 'Years old'
    2. Enter today's date in DOB and verify data in 'Years old' field is 0 and "This is a CALCTEXT'' is 'Your child'
  6. Save data. Else there is a popup to save data. Do this in all similar locations. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L112
  7. 'W' missing. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L121
  8. No need to press now button. Delete this and below step. Same for Today. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L159
  9. Replace with 'Then I should see the exact time in the field labeled "Now"'. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L161
  10. The server time was different to Now time, so might not be easy to verify. Probably best to take this out from testing and it's also not included in URS. I'll change the CDISC file to remove this field so it's not in the CRF.
  11. Use 'Then I should see today's date in the field labeled "Today"'. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L167
  12. test_user1 not USERNAME. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L182
  13. No need this. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L184
  14. Rewrite this: https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L197
    1. Select Yes for field labeled "Are you able to attend weekend appointments?" and save; and check options for radio field.
    2. Select No for field labeled "Are you able to attend weekend appointments?" and save; and check options for radio field. Check radio options as follows Image

You are right.. There is no field embedding in this.. Probably I'll split this up into 2 scripts and put a new number for field embedding..

Review completed for action tags

MintooXavier commented 1 month ago

Changed CDISC file for Action Tags and pushed to redcap_val branch.. Rename the folder as well to delete field embedding Rewrite this. https://github.com/CCTC-team/redcap_cypress/blob/2543217bc64dd71834d8f2d1c16c93cad97f732f/manual_scripts/Action%20Tags%20and%20Field%20Embedding_107/D.107.100%20-%20Action%20Tags%20and%20Field%20Embedding.feature#L4

LawrenceFayers commented 1 month ago

Comment 4: Nothing changed because it is fine because it is in the field note.

Comment 13: I believe as above but please check as not discussed this one.

Comment 5: I think I have done as you suggested but please check as not 100% certain

Comment 6: I believe I have already done this on the row above but please confirm if you mean something else.

MintooXavier commented 1 month ago

I have reviewed the script and made minor changes.. Test Pass

MintooXavier commented 2 weeks ago
  1. Added 1 new step definition
  2. Modified the gherkin and restructured.
  3. Modified the Project_redcap_val_ActionTags.xml
    • Split the instruments into 2 as it was very big for cypress and the available code does not supprt scrollintoview
    • modified the datatypes of the fields today and now.
    • modified the field names as it was too long.

Script is automated