A recent PR to make capitalisation consistent throughout the English UI broke a lot of tests, because the strings expected had slightly different capitalisation. I had already considered the benefit of making these tests independent of the text strings to make them more robust to such trivial changes to text.
I see two ways this needs to be done:
- using I18n.t(“path.to.string”) syntax instead of plain text for strings;
- using commands such as ‘I submit the form’ instead of ‘I press “Submit”’.
Other types of change may of course become apparent as the work goes on!
Anyway, I’ve pushed some initial work to my fork so the core devs can have a look at it: here’s the commit.
See what you think. Will this be useful work for the project? If so, is my approach the best, or is there a better way to achieve this text-independence?
I’ve started with the cukes because they’re the ones I’m most familiar with, but this can or course be extended to Rspec and Jasmine tests.
I look forward to hearing your views.
Note: This discussion was imported from Loomio. Click here to view the original discussion.