Skip to content

Commit

Permalink
fix(Tests): resume test after republish
Browse files Browse the repository at this point in the history
  • Loading branch information
domtra committed Oct 11, 2024
1 parent 1cdf6fc commit 87fff2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions includes/models/class-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,6 @@ public static function get_calculated_status( $test ) {
$has_comparison = ! empty( $test->last_comparison_date );
$is_running = (bool) $test->is_running;

if ( $test->current_alert_id ) {
return 'has-alert';
}

if ( false === (bool) $test->status && ( $no_tests_left || $has_remote_test ) ) {
return 'no-credit-left';
}
Expand All @@ -709,6 +705,10 @@ public static function get_calculated_status( $test ) {
return 'post-not-published';
}

if ( $test->current_alert_id ) {
return 'has-alert';
}

if ( ! $has_base_screenshot ) {
return 'waiting';
}
Expand Down
2 changes: 1 addition & 1 deletion includes/services/class-test-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public function create_tests( $post_ids ) {
public function create_remote_test( $post, $test = [] ) {
if ( Service::is_connected() ) {
$existing_test = Test::get_item_by_post_id( $post->ID );
if ( $existing_test ) {
if ( $existing_test && $existing_test->service_test_id ) {
return $existing_test;
}
$service_project_id = get_option( 'vrts_project_id' );
Expand Down

0 comments on commit 87fff2a

Please sign in to comment.