fix(tests): pause reopen timer, lock edits to assignee, restore Jira operator on reopen
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
- reopen_red_review starts the timer paused (paused_at set) instead of immediately running, since the operator hasn't resumed working yet — blue already did this via blue_work_started_at, red needed the same behavior via the existing pause/resume mechanism. - update_test_red/update_test_blue now lock edits to the actual assigned operator for leads too, not just techs — a lead could previously edit another operator's in-progress test. Mirrored in TeamTabs.tsx. - push_test_event reassigns the Jira ticket to the original operator (not the reopening lead) when a test returns to red_executing or blue_evaluating for rework, instead of leaving it on the lead.
This commit is contained in:
@@ -246,6 +246,15 @@ def test_reopen_red_review_moves_to_red_executing():
|
||||
assert any(ev.name == "red_review_reopened" for ev in e.events)
|
||||
|
||||
|
||||
def test_reopen_red_review_starts_timer_paused():
|
||||
"""The timer must not run until the operator explicitly resumes it —
|
||||
otherwise Tempo worklogs and operation-time metrics count time the
|
||||
lead spent reviewing, not time the operator spent working."""
|
||||
e = _entity("red_review")
|
||||
e.reopen_red_review()
|
||||
assert e.paused_at == e.red_started_at
|
||||
|
||||
|
||||
def test_reopen_red_review_wrong_state():
|
||||
e = _entity("blue_evaluating")
|
||||
with pytest.raises(InvalidStateTransition):
|
||||
|
||||
Reference in New Issue
Block a user