CCTC-team / redcap_cypress

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

111. Codebook #50

Open MintooXavier opened 5 months ago

MintooXavier commented 5 months ago

Brief description: The Codebook is a human-readable, read-only version of the project's Data Dictionary and serves as a quick reference for viewing the attributes of any given field in the project without having to download and interpret the Data Dictionary.

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

Feature link: https://github.com/CCTC-team/redcap_rsvc/blob/redcap_val/Feature%20Tests/D/Codebook_111/D.111.100%20-%20Codebook.feature https://github.com/CCTC-team/redcap_rsvc/blob/redcap_val/Feature%20Tests/D/Codebook_111/D.111.200%20-%20REDUNDANT.feature

Pre review:

Post review:

rukayat-yakub commented 3 months ago

@MintooXavier Please review when you can

MintooXavier commented 3 months ago
  1. There are 5 Gherkin steps which are not correct. Please refer the RSVC feature test or step definition and correct them.
  2. Change the project name to D.111.100 as I mentioned last week (according to new numbering format)
  3. Change the xml file name Project_redcap_val as I mentioned last week.
  4. The script does not match the Word document. Please rewrite it according to the original script, which creates a blank project, adds the fields, and verifies the codebook. Additionally, include a step to verify the codebook before adding fields.
  5. Do not modify the user requirements, especially by deleting steps.

Review completed

rukayat-yakub commented 3 months ago

@MintooXavier - Please review when you can

MintooXavier commented 3 months ago
  1. Modify the scriptname
  2. Rename the xml file name used to create the project
  3. Lots of wrong steps. Please correct it. As mentioned earlier, all the steps are available in Online Designer feature
  4. Steps 28-47 are not valida, as you cannot copy an empty instrument: https://github.com/CCTC-team/redcap_cypress/blob/a55f232757b8ed5466e979698e3d602119b66fa5/manual_scripts/12_codebook.feature#L28

@rukayat-yakub : Review complete.

rukayat-yakub commented 3 months ago

@MintooXavier Please review when you can

MintooXavier commented 3 months ago

Please create a folder (as mentioned previously) for each feature inside manual_scripts and put the scripts in it. The naming convention would be Data_Resolution_Workflow_106 where 106 is the feature number.

rukayat-yakub commented 3 months ago

@MintooXavier - Done

MintooXavier commented 3 months ago
  1. As mentioned before, This field is not created and you cannot have 2 fields with the same name: https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L51
  2. As mentioned before, you have to put what you see. You don't actually see "the data instrument labeled Text Validation". https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L27
  3. Please correct the indentations. Please check RSVC repo
  4. Change fieldname to ptname_v2 https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L63
  5. As mentioned before, The dropdown field selection was not correct and have been commented out but the below steps indicate that it is needed. https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L66
  6. Same as above: https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L83
  7. No Record ID field. https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L72
  8. You already have a textbox field named Name. Probably remove the field ptname. not needed. https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L73 and correct codebook accordingly.
  9. You already have a textbox field named Name. Probably remove the field Text Box. not needed. https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L75
  10. check values of min and max. https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L84
  11. Please add the 4th choice. https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L117
  12. Add the option you are selecting: https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L128
  13. Add the label: https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L128
  14. As mentioned previously, upload the files to repo when you are using one. Probably you could use an existing file for this. There is one in cypress/fixtures/import_files called File_upload.docx. Use that. https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L159
  15. As mentioned before, you have to put what you see. You don't actually see this. https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L184
  16. Check the value of choice: https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L202
  17. Add 4th option https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L203
  18. check variable name. https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L209
  19. It's better to clear and enter Name4567 because when you read it, it doesn't look like you are appending. It may work in ATS script. but when run manually, we wouldn't append. https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L216
  20. As mentioned before, you have to put what you see. You don't actually see this. https://github.com/CCTC-team/redcap_cypress/blob/811324be6342ec25a5ca6826cc92cb3a9157de7a/manual_scripts/Codebook_111/D.111.100_codebook.feature#L222
  21. I have modified the user spec numbering for codebook. You can add another scenario before the rename and delete fields.
  22. Also add a script called D.111.200 and mark it as REDUNDANT and mention where it is tested. Refer to rsvc repo, it has redundant scripts.

After creating the empty project and verifying codebook, we could have uploaded the data dictionary instead of adding the fields one by one. Since you have done it this way, let it be..

@rukayat-yakub : Review Completed. Please run the test manually and verify before submitting the script, as few steps were missed which is easily identifiable when you run the script manually.

rukayat-yakub commented 3 months ago

@MintooXavier Please review when you can

MintooXavier commented 2 months ago
  1. keep it small and simple. Adding fields and verifying Codebook. https://github.com/CCTC-team/redcap_cypress/blob/a0277d7eb385b89d9cb5d83402a952dc1e6378d7/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L6
  2. Change to - Modify and delete fields and verify codebook. https://github.com/CCTC-team/redcap_cypress/blob/a0277d7eb385b89d9cb5d83402a952dc1e6378d7/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L210
  3. This is a link. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L22
  4. Only one button. delete first. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L25
  5. Extra space in field name, please remove it. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L25
  6. The extra space is needed here, check comment above this. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L31
  7. Only one button here, no need last.. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L32
  8. Only one button https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L35
  9. Please delete comment. Doesn't make sense here. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L53
  10. Delete extra space. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L60
  11. Lines 61 and 62 are not required. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L61.
  12. Change to 'I click on the last button labeled', else there are lots of buttons and becomes ambiguous. Similarly change in the other steps below. https://github.com/CCTC-team/redcap_cypress/blob/a0277d7eb385b89d9cb5d83402a952dc1e6378d7/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L64
  13. Use this step definition for label. I enter {string} into the Field Label of the open "{addEditField}" dialog box. instead of the below as you can't press Save here. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L66
  14. Similarly use this for variable name. https://aldefouw.github.io/redcap_cypress/#i-enter-string-into-the-variable-name-of-the-open-addeditfield-dialog-box
  15. No need ':'. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L82
  16. Not needed. It's repeating below step. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L93
  17. Repeating. https://github.com/CCTC-team/redcap_cypress/blob/a0277d7eb385b89d9cb5d83402a952dc1e6378d7/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L110
  18. Repeating step below. Delete this. https://github.com/CCTC-team/redcap_cypress/blob/a0277d7eb385b89d9cb5d83402a952dc1e6378d7/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L136
  19. Please check name: https://github.com/CCTC-team/redcap_cypress/blob/a0277d7eb385b89d9cb5d83402a952dc1e6378d7/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L167
  20. Please take out VERIFY after adding the fields. It's in a lot of places. We are not verifying that in the script. We are verifying codebook. e.g. https://github.com/CCTC-team/redcap_cypress/blob/a0277d7eb385b89d9cb5d83402a952dc1e6378d7/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L148
  21. Check Capitals in Form Status. Similarly for 2nd CRF. https://github.com/CCTC-team/redcap_cypress/blob/a0277d7eb385b89d9cb5d83402a952dc1e6378d7/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L197
  22. variable name is better than Email as Email Logging link is visible. https://github.com/CCTC-team/redcap_cypress/blob/a0277d7eb385b89d9cb5d83402a952dc1e6378d7/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L220
  23. This cannot be used here. Put the Codebbok table view for the first CRF only. https://github.com/CCTC-team/redcap_cypress/blob/a0277d7eb385b89d9cb5d83402a952dc1e6378d7/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L221

@rukayat-yakub : Review completed.

rukayat-yakub commented 2 months ago

@MintooXavier : Review correction completed

MintooXavier commented 2 months ago
  1. I have changed the indentation and colum alignment.
  2. step 2 not done.
  3. step 4 not done.
  4. step 6 not done correctly
  5. No bracket for Complete. Removed opening bracket after dropdown. As mentioned - put what you see. https://github.com/CCTC-team/redcap_cypress/blob/440e9a3f14437014be0b03bb1aef6b39a5ce325d/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L19
  6. Step 12 dont done everywhere. I changed in 8 places.
  7. Step 19 not done correctly.
  8. Deleted extra space. https://github.com/CCTC-team/redcap_cypress/blob/e8b4ffedadda77af9e9599deddcda99cd35280da/manual_scripts/Codebook_111/D.111.100%20-%20Codebook.feature#L214
  9. Modified the codebook view.
  10. Step 22 not done

I have done all the changes.

rukayat-yakub commented 2 months ago

@MintooXavier : Thank you. saw the changes

MintooXavier commented 4 weeks ago

Automated the script