[Rt-commit] rt branch, 4.6/search-selection-next, repushed
Blaine Motsinger
blaine at bestpractical.com
Thu Mar 12 11:53:57 EDT 2020
The branch 4.6/search-selection-next was deleted and repushed:
was 3b4a80fbb35a7019a74ff171d0c5809e47589f70
now c1241483459f4c6b0e2ef00cd9ee2e4f5e649129
1: 2aab9ecde = 1: 2aab9ecde Add RT-Extension-DashboardSelectionUI to core
2: 6deca7f57 = 2: 6deca7f57 Upgrade jQuery ui sortable and add disableSelection
3: dd7e3e5e8 = 3: dd7e3e5e8 Update DashboardSelectionUI to elevator-light
4: 5d2fb31b1 = 4: 5d2fb31b1 Switch remove icon to fontawesome
5: f554b70cb = 5: f554b70cb Fix reset to defaults
6: 0cc961e47 = 6: 0cc961e47 Force redirect back to the current page on submit
7: e5ff16c4d = 7: e5ff16c4d Add name to forms for UpdateDashboard
8: 3b4a80fbb ! 8: c12414834 Update tests for MyRT Helper changes
@@ -408,6 +408,104 @@
for my $page (qw/Modify Queries Render Subscription/) {
$m->get("/Dashboards/$page.html?id=$bad_id");
+diff --git a/t/web/dashboards-deleted-saved-search.t b/t/web/dashboards-deleted-saved-search.t
+--- a/t/web/dashboards-deleted-saved-search.t
++++ b/t/web/dashboards-deleted-saved-search.t
+@@
+ use strict;
+ use warnings;
+
+-use RT::Test tests => 20;
++use RT::Test tests => undef;
+ my ( $url, $m ) = RT::Test->started_ok;
+ ok( $m->login, 'logged in' );
+
+@@
+
+ $m->content_lacks( 'value="Update"', 'no update button' );
+
+-$m->submit_form(
+- form_name => 'Dashboard-Searches-body',
+- fields =>
+- { 'Searches-body-Available' => "search-$search_id-RT::User-$user_id" },
+- button => 'add',
++# add foo saved search to the dashboard
++
++my $payload = {
++ "dashboard_id" => $dashboard_id,
++ "panes" => {
++ "body" => [
++ {
++ "description" => "foo",
++ "name" => "RT::User-" . $user_id . "-SavedSearch-" . $search_id,
++ "searchId" => "",
++ "searchType" => "Ticket",
++ "type" => "saved"
++ },
++ ],
++ "sidebar" => [
++ ]
++ }
++};
++
++my $json = JSON::to_json( $payload );
++my $res = $m->post(
++ $url . '/Helpers/UpdateDashboard',
++ [ content => $json ],
+ );
+-
+-$m->content_contains('Dashboard updated', 'added search foo to dashboard bar' );
++is( $res->code, 200, "added search foo to dashboard bar" );
+
+ # delete the created search
+
+@@
+ $m->content_lacks( $search_uri, 'deleted search foo' );
+
+ # here is what we really want to test
++# the old search selection in 4.4 had a slightly different feature set for deleting
++# the saved search from the dashboard if it couldn't be found. we're still testing
++# if the message is displayed that the saved search is missing, but we don't have a
++# button to quickly remove it like in 4.4.
+
+ $m->get_ok( $url . "/Dashboards/Queries.html?id=$dashboard_id" );
+-$m->content_contains('Deleted queries', 'found deleted message' );
+-
+-# Update button shows so we can update the deleted search easily
+-$m->content_contains( 'value="Update"', 'found update button' );
+-
+-$m->submit_form(
+- form_name => 'Dashboard-Searches-body',
+- button => 'update',
++$m->content_contains('Unable to find search Saved Search: foo', 'found deleted message' );
++
++$payload = {
++ "dashboard_id" => $dashboard_id,
++ "panes" => {
++ "body" => [
++ ],
++ "sidebar" => [
++ ]
++ }
++};
++
++$json = JSON::to_json( $payload );
++$res = $m->post(
++ $url . '/Helpers/UpdateDashboard',
++ [ content => $json ],
+ );
++is( $res->code, 200, "added search foo to dashboard" );
++
++$m->content_lacks('Unable to find search Saved Search: foo', 'deleted message is gone' );
+
+-$m->content_lacks('Deleted queries', 'deleted message is gone' );
+-$m->content_lacks( 'value="Update"', 'update button is gone too' );
++done_testing();
+
+-$m->get_warnings; # we'll get a lot of warnings because the deleted search
++__END__
+
+
diff --git a/t/web/dashboards-search-cache.t b/t/web/dashboards-search-cache.t
--- a/t/web/dashboards-search-cache.t
+++ b/t/web/dashboards-search-cache.t
More information about the rt-commit
mailing list