Aut-UI-Wx

 view release on metacpan or  search on metacpan

test.pl  view on Meta::CPAN

  #### test ui

  #### test LOGIN

  tt("Testing user interface, logging in (login with 'admin' and 'testpass')");

  print "\n";

  $ticket=$aut->login();

  print "account :",$ticket->account(),"\n";
  print "rights  :",$ticket->rights(),"\n";

  ok();

  #### Change password

  tt("Testing user interface, Changing password");

  $aut->change_pass($ticket);

  if ($ticket->valid()) {
    my $text="This is a text!!";

    my $ciphertext=$ticket->encrypt($text);
    my $dtext=$ticket->decrypt($ciphertext);

    ok();
  }

  #### test ADMIN

  tt("Testing user interface, administrator menu (do whatever you think is appropriate ;-)).");

  $aut->admin($ticket);

  print "account :",$ticket->account(),"\n";
  print "rights  :",$ticket->rights(),"\n";

  ok();

  ### End of testing

  return 0;
}

package main;

my $a= new testApp;
$a->MainLoop();

################################################################
# Post message
################################################################

print <<EOF
You can repeat this test, after adding some accounts with different
authorization levels. Try e.g.:

- Installing with an account without 'admin' rights.
- Logging in with an invalid account (login will prompt you max. 3 times).
- Enter false data while changing the password.
- Change passwords from the admin menu.
- Change rights from the admin menu.
- Delete all accounts.
- Change rights of all accounts until and including the last admin account.

etc.

EOF












( run in 1.382 second using v1.01-cache-2.11-cpan-6aa56a78535 )