test(adminui): cover divergent-prefix {{equip}} rejection; use EquipToken constant in message
This commit is contained in:
@@ -908,12 +908,10 @@ public sealed class UnsTreeService(IDbContextFactory<OtOpcUaConfigDbContext> dbF
|
||||
var fullNames = configs.Select(TagConfigFullName.Extract);
|
||||
if (EquipmentScriptPaths.DeriveEquipmentBase(fullNames) is null)
|
||||
{
|
||||
// NOTE: literal {{equip}} must survive — in a C# interpolated string `{{`/`}}`
|
||||
// collapse to single braces, so keep the token text in a NON-interpolated segment.
|
||||
return new UnsMutationResult(false,
|
||||
$"Equipment '{equipmentId}' has no single tag base, so the "
|
||||
+ "{{equip}} token can't be resolved. Add at least one driver tag under this "
|
||||
+ "equipment (all sharing one object prefix), or remove {{equip}} from the script.");
|
||||
+ $"{EquipmentScriptPaths.EquipToken} token can't be resolved. Add at least one driver tag under this "
|
||||
+ $"equipment (all sharing one object prefix), or remove {EquipmentScriptPaths.EquipToken} from the script.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user