yeatmanlab / roar-dashboard

A dashboard to administer ROAR assessments
https://roar.education
Other
4 stars 4 forks source link

FIX legal doc popping up #766

Closed Emily-ejag closed 1 month ago

Emily-ejag commented 1 month ago

Proposed changes

Please link this PR with the Firekit PR: https://github.com/yeatmanlab/roar-firekit/pull/143

Types of changes

What types of changes does this pull request introduce?

Checklist

Justification of missing checklist items

Further comments

github-actions[bot] commented 1 month ago

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 0.95% 73 / 7645
🔵 Statements 0.9% 74 / 8140
🔵 Functions 0.68% 14 / 2032
🔵 Branches 0.46% 20 / 4277
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/pages/HomeParticipant.vue 0% 0% 0% 0% 108-112, 114, 116-120, 118, 118-119, 122, 124, 126, 128-130, 129, 129, 132-134, 133, 133, 136-137, 143-149, 145, 155-163, 157, 165, 165, 165-166, 166, 172-187, 175-183, 177-181, 189-191, 190, 190, 194-199, 201-209, 203-207, 204-206, 208, 211-213, 215-218, 220, 222-224, 226-264, 227-230, 232-248, 233-234, 236-244, 237-243, 239-243, 241-242, 245-247, 246, 251-259, 252-259, 254-258, 255-257, 260-264, 261-263, 268-280, 274-277, 275-276, 279, 283, 283, 283, 289-303, 292-298, 293-296, 305-311, 307, 313-315, 314, 317-319, 318, 321-324, 322, 322-323, 326-330, 328-329, 334-376, 335-374, 336-360, 339-341, 346, 346-357, 362-371, 364-370, 365-369, 366-368, 367, 373, 375, 378-380, 379, 379, 382-384, 383, 383, 387-396, 388-395, 391, 399-401, 400, 404-406, 405, 405, 409-416, 410-412, 411, 413-415, 418-434, 421-423, 422, 424-425, 425, 428-431, 430, 12, 30-31, 50, 55, 70, 72, 18, 33-34, 43
src/pages/HomeSelector.vue 0% 0% 0% 0% 35-37, 39-40, 42-48, 43-48, 46-47, 50-51, 53, 55-58, 56, 56-57, 60-62, 61, 61, 64-70, 66, 72-78, 74, 80, 80, 82-86, 83, 83-84, 84-85, 88-94, 89-93, 90, 92, 95-97, 100-103, 101-102, 107, 111-114, 113, 116-133, 117-124, 121-123, 126-127, 127, 129-132, 130-131, 137-139, 142-158, 143-145, 147-150, 148-149, 151, 151-157, 153-156, 155, 3, 5
src/store/auth.js 0% 0% 0% 0% 9-240, 10-239, 14-34, 38, 41, 44, 47, 50, 53, 56, 59, 59-60, 60-61, 63, 67-68, 71-78, 72-77, 73-74, 76, 79-86, 80-85, 81-82, 84, 89-91, 90, 94, 97-101, 98-100, 102, 105, 108, 111-119, 112-118, 116-117, 122-127, 123-126, 125, 130-134, 131-133, 132, 137-139, 138, 142-145, 144, 148-151, 150, 154, 157-158, 161-162, 165-169, 167-168, 170-179, 171-178, 173-177, 174, 176, 182, 185-187, 190-213, 191-210, 192-201, 203-206, 208-209, 212, 216-223, 217-219, 218, 221-222, 226, 231, 242-244, 243
Generated in workflow #113
github-actions[bot] commented 1 month ago

Visit the preview URL for this PR (updated for commit 1890740):

https://roar-staging--pr766-fix-tos-popping-out-guic1w3b.web.app

(expires Thu, 05 Sep 2024 00:52:21 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2631e9c58fd0104ecbfddd72a62245ddac467460

cypress[bot] commented 1 month ago

roar-dashboard-e2e    Run #5446

Run Properties:  status check passed Passed #5446  •  git commit 1890740fe6: Tests for PR 766 "FIX legal doc popping up" from commit "1890740fe6446c7c7936dad...
Project roar-dashboard-e2e
Branch Review fix/tos-popping-out
Run status status check passed Passed #5446
Run duration 02m 46s
Commit git commit 1890740fe6: Tests for PR 766 "FIX legal doc popping up" from commit "1890740fe6446c7c7936dad...
Committer emily-ejag
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 32
View all changes introduced in this branch ↗︎
ksmontville commented 1 month ago

Getting this when selecting an administration which uses the ROAR Clinic Consent pdf:

image

Not sure if it's related to this specific PR.

ksmontville commented 1 month ago

It seems that the first time a new user logs in and accepts a consent form for the first time, it does not properly update the consent status on the client side.

It will update properly on the back end, but on the front end the legal status doesn't update. So the user ends up accepting a second consent form, and then the legal status properly updates on the client side. The result is two consent forms both on the front end and the back end.

Then we are no longer prompted for consent, so something is or is not happening on that first legal document acceptance,

I think the solution might be to make sure that the front end ref which stores the legal information is properly being updated whtin the logic, or it may involve re-fetching the legal data from Firestore after accepting the consent.

image

image

Emily-ejag commented 1 month ago

Getting this when selecting an administration which uses the ROAR Clinic Consent pdf:

image

Not sure if it's related to this specific PR.

Yes, the adobesign one will be different. It is listed but not used currently until de adobe sign PR gets merged

Emily-ejag commented 1 month ago

It seems that the first time a new user logs in and accepts a consent form for the first time, it does not properly update the consent status on the client side.

It will update properly on the back end, but on the front end the legal status doesn't update. So the user ends up accepting a second consent form, and then the legal status properly updates on the client side. The result is two consent forms both on the front end and the back end.

Then we are no longer prompted for consent, so something is or is not happening on that first legal document acceptance,

I think the solution might be to make sure that the front end ref which stores the legal information is properly being updated whtin the logic, or it may involve re-fetching the legal data from Firestore after accepting the consent.

Interesting, so is it popping twice?

ksmontville commented 1 month ago

It seems that the first time a new user logs in and accepts a consent form for the first time, it does not properly update the consent status on the client side. It will update properly on the back end, but on the front end the legal status doesn't update. So the user ends up accepting a second consent form, and then the legal status properly updates on the client side. The result is two consent forms both on the front end and the back end. Then we are no longer prompted for consent, so something is or is not happening on that first legal document acceptance, I think the solution might be to make sure that the front end ref which stores the legal information is properly being updated whtin the logic, or it may involve re-fetching the legal data from Firestore after accepting the consent.

Interesting, so is it popping twice?

Yes, the consent is popping up twice.

Log in -> accept consent form -> select a different administration -> accept consent again -> select different administration -> no consent form shows

So it is not properly saving the state of the user's legal information the first time the consent form is accepted. It takes two accepts in order for the client side to update the legal information properly.

Emily-ejag commented 1 month ago

ent admin

Oh probably I need to checkout the updateConsent! probably it is not updating right away. Thanks for checking this @ksmontville !

sentry-io[bot] commented 1 month ago

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎