# Copyright (c) 2008-2009 bivio Software, Inc. All Rights Reserved. # $Id: crm-tuple.btest,v 1.13 2011/12/21 21:40:15 nagler Exp $ test_setup('PetShop', 'groupware'); home_page(); do_test_backdoor(TestData => '-realm crm_tuple_forum clear_crm_threads'); my($forum) = generate_remote_email('crm_tuple_forum'); my($cust1) = generate_local_email('crm_cust1'); my($tech1) = generate_local_email('crm_tech1'); my($msg) = send_mail($cust1, $forum); my($ticket) = verify_local_mail($tech1, qr{.}, 1) =~ m{#(\d+)\]}i; die('no ticket') unless $ticket; login_as('crm_tech1'); follow_link('crm_tuple_forum', 'Tickets'); follow_link($msg->unsafe_get_header('Subject')); follow_link('answer'); verify_text("Locked Ticket #$ticket"); verify_form({ priority => 'Low', product => '', deadline => '', }); test_deviance('You must supply a value for Priority'); submit_form(Send => { action => 'Open', priority => 'Select Value', text => 'Solution here', }); test_conformance(); submit_form(Send => { action => 'Open', priority => 'High', text => 'Solution here', }); follow_link('tickets'); submit_form({ priority => 'Low', }); verify_text('This list is empty'); submit_form({ priority => 'Priority', }); follow_link_in_table('Ticket', 'Ticket', $ticket); verify_text("Open Ticket #$ticket"); my($product) = random_string(); #TODO: Test that including "text" with Update Only results in error submit_form('Update Fields Only' => { priority => 'Medium', product => $product, }); follow_link('tickets'); submit_form(Refresh => { 'Any Status' => 'Any Status', }); verify_no_text($product); follow_link('Spreadsheet'); verify_text('Priority'); verify_text('Medium');