-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52b7841
commit 23d6f98
Showing
15 changed files
with
220 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// ========================================================================== | ||
// Squidex Headless CMS | ||
// ========================================================================== | ||
// Copyright (c) Squidex UG (haftungsbeschraenkt) | ||
// All rights reserved. Licensed under the MIT license. | ||
// ========================================================================== | ||
|
||
using System.Text.Json; | ||
using Squidex.Text.RichText.Model; | ||
using Xunit; | ||
|
||
namespace Squidex.Text.RichText; | ||
|
||
public class RichTextRepeatedTests | ||
{ | ||
[Fact] | ||
|
||
public void Should_render_from_files() | ||
{ | ||
var inputJson = File.ReadAllText("RichText/TestCases/Repeated/Repeated.json"); | ||
var inputNode = JsonSerializer.Deserialize<Node>(inputJson)!; | ||
|
||
RenderUtils.AssertNode(inputNode, | ||
null, | ||
null, | ||
null, | ||
File.ReadAllText("RichText/TestCases/Repeated/Repeated.txt")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...idex.Text.Tests/RichText/ComplexText.html → ...xt/TestCases/ComplexText/ComplexText.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
...quidex.Text.Tests/RichText/ComplexText.md → ...Text/TestCases/ComplexText/ComplexText.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
# Header | ||
# Heading 1 | ||
|
||
## Heading 2 | ||
|
||
### Heading 3 | ||
|
||
Content with **bold**, *italic*, underline, `code` and a class. | ||
|
||
|
1 change: 1 addition & 0 deletions
1
text/Squidex.Text.Tests/RichText/TestCases/ComplexText/ComplexText.min.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>Heading 1</h1><h2>Heading 2</h2><h3>Heading 3</h3><p>Content with <strong>bold</strong>, <em>italic</em>, <u>underline</u>, <code>code</code> and <span class="__editor_text-left">a class</span>.</p><blockquote><p>Quote</p></blockquote><pre class="language-javascript"><code data-code-block-language="javascript">Code Block in Javascript</code></pre><p>Just another paragraph</p><hr><ul><li><p>Item 1</p></li><li><p>Item 2</p></li></ul><ol><li><p>Item A</p></li><li><p>Item B</p></li></ol><p><a href="https://cloud.squidex.io" rel="noopener noreferrer nofollow">A link</a></p><p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Adams_The_Tetons_and_the_Snake_River.jpg/1280px-Adams_The_Tetons_and_the_Snake_River.jpg" title="My Image"></p> |
1 change: 1 addition & 0 deletions
1
text/Squidex.Text.Tests/RichText/TestCases/ComplexText/ComplexText.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Heading 1 Heading 2 Heading 3 Content with bold, italic, underline, code and a class. Quote Code Block in Javascript Just another paragraph Item 1 Item 2 Item A Item B A link |
50 changes: 50 additions & 0 deletions
50
text/Squidex.Text.Tests/RichText/TestCases/Repeated/Repeated.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"type": "doc", | ||
"content": [ | ||
{ | ||
"type": "paragraph", | ||
"content": [ | ||
{ | ||
"type": "text", | ||
"text": "Hello World" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "paragraph", | ||
"content": [ | ||
{ | ||
"type": "text", | ||
"text": "Hello World" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "paragraph", | ||
"content": [ | ||
{ | ||
"type": "text", | ||
"text": "Hello World" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "paragraph", | ||
"content": [ | ||
{ | ||
"type": "text", | ||
"text": "Hello World" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "paragraph", | ||
"content": [ | ||
{ | ||
"type": "text", | ||
"text": "Hello World" | ||
} | ||
] | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
text/Squidex.Text.Tests/RichText/TestCases/Repeated/Repeated.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello World Hello World Hello World Hello World Hello World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters