Repair Broken Test Suite - Full Passing Tests

* Repair broken e2e test introduced in 8d03cfc (copywriting change was not
  reflected in the spec)

* Updated i18n.coffee code to be more cautious (it expected the 'en' locale
  would always be available, but provides appropriate error handling as-is).

* Extended timeout duration for protractor, as registration was slightly above
  30s.

* Added karma-mocha-reporter as a dev dependency to ensure test visibility.
This commit is contained in:
Kevin Gisi
2015-03-17 18:37:03 -04:00
parent 10ce0a622b
commit f41933b7a1
7 changed files with 39 additions and 13 deletions

View File

@@ -4872,7 +4872,11 @@ module.exports = {
if ((locale == null) || (!module.exports.strings && !module.exports.translations[locale])) {
locale = 'en';
}
string = !module.exports.strings ? module.exports.translations[locale][stringName] : module.exports.strings[stringName];
if (module.exports.strings) {
string = module.exports.strings[stringName];
} else {
string = module.exports.translations[locale] && module.exports.translations[locale][stringName];
}
clonedVars = _.clone(vars) || {};
clonedVars.locale = locale;
if (string) {
@@ -4883,7 +4887,11 @@ module.exports = {
return 'Error processing string. Please report to http://github.com/HabitRPG/habitrpg.';
}
} else {
stringNotFound = !module.exports.strings ? module.exports.translations[locale].stringNotFound : module.exports.strings.stringNotFound;
if (module.exports.strings) {
stringNotFound = module.exports.strings.stringNotFound;
} else if (module.exports.translations[locale]) {
stringNotFound = module.exports.translations[locale] && module.exports.translations[locale].stringNotFound;
}
try {
return _.template(stringNotFound, {
string: stringName