From 7b8b469da30c35fb315adef80506d237b4760509 Mon Sep 17 00:00:00 2001 From: tuomaspelkonen Date: Tue, 27 Sep 2011 10:34:01 -0700 Subject: [PATCH] Changed the postponed unit tests warning message Summary: Postponed unit tests are not unit tests with problems. The results just haven't arrived yet. Test Plan: Tested accepting a diff with unit status 1, 3, 5 (ok, errors, postponed) Reviewers: jungejason, epriestley Reviewed By: epriestley CC: aran, epriestley, tuomaspelkonen Differential Revision: 969 --- .../view/addcomment/DifferentialAddCommentView.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/applications/differential/view/addcomment/DifferentialAddCommentView.php b/src/applications/differential/view/addcomment/DifferentialAddCommentView.php index aab7af07a2..036095c13e 100644 --- a/src/applications/differential/view/addcomment/DifferentialAddCommentView.php +++ b/src/applications/differential/view/addcomment/DifferentialAddCommentView.php @@ -158,9 +158,16 @@ final class DifferentialAddCommentView extends AphrontView { DifferentialUnitStatus::UNIT_SKIP => 'Unit Tests Skipped', DifferentialUnitStatus::UNIT_POSTPONED => 'Unit Tests Postponed' ); - $content = - "

This diff has Unit Test Problems. Make sure you are OK with them ". - "before you accept this diff.

"; + if ($diff->getUnitStatus() == DifferentialUnitStatus::UNIT_POSTPONED) { + $content = + "

This diff has postponed unit tests. The results should be ". + "coming in soon. You should probably wait for them before accepting ". + "this diff.

"; + } else { + $content = + "

This diff has Unit Test Problems. Make sure you are OK with ". + "them before you accept this diff.

"; + } $unit_warning = $this->generateWarningView( $diff->getUnitStatus(), $titles,