TG: Adapt frontend code for tests

Signed-off-by: filipe1309 <filipe1309@outlook.com>