[Rt-commit] rt branch, 4.6/core-customrole-visibility, updated. rt-4.4.4-570-g6e48a3cdc4

Blaine Motsinger blaine at bestpractical.com
Fri Dec 27 20:52:38 EST 2019


The branch, 4.6/core-customrole-visibility has been updated
       via  6e48a3cdc4b2007ab386d0400eb49945bb582982 (commit)
      from  e34020ca27e46930cbb05a2b25866af42185763a (commit)

Summary of changes:
 t/web/customrole_visibility.t | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 t/web/customrole_visibility.t

- Log -----------------------------------------------------------------
commit 6e48a3cdc4b2007ab386d0400eb49945bb582982
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Fri Dec 27 19:52:06 2019 -0600

    Add test for setting customrole visibility

diff --git a/t/web/customrole_visibility.t b/t/web/customrole_visibility.t
new file mode 100644
index 0000000000..215796e2e9
--- /dev/null
+++ b/t/web/customrole_visibility.t
@@ -0,0 +1,42 @@
+use strict;
+use warnings;
+
+use RT::Test tests => undef;
+
+my ( $baseurl, $m ) = RT::Test->started_ok;
+ok $m->login, 'logged in as root';
+
+my $customrole_name = 'test customrole';
+
+diag( 'Custom role creation and visibility' );
+
+# create custom role
+$m->follow_link( id => 'admin-custom-roles-create' );
+$m->submit_form(
+    form_name => 'ModifyCustomRole',
+    fields => {
+        Name => $customrole_name,
+    },
+);
+$m->content_contains( 'Custom role created', 'Created customrole' );
+
+my $customrole_id = $m->form_name( 'ModifyCustomRole' )->value( 'id' );
+
+# set applies to
+$m->follow_link_ok({ id => 'page-applies-to' }, "Followed link to 'Applies to'" );
+$m->form_name( 'AddRemoveCustomRole' );
+$m->current_form->find_input( 'AddRole-1', 'checkbox' )->check;
+$m->click_ok( 'Update', "Added '$customrole_name' to General queue" );
+$m->content_contains( "$customrole_name added to queue General" );
+
+# set visibility
+$m->follow_link_ok({ id => 'page-visibility' }, "Followed link to 'Visibility'" );
+
+# TODO:
+# set each visiblity and test if visible on each page
+# Ticket create
+# Ticket display
+# Ticket modify people
+# Ticket jumbo
+
+done_testing();

-----------------------------------------------------------------------


More information about the rt-commit mailing list