mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-08 06:22:53 +00:00
test: adapt tests for translatedPropertyNames
This commit is contained in:
@@ -256,8 +256,8 @@ export class MetaTranslationSpec {
|
||||
|
||||
@test
|
||||
public consistencyWithMetaClass() {
|
||||
const dishMetaTranslationsDE = translator.translatedPropertyNames(dish);
|
||||
const dishMetaTranslationsEN = translator.translatedPropertyNames(dish, 'en');
|
||||
const dishMetaTranslationsDE = translator.translatedPropertyNames(dish.type);
|
||||
const dishMetaTranslationsEN = translator.translatedPropertyNames(dish.type, 'en');
|
||||
expect(dishMetaTranslationsEN).to.not.deep.equal(dishMetaTranslationsDE);
|
||||
expect(dishMetaTranslationsDE).to.deep.equal(SCDishMeta.getInstance().fieldTranslations.de);
|
||||
expect(dishMetaTranslationsEN).to.deep.equal(SCDishMeta.getInstance().fieldTranslations.en);
|
||||
@@ -269,7 +269,7 @@ export class MetaTranslationSpec {
|
||||
const typeNonExistant = eval("(x) => x + 'typeNonExistant';");
|
||||
// this will assign a non existant SCThingType to dishCopy
|
||||
dishCopy.type = typeNonExistant();
|
||||
const dishMetaTranslationsDE = translator.translatedPropertyNames(dishCopy);
|
||||
const dishMetaTranslationsDE = translator.translatedPropertyNames(dishCopy.type);
|
||||
expect(dishMetaTranslationsDE).to.be.undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user