JBehave
  1. JBehave
  2. JBEHAVE-656

HTML decoration for parameter empty string puts a span between each char in the line

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5.4
    • Fix Version/s: 3.6
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      1

      Description

      When using a story step that has an empty parameter, when decoration the html output of the story, a span is put between each character, probably since a substring match or regex matches everywhere. This makes the text look kind of odd since the spacing between the char changes. If the parameter is empty, the coloring could just be skipped.

      When user enters "" and clicks link
      Then result "" shown

        Activity

        Hide
        Alexander Lehmann added a comment -

        completely cosmetic issue, this could even be classified less than minor

        Show
        Alexander Lehmann added a comment - completely cosmetic issue, this could even be classified less than minor
        Hide
        Mauro Talevi added a comment -

        Why or when would you want an empty parameter value?

        Show
        Mauro Talevi added a comment - Why or when would you want an empty parameter value?
        Hide
        Alexander Lehmann added a comment -

        I have a scenario that checks if a web form processes each parameter correctly by entering the string, clicking a link and checking if the result is the same string, e.g.

        Scenario: test path encoding

        Given user is on Home page

        !-- dangerous chars

        When user enters "<" and clicks link
        Then result "<" shown

        When user enters ">" and clicks link
        Then result ">" shown

        !-- empty string
        When user enters "" and clicks link
        Then result "" shown

        Show
        Alexander Lehmann added a comment - I have a scenario that checks if a web form processes each parameter correctly by entering the string, clicking a link and checking if the result is the same string, e.g. Scenario: test path encoding Given user is on Home page !-- dangerous chars When user enters "<" and clicks link Then result "<" shown When user enters ">" and clicks link Then result ">" shown !-- empty string When user enters "" and clicks link Then result "" shown
        Hide
        Alexander Lehmann added a comment -

        https://github.com/alexlehm/jbehave-core/commit/44e79daa15ca4e936a13727be410db63ac9129d4

        JBEHAVE-656: HTML decoration for parameter empty string puts a span between each char in the line

        Do not mark empty string as parameter (doesn't make sense since replace will put a marker between every char)

        Show
        Alexander Lehmann added a comment - https://github.com/alexlehm/jbehave-core/commit/44e79daa15ca4e936a13727be410db63ac9129d4 JBEHAVE-656 : HTML decoration for parameter empty string puts a span between each char in the line Do not mark empty string as parameter (doesn't make sense since replace will put a marker between every char)
        Hide
        Mauro Talevi added a comment -

        Pulled commit with thanks.

        Show
        Mauro Talevi added a comment - Pulled commit with thanks.
        Mauro Talevi made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Mauro Talevi [ maurotalevi ]
        Fix Version/s 3.6 [ 17721 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            Alexander Lehmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: