Edgewall TRAC: result list ( Test Execution), adding "Passed (Restriction)" option
Autor: Carlos Jacon | Publicado: 2013-11-26T15:42:00-02:00

Adicionar a opção "Passed (Restriction)" na listagem de resultados;



a. Em "lib/results/resultsByStatus.php", adicionar "restriction":


418: foreach(array('failed','blocked','not_run','restriction') as $verbose_status)


b. Em "cfg/const.inc.php", inserir " 'restriction!'   =&gt; 'r',":



383: $tlCfg-&gt;results['status_code'] = array (
384:   'failed'        =&gt; 'f',
385:   'blocked'       =&gt; 'b',
386:   'passed'        =&gt; 'p',
387:   'restriction'   =&gt; 'r',
388:   'not_run'       =&gt; 'n',
389:   'not_available' =&gt; 'x',
390:   'unknown'       =&gt; 'u',
391:   'all'           =&gt; 'a'
392: );




Inserir " 'restriction' =&gt; 'test_status_restriction',":



408: $tlCfg-&gt;results['status_label'] = array('not_run' =&gt; 'test_status_not_run',
409:                     'passed' =&gt; 'test_status_passed',
410:                     'failed' =&gt; 'test_status_failed',
411:                     'blocked'=&gt; 'test_status_blocked',
412:                     'restriction' =&gt; 'test_status_restriction',
413:                       'all' =&gt; 'test_status_all_status',
414:                       'not_available' =&gt; 'test_status_not_available',
415:                     'unknown' =&gt; 'test_status_unknown');




Inserir " 'restriction' =&gt; 'test_status_restriction',":



434: $tlCfg-&gt;results['status_label_for_exec_ui'] = array('not_run' =&gt; 'test_status_not_run',
435:                           'passed'  =&gt; 'test_status_passed',
436:                           'restriction' =&gt; 'test_status_restriction',
437:                           'failed'  =&gt; 'test_status_failed',
438:                           'blocked' =&gt; 'test_status_blocked');




Inserir " 'restriction' =&gt; 'FFCC00' ":



450: $tlCfg-&gt;results['charts']['status_colour'] = array('not_run' =&gt; '000000','passed'  =&gt; '006400',
451:                            'failed'  =&gt; 'B22222','restriction' =&gt; 'FFCC00','blocked' =&gt; '00008B');




c. Em "gui/themes/default/css/testlink.css", inserir o seguinte estilo CSS:




577: div.passed, div.failed, div.blocked, div.not_run, div.restriction {




Inserir o seguinte na linha 588:



588: div.restriction {
589:       background:             #FFCC00; /* yellow */
590: }



Inserir "span.light_restriction":



606: span.light_passed, span.light_failed, span.light_blocked,
607: span.light_not_run, span.light_not_available, span.light_unknown,
608: span.light_restriction




Inserir:



631: span.light_restriction {
631:         background:             #FFCC00;
631: }




Inserir:



664: .restriction {
665:         color:                  white;
666:         background:             #FFCC00;
667: }




Inserir:




687: .restriction_text {
688:         color:    #FFCC00;
689:         font-weight: bold;
690: }




d. Inserir tradução nos idiomas desejados
Português do Brasil - "locale/pt_BR/strings.txt", "$TLS_test_status_restriction = "Passou com ressalva";":



231: $TLS_test_status_restriction = "Passou com ressalva";




Inglês Americano - "locale/en_US/strings.txt", "$TLS_test_status_restriction = "Passed (restriction)";":



231: $TLS_test_status_restriction = "Passed (restriction)";