Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Vertical size of text area on TCs when editing text


#1

Thought I’d share this: When I edit TCs, I waste so much time resizing the textareas of some of my fields.

The default size of 8 rows. It’s small to me that I have to enlarge it manually each time I add or edit a TC.

This script enlarges the vertical size of textarea (fields) of steps, expected and notes.

name: Vertical size of text area on TCs
description: Change the vertical size of the text areas editing test cases
author: Adron
version: 1.0
includes: ^cases/(add|edit)
excludes: 

js:
$(document).ready(
     function() {
          $('#custom_steps').attr('rows','24');
          $('#custom_expected').attr('rows','16');
          $('#custom_casenotes').attr('rows','12');
     }
);

I’ve noticed however that split steps don’t have a set name but rather an unique UUID each time they are generated.

Example: <textarea id="stepContent-01000bb6b-39d7-4be5-a1ff-f2bedb3657fe">

How do you enlarge the size of those. Using an asterisk obviously won’t work :wink:

          $('#stepContent*').attr('rows','10');

#2

Hi Adron,

Thanks for your posting. You can actually change the default height/rows for the text and steps fields in the custom field options:

http://docs.gurock.com/testrail-userguide/howto-fields#project_assignments

Just edit the project options of the field and you would see a Rows option.

Cheers,
Tobias


#3

Uh oops… lol that was pretty silly of me.

Thanks for the feedback, Gurock! :slight_smile:


#4

No problem, happy to help :slight_smile:

Cheers,
Tobias