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

[Debt] Refactors tests to remove Pool Operator, Request Responder, and Community Manager roles #12530

Merged
merged 76 commits into from
Jan 23, 2025

Conversation

mnigh
Copy link
Contributor

@mnigh mnigh commented Jan 17, 2025

🤖 Resolves #12300.

👋 Introduction

This PR refactors tests to remove Pool Operator, Request Responder, and Community Manager roles.

🧪 Testing

  1. Verify no instances of Pool Operator, Request Responder, and Community Manager roles in PHPUnit tests and playwright tests
  2. Verify refactored tests still make sense

api/tests/Feature/PoolTest.php Outdated Show resolved Hide resolved
@@ -1016,6 +989,7 @@ public function testUpdatePoolCandidateClaimVerificationValidation(): void
*/
public function testManualStatusUpdatesTimestamps($status, $timestamp)
{
$this->markTestSkipped('Only a pool operator can update applicationStatus.');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I marked this test as skipped because pool operator is being removed. Should the test be removed altogether?

Copy link
Contributor

@brindasasi brindasasi Jan 23, 2025

Choose a reason for hiding this comment

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

currently ProcessOperators are updating candidate status upto Qualified or Disqualified.
But they can't place the candidates.
Is it possible to update the test to verify that? If this has been handled already leave it. If not, I would suggest verifying

  • verify ProcessOperator can update status manually to ScreenedIn
  • verify ProcessOperator can't update status manually to any of the placed statuses

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

So @brindasasi is correct that ProcessOperators can now use the manual update, for certain statuses. So can Community Admins and Community Recruiters. This is new functionality, since #12494.

I don't think we need a second test for placing. #12494 already added a test, PoolCandidateUpdateTest.testManualStatusUpdatePolicy, to ensure Qualifying and Screening are treated differently. The test here is meant to test the timestamp update, not test permissions.

Copy link
Contributor

@brindasasi brindasasi Jan 23, 2025

Choose a reason for hiding this comment

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

@mnigh if we have the policy test already we don't need that testManualStatusPlacedUpdatesTimestamps test. Could you remove that ? With that it is good to be merged in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@brindasasi an update:

@tristan-orourke had another look and requested to: replace processOperatorUser with communityRecruiterUser; Re-add Placed statuses.

db2f02c

@mnigh mnigh marked this pull request as ready for review January 20, 2025 17:56
Copy link
Member

@esizer esizer left a comment

Choose a reason for hiding this comment

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

I took a look and it seems fine. I think @tristan-orourke (or someone else who is confident) should take a look at the comments you made about skipped tests before any approval.

@mnigh mnigh mentioned this pull request Jan 23, 2025
2 tasks
Copy link
Contributor

@brindasasi brindasasi left a comment

Choose a reason for hiding this comment

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

LGTM!

@mnigh mnigh added this pull request to the merge queue Jan 23, 2025
Merged via the queue into main with commit d545e49 Jan 23, 2025
16 checks passed
@mnigh mnigh deleted the 12300-tests-refactor-legacy-roles branch January 23, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

♻️ Refactor Pool Operator, Request Responder, or Community Manager tests
4 participants