JBehave
  1. JBehave
  2. JBEHAVE-608

When step have 2 parameters and one of them is in tabular form then it isn't presented as table in story's HTML report

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.5.1
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      For example we have an following Given:

      Given the cat with following parameters in tabular form

      Color Height Weight
      Brown 20cm 7Kg

      where cat is parameter and table is parameter, as a result table data will not being converted to table in HTML report.

      My research shows that issue related to \n replacement in StepCreator.java method:

      private String replaceParameterValue(String stepText, int position, Type[] types, String[] parameters) {
              Type type = types[position];
              String value = parameters[position];
              if (value != null) {
                  if ( isTable(type)){
                      stepText = stepText.replace(value, PARAMETER_TABLE_START + value + PARAMETER_TABLE_END);                
                  } else {
                      stepText = stepText.replace(value, PARAMETER_VALUE_START + value + PARAMETER_VALUE_END)
                                         .replace("\n", PARAMETER_VALUE_NEWLINE);
                  }
              }
              return stepText;
          }
      

        Activity

        There are no entries against this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Oleksandr Telegin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: