[Rt-commit] rt branch, 5.0/lifecycle-ui-mappings-fixes, repushed

Craig Kaiser craig at bestpractical.com
Wed Nov 4 13:00:03 EST 2020


The branch 5.0/lifecycle-ui-mappings-fixes was deleted and repushed:
       was da656f2ef88d590d9a3f359346ba6ca278798818
       now fcf4fd87ca9541583675ff68030e8c374014d956

 1: ef08c6395d =  1: ef08c6395d Update instructions for lifecycle mapping page to mention assets
 3: da656f2ef8 !  2: 192ee2e23f Add general tests for the lifecycle Mappings.html page
    @@ -1,6 +1,6 @@
     Author: craig kaiser <craig at bestpractical.com>
     
    -    Add tests for lifecycle UI mappings page
    +    Add general tests for the lifecycle Mappings.html page
     
     diff --git a/t/web/lifecycle_mappings.t b/t/web/lifecycle_mappings.t
     new file mode 100644
    @@ -24,14 +24,6 @@
     +          initial  => ['initial'],
     +          active   => ['active'],
     +          inactive => ['inactive'],
    -+          actions  => [],
    -+          transitions => {
    -+            '' => [
    -+                "initial",
    -+                "active",
    -+                "inactive"
    -+            ],
    -+          }
     +      }
     +};
     +
    @@ -42,7 +34,7 @@
     +ok $ret, "Updated lifecycle successfully";
     +RT::Lifecycle->FillCache();
     +
    -+diag "Test updating mappings";
    ++diag "Test updating mappings from web UI";
     +{
     +    ok( $m->login( 'root', 'password' ), 'logged in' );
     +
    @@ -94,11 +86,11 @@
     +    my $to = {
     +        active     => "open",
     +        inactive   => "resolved",
    -+        initial    => "new"
    ++        initial    => "new",
     +    };
     +
    -+    is_deeply( $default->MoveMap( $foo ), $from, "Move map from default -> foo set correctly" );
    -+    is_deeply( $foo->MoveMap( $default ), $to, "Move map from foo -> default set correctly" );
    ++    is_deeply( $from, $default->MoveMap( $foo ), "Move map from default -> foo set correctly" );
    ++    is_deeply( $to, $foo->MoveMap( $default ), "Move map from foo -> default set correctly" );
     +
     +    $from->{'new'} = 'active';
     +
    @@ -127,7 +119,7 @@
     +    ( $url, $m ) = RT::Test->started_ok;
     +    RT::Lifecycle->FillCache();
     +
    -+    is_deeply( $default->MoveMap( $foo ), $from, "Move map from default -> foo updated correctly" );
    ++    is_deeply( $from, $default->MoveMap( $foo ), "Move map from default -> foo updated correctly" );
     +}
     +
     +diag "Confirm the web UI correctly displays mappings";
    @@ -149,7 +141,7 @@
     +    my $to = {
     +        active     => "open",
     +        inactive   => "resolved",
    -+        initial    => "new"
    ++        initial    => "new",
     +    };
     +
     +    my @inputs = $form->inputs;
    @@ -158,12 +150,13 @@
     +        my ($foo_from, $foo_status, $foo_to) = $input->name =~ /^map-(default)-(.*)--(foo)$/;
     +
     +        if ( $default_from ) {
    -+            is ( $from->{$default_status}, $input->value, "Mapping set correctly for default -> foo for status: $default_status" );
    ++            is ($input->value, $from->{$default_status}, "Mapping set correctly for default -> foo for status: $default_status" );
     +        }
     +        elsif ( $foo_from ) {
    -+            is ( $to->{$foo_status}, $input->value, "Mapping set correctly for foo -> default for status: $foo_to" );
    ++            is ( $input->value, $to->{$foo_status}, "Mapping set correctly for foo -> default for status: $foo_to" );
     +        }
     +    }
     +}
     +
     +done_testing;
    +
--:  ------- >  3: 6654c27b43 Add test for case variant statuses in mappings
 2: db0a5a029e =  4: 8e0e6d18d9 Return lower case statuses from RT::Lifecycle->Valid
--:  ------- >  5: ecfd137760 Move code for parsing mappings form submissions to sub routine
--:  ------- >  6: 9766162b86 Add failing test for RT::Lifecycle::ParseMappingsInput
--:  ------- >  7: 809d968670 Update mapping form submission parsing to handle '-' in lifecycle name
--:  ------- >  8: 2b948ec25e Add test for when lifecycle status has '-' in name
--:  ------- >  9: fde947cc2c Tighten up regex for lifecycle UI mappings parsing
--:  ------- > 10: fcf4fd87ca Update lifecycle mappings test for new regex



More information about the rt-commit mailing list