Skip to content

Resolve "Pill buttons are not title capitalized any more"

Tasks

  • Reintroduce the text-transform rule to this css file
  • Make sure E2E tests for these buttons are case sensitive.
    • We decided to follow the recommendations from https://github.com/cypress-io/cypress/discussions/22625
    • Create helper function like this one that allows as extra parameter a function of type string => RegExp, regExpFunc = (label: string) => new RegExp('^' + label + '$', 'g').
    • Find all matches in the E2E tests like this one, where text is not given to the tests in title case.
    • Use the helper function instead to make it find exact values providing new RegExp('^ ' + label + ' $', 'g') as RegExp. Note that the black spaces are required due to the spaces provided in the html. See images.
  • Consider a pipe addition into the component, where this transformation is really visible as opposed to the CSS solution, which is a bit brittle.
  • Consider a general review of the JSON files as well.

Due to a separation of concerns the last two points were discarded.

Closes #1358 (closed)

Edited by Carlos Sanchez

Merge request reports

Loading