-
Notifications
You must be signed in to change notification settings - Fork 8
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
Check and apply max deduction for handgrading annotations #512
Conversation
); | ||
ag_cli.AppliedAnnotation.notify_applied_annotation_created(applied_annotation); | ||
} | ||
wrapper.vm.$forceUpdate(); |
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.
I tend to avoid $forceUpdate
to make sure that the page is re-rendered appropriately. Does it work with expect(await wait_until(wrapper, w => !w.vm.saving)).toBe(true);
instead?
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.
I will test with that. Is there a reason that $forceUpdate
is used here?
test('Handgraders allowed to leave custom comments', async () => {
wrapper.vm.d_handgrading_result!.handgrading_rubric.handgraders_can_leave_comments = true;
data_ut.set_global_user_roles(data_ut.make_user_roles({is_handgrader: true}));
wrapper.vm.$forceUpdate();
await wrapper.vm.$nextTick();
expect(wrapper.find('#new-comment').exists()).toBe(true);
expect(wrapper.findAll('.comment').at(0).find('.delete').exists()).toBe(true);
expect(wrapper.findAll('.comment').at(3).find('.delete').exists()).toBe(true);
// Can always delete applied annotations
expect(wrapper.findAll('.comment').at(1).find('.delete').exists()).toBe(true);
expect(wrapper.findAll('.comment').at(2).find('.delete').exists()).toBe(true);
});
Replaced forceUpdate with expect(await wait_until(wrapper, w => !w.vm.saving)).toBe(true); previously written test case Handgraders allowed to leave custom comments
@james-perretta We also changed a previously written test case |
The merge-base changed after approval.
@broad-well Did github do that automatically (dismissing the stale review)? For some reason the "merge automatically" check isn't going through on my end, and it still says review required after I approved the PR. I'll check back later to see if it resolves itself, otherwise I'll have you try re-opening the PR. |
The merge-base changed after approval.
Yes, GitHub automatically dismissed your review. It does this because (1) I branched off to create We can either duplicate this pull request or have you temporarily turn off "Dismiss stale pull request approvals when new commits are pushed". |
Got it, go ahead and make a fresh PR please
…On Wednesday, April 24, 2024, Michael P. ***@***.***> wrote:
@broad-well <https://github.com/broad-well> Did github do that
automatically (dismissing the stale review)? For some reason the "merge
automatically" check isn't going through on my end, and it still says
review required after I approved the PR. I'll check back later to see if it
resolves itself, otherwise I'll have you try re-opening the PR.
Yes, GitHub automatically dismissed your review. It does this because (1)
I branched off to create handgrading from develop in my fork, (2) I
started a PR from my handgrading branch to the origin's develop branch,
and (3) a PR from my develop branch to the origin's develop branch got
merged. Other users have had the same issue
<community/community#58535 (comment)>
.
We can either duplicate this pull request or have you temporarily turn off
"Dismiss stale pull request approvals when new commits are pushed".
—
Reply to this email directly, view it on GitHub
<#512 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7IXMH3WBLN6LEFSNNNL3LY667HRAVCNFSM6AAAAABGQTW7K6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZVGA4TSMZRGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@james-perretta We have submitted another PR here . We wold appreciate it if you may take a look. Thank you so much! |
This PR fixes #502. When an annotation is applied or deleted in the Handgrading interface, we compute the effective change to the score based on its max deduction and total number of applications so far.
Tests are included for both applying and deleting annotations across the max deduction boundary. Additional tests are included for cases where the max deduction of an annotation is not a multiple of its unit deduction, such as ("-3/-7 max"). This PR's implementation changes makes those tests pass.
Screenshots
After