Skip to content
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

Fix action forbidden error #9923

Merged
merged 7 commits into from
Mar 13, 2019
Merged

Conversation

tomas-nava
Copy link
Contributor

Resolves #9613

Description

Only attempt to change a task's status to in_progress if the user is colocated, because they're the only users who see bold links in the queue for cases they haven't visited yet. This is a temporary fix to silence errors until we tackle #9916

@ghost ghost assigned tomas-nava Mar 12, 2019
@ghost ghost added the In-Progress label Mar 12, 2019
visit "/queue"
vet_name = assigned_task.appeal.veteran_full_name
expect(page).to have_content("#{vet_name.split(' ').first} #{vet_name.split(' ').last}")
# how to tell if the link is bold?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like capybara has a style() method that we might be able to use.

Alternatively, we could just check that the status changed (and doesn't for attorneys viewing ColocatedTasks) and assume that we will be using that information to bold/unbold the link or check to see if the function the endpoint calls is called (expect_any_instance_of(TasksController).to receive(:update).exactly(1).times or something like that).

Copy link
Contributor

@lowellrex lowellrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tomas-nava tomas-nava changed the title [WIP] Fix action forbidden error Fix action forbidden error Mar 13, 2019
@tomas-nava tomas-nava added the Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master label Mar 13, 2019
@ghost ghost assigned va-bot Mar 13, 2019
@va-bot va-bot merged commit 52952af into master Mar 13, 2019
@va-bot va-bot deleted the queue/tomas/9613-fix-action-forbidden-error branch March 13, 2019 21:30
@ghost ghost removed the In-Progress label Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stop throwing a Caseflow::Error::ActionForbiddenError when attorneys visit ColocatedTask pages
3 participants