diff --git a/client/src/__tests__/components/GiftTemplate/TextType.test.ts b/client/src/__tests__/components/GiftTemplate/TextType.test.ts
index 40d229d..980db3c 100644
--- a/client/src/__tests__/components/GiftTemplate/TextType.test.ts
+++ b/client/src/__tests__/components/GiftTemplate/TextType.test.ts
@@ -1,4 +1,4 @@
-import { FormatTextTemplate } from "src/components/GiftTemplate/templates/TextTypeTemplate";
+import { FormattedTextTemplate } from "src/components/GiftTemplate/templates/TextTypeTemplate";
import { TextFormat } from "gift-pegjs";
describe('TextType', () => {
@@ -8,7 +8,7 @@ describe('TextType', () => {
format: 'moodle'
};
const expectedOutput = 'Hello, world! 5 > 3, right?';
- expect(FormatTextTemplate(input)).toBe(expectedOutput);
+ expect(FormattedTextTemplate(input)).toBe(expectedOutput);
});
it('should format text with newlines correctly', () => {
@@ -17,7 +17,7 @@ describe('TextType', () => {
format: 'plain'
};
const expectedOutput = 'Hello,
world!
5 > 3, right?';
- expect(FormatTextTemplate(input)).toBe(expectedOutput);
+ expect(FormattedTextTemplate(input)).toBe(expectedOutput);
});
it('should format text with LaTeX correctly', () => {
@@ -31,7 +31,7 @@ describe('TextType', () => {
// by running the test and copying the "Received string:" in jest output
// when it fails (assuming the output is correct)
const expectedOutput = '';
- expect(FormatTextTemplate(input)).toContain(expectedOutput);
+ expect(FormattedTextTemplate(input)).toContain(expectedOutput);
});
it('should format text with two equations (inline and separate) correctly', () => {
@@ -41,7 +41,7 @@ describe('TextType', () => {
};
// hint: katex-display is the class that indicates a separate equation
const expectedOutput = ' ? ';
- expect(FormatTextTemplate(input)).toContain(expectedOutput);
+ expect(FormattedTextTemplate(input)).toContain(expectedOutput);
});
it('should format text with a katex matrix correctly', () => {
@@ -51,7 +51,7 @@ describe('TextType', () => {
format: 'plain'
};
const expectedOutput = 'Donnez le déterminant de la matrice suivante.\\begin{pmatrix}
a&b \\\\
c&d
\\end{pmatrix}';
- expect(FormatTextTemplate(input)).toContain(expectedOutput);
+ expect(FormattedTextTemplate(input)).toContain(expectedOutput);
});
it('should format text with Markdown correctly', () => {
@@ -61,7 +61,7 @@ describe('TextType', () => {
};
// TODO: investigate why the output has an extra newline
const expectedOutput = 'Bold\n';
- expect(FormatTextTemplate(input)).toBe(expectedOutput);
+ expect(FormattedTextTemplate(input)).toBe(expectedOutput);
});
it('should format text with HTML correctly', () => {
@@ -70,7 +70,7 @@ describe('TextType', () => {
format: 'html'
};
const expectedOutput = 'yes';
- expect(FormatTextTemplate(input)).toBe(expectedOutput);
+ expect(FormattedTextTemplate(input)).toBe(expectedOutput);
});
it('should format plain text correctly', () => {
@@ -79,7 +79,7 @@ describe('TextType', () => {
format: 'plain'
};
const expectedOutput = 'Just plain text';
- expect(FormatTextTemplate(input)).toBe(expectedOutput);
+ expect(FormattedTextTemplate(input)).toBe(expectedOutput);
});
// Add more tests for other formats if needed
diff --git a/client/src/components/GiftTemplate/templates/GlobalFeedbackTemplate.ts b/client/src/components/GiftTemplate/templates/GlobalFeedbackTemplate.ts
index e5e4e78..faa0cea 100644
--- a/client/src/components/GiftTemplate/templates/GlobalFeedbackTemplate.ts
+++ b/client/src/components/GiftTemplate/templates/GlobalFeedbackTemplate.ts
@@ -1,5 +1,5 @@
import { TemplateOptions } from './types';
-import {FormatTextTemplate} from './TextTypeTemplate';
+import {FormattedTextTemplate} from './TextTypeTemplate';
import { state } from '.';
import { theme } from '../constants';
import { TextFormat } from 'gift-pegjs';
@@ -20,7 +20,7 @@ export default function GlobalFeedbackTemplate({ format, text }: GlobalFeedbackO
return (format && text)
? `
${FormatTextTemplate({format: format, text: text})}
+${FormattedTextTemplate({format: format, text: text})}