Metadata
- Source
- SJRK-150
- Type
- Bug
- Priority
- Major
- Status
- Closed
- Resolution
- Fixed
- Assignee
- N/A
- Reporter
- Gregor Moss
- Created
2018-06-11T01:53:04.151-0400 - Updated
2018-06-28T19:07:04.650-0400 - Versions
- N/A
- Fixed Versions
- N/A
- Component
-
- Storytelling Tool UI
Description
The tests for sjrk.storyTelling.page.storyEdit currently fail if they are run after the tests for sjrk.storyTelling.page, because the latter sets the language cookie to Spanish and the former expects values in English.
This is symptomatic of the message_readStoryText value containing set values in the given language, instead of being dynamically composed of other messages (like message_authorText). This can be tackled later.
A simple solution for the time being could be something like switching the language click tests on page to run English second instead of first, or calling something to clear the cookie at the end of the sequence.
Comments
-
Gregor Moss commented
2018-06-11T12:24:15.352-0400 Fixed by switching the test order. This is not an ideal solution.
-
Gregor Moss commented
2018-06-27T11:26:51.685-0400 The tests for sjrk.storyTelling.page.storyEdit will fail if either:
- the cookie with language preferences is missing, or
- the cookie is present and the language is not English
Ensure the tests are set up such that they will pass, either by making sure the preference is there and set to English, or by adjusting precisely what is tested.
-
Gregor Moss commented
2018-06-27T12:01:27.829-0400 A related symptom is that if the cookie is not present while using the editor page, the first click of a block-add button will fail in exactly the way described in SJRK-94
Ergo it is likely that there is nothing wrong with the tests at all, and that the code for blockUi's should be made more robust in order to deal with just such a situation. The default initial value should be set somewhere and used instead of falling back to "undefined"
-
Gregor Moss commented
2018-06-28T18:52:27.137-0400 The solution was to update the page.model.uiLanguage to templateManager.model.locale relay to work only conditionally, so that if uiLanguage is falsy (e.g. undefined), then it simply doesn't override the default, which is "en"
-
Gregor Moss commented
2018-06-28T19:07:04.647-0400 The tests have been adjusted to work regardless of the initial language set, and now include checking that the text-to-speech string is changed and renders correctly when switched between English and Spanish and back again. As mentioned in the most recent comment, if there is no cookie present, the site will default to English.