From bce611a63c812587e1fb250af46586c992b1bb50 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 1 Dec 2023 19:46:11 +0100 Subject: [PATCH] Update blocks raw handling test snapshot with original values --- .../blocks-raw-handling.native.js.snap | 157 ++++++++++++++++-- 1 file changed, 145 insertions(+), 12 deletions(-) diff --git a/test/native/integration/__snapshots__/blocks-raw-handling.native.js.snap b/test/native/integration/__snapshots__/blocks-raw-handling.native.js.snap index 4b0233e6c435f..deceb960fcac5 100644 --- a/test/native/integration/__snapshots__/blocks-raw-handling.native.js.snap +++ b/test/native/integration/__snapshots__/blocks-raw-handling.native.js.snap @@ -1,14 +1,46 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Blocks raw handling pasteHandler google-docs-list-only 1`] = `"
My first list item
A sub list item
A second sub list item
My second list item
My third list item"`; +exports[`Blocks raw handling pasteHandler apple 1`] = `"This is a title


This is a heading


This is a paragraph with a link.


A
Bulleted
Indented
List


One
Two
Three


One
Two
Three
1
2
3
I
II
III


An image:
"`; + +exports[`Blocks raw handling pasteHandler classic 1`] = `"First paragraph

Second paragraph
Third paragraph
Fourth paragraph
Fifth paragraph
Sixth paragraph"`; + +exports[`Blocks raw handling pasteHandler evernote 1`] = `"This is a paragraph.


This is a link.


An
Unordered
Indented
List


One
Two
Indented
Three






One
Two
Three
Four
Five
Six
"`; + +exports[`Blocks raw handling pasteHandler google-docs 1`] = `"This is a title

This is a heading

Formatting test: bold, italic, link, strikethrough, superscript, subscript, nested.

A
Bulleted
Indented
List

One
Two
Three




One
Two
Three
1
2
3
I
II
III





An image:


"`; + +exports[`Blocks raw handling pasteHandler google-docs-list-only 1`] = `"My first list item
A sub list item
A second sub list item
My second list item
My third list item"`; + +exports[`Blocks raw handling pasteHandler google-docs-table 1`] = `"



One
Two
Three
1
2
3
I
II
III"`; + +exports[`Blocks raw handling pasteHandler google-docs-table-with-colspan 1`] = `"

Test colspan

"`; + +exports[`Blocks raw handling pasteHandler google-docs-table-with-comments 1`] = `"



One
Two
Three
1
2
3
I
II
III"`; + +exports[`Blocks raw handling pasteHandler google-docs-table-with-rowspan 1`] = `"

Test rowspan

"`; + +exports[`Blocks raw handling pasteHandler google-docs-with-comments 1`] = `"This is a title

This is a heading

Formatting test: bold, italic, link, strikethrough, superscript, subscript, nested.

A
Bulleted
Indented
List

One
Two
Three




One
Two
Three
1
2
3
I
II
III





An image:



"`; exports[`Blocks raw handling pasteHandler gutenberg 1`] = `"Test"`; exports[`Blocks raw handling pasteHandler iframe-embed 1`] = `""`; -exports[`Blocks raw handling pasteHandler ms-word-styled 1`] = `"
Lorem ipsum dolor sit amet, consectetur adipiscing elit 


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque aliquet hendrerit auctor. Nam lobortis, est vel lacinia tincidunt, purus tellus vehicula ex, nec pharetra justo dui sed lorem. Nam congue laoreet massa, quis varius est tincidunt ut."`; +exports[`Blocks raw handling pasteHandler markdown 1`] = `"This is a heading with italic
This is a paragraph with a link, bold, and strikethrough.
Preserve
line breaks please.
Lists
A
Bulleted Indented
List
One
Two
Three
Table
First Header
Second Header
Content from cell 1
Content from cell 2
Content in the first column
Content in the second column



Table with empty cells.
Quote
First
Second
Code
Inline code tags should work.
This is a code block."`; + +exports[`Blocks raw handling pasteHandler ms-word 1`] = `"This is a title
 
This is a subtitle
 
This is a heading level 1
 
This is a heading level 2
 
This is a paragraph with a link.
 
A
Bulleted
Indented
List
 
One
Two
Three
 
One
Two
Three
1
2
3
I
II
III
 
An image:
 

This is an anchor link that leads to the next paragraph.
This is the paragraph with the anchor.
This is an anchor link that leads nowhere.
This is a paragraph with an anchor with no link pointing to it.
This is a reference to a footnote[1].
This is a reference to an endnote[i].


[1] This is a footnote.


[i] This is an endnote."`; + +exports[`Blocks raw handling pasteHandler ms-word-list 1`] = `"This is a headline?
This is a text:
One
Two
Three
Lorem Ipsum.
 "`; + +exports[`Blocks raw handling pasteHandler ms-word-online 1`] = `"This is a heading 
This is a paragraph with a link

Bulleted 
Indented 
List 
 
One 
Two 
Three 

One 
Two 
Three 




II 
III 
 
An image: 
 "`; + +exports[`Blocks raw handling pasteHandler ms-word-styled 1`] = `"
Lorem ipsum dolor sit amet, consectetur adipiscing elit 


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque aliquet hendrerit auctor. Nam lobortis, est vel lacinia tincidunt, purus tellus vehicula ex, nec pharetra justo dui sed lorem. Nam congue laoreet massa, quis varius est tincidunt ut."`; -exports[`Blocks raw handling pasteHandler one-image 1`] = `""`; +exports[`Blocks raw handling pasteHandler nested-divs 1`] = `"First paragraph

Second paragraph
Third paragraph
Fourth paragraph
Fifth paragraph
Sixth paragraph"`; + +exports[`Blocks raw handling pasteHandler one-image 1`] = `""`; + +exports[`Blocks raw handling pasteHandler plain 1`] = `"test
test

test"`; + +exports[`Blocks raw handling pasteHandler shortcode-matching 1`] = `"[gallery ids="40,41,42"]
[gallery ids="1000"]
[gallery ids="42"]"`; exports[`Blocks raw handling pasteHandler should remove extra blank lines 1`] = ` " @@ -20,7 +52,7 @@ exports[`Blocks raw handling pasteHandler should remove extra blank lines 1`] = " `; -exports[`Blocks raw handling pasteHandler should strip HTML formatting space from inline text 1`] = `""`; +exports[`Blocks raw handling pasteHandler should strip HTML formatting space from inline text 1`] = `"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent a elit eget tortor molestie egestas. Donec pretium urna vitae mattis imperdiet. Praesent et lorem iaculis, volutpat odio vitae, ornare lacus. Donec ut felis tristique, pharetra erat id, viverra justo. Integer sit amet elementum arcu, eget pharetra felis. In malesuada enim est, sed placerat nulla feugiat at. Vestibulum feugiat vitae elit sit amet tincidunt. Pellentesque finibus sed dolor non facilisis. Curabitur accumsan ante ac hendrerit vestibulum."`; exports[`Blocks raw handling pasteHandler should strip some text-level elements 1`] = ` " @@ -38,7 +70,13 @@ exports[`Blocks raw handling pasteHandler should strip windows data 1`] = ` " `; -exports[`Blocks raw handling pasteHandler two-images 1`] = `" "`; +exports[`Blocks raw handling pasteHandler slack-paragraphs 1`] = `"test with link
a new line

a new paragraph
another new line

another paragraph"`; + +exports[`Blocks raw handling pasteHandler slack-quote 1`] = `"Test with link."`; + +exports[`Blocks raw handling pasteHandler two-images 1`] = `" "`; + +exports[`Blocks raw handling pasteHandler wordpress 1`] = `"Howdy
This is a paragraph.
More tag

Shortcode
[gallery ids="1"]

test
test"`; exports[`Blocks raw handling should correctly handle quotes with mixed content 1`] = ` " @@ -52,15 +90,102 @@ exports[`Blocks raw handling should correctly handle quotes with mixed content 1 " `; -exports[`rawHandler should convert HTML post to blocks with minimal content changes 1`] = `""`; +exports[`rawHandler should convert HTML post to blocks with minimal content changes 1`] = ` +" +

Howdy

+ + + +
+ + + +

This is a paragraph.

+ + + +

Preserve me!

+ + + +

More tag

+ + + + + + + +

Shortcode

+ + + + + + + +
+
Term
+
+ Description. +
+
+ + + +
    +
  1. Item
  2. +
+ + + +
+

Text.

+
+ + + +
+

Heading

+ + + +

Text.

+
+" +`; -exports[`rawHandler should convert a caption shortcode 1`] = `""`; +exports[`rawHandler should convert a caption shortcode 1`] = ` +" +
test
+" +`; -exports[`rawHandler should convert a caption shortcode with caption 1`] = `""`; +exports[`rawHandler should convert a caption shortcode with caption 1`] = ` +" +
test
+" +`; -exports[`rawHandler should convert a caption shortcode with link 1`] = `""`; +exports[`rawHandler should convert a caption shortcode with link 1`] = ` +" +
Bell on Wharf
Bell on wharf in San Francisco
+" +`; -exports[`rawHandler should convert a list with attributes 1`] = `""`; +exports[`rawHandler should convert a list with attributes 1`] = ` +" +
    +
  1. 1 +
      +
    1. 1
    2. +
    +
  2. +
+" +`; exports[`rawHandler should convert to unsupported HTML block when no transformation is available 1`] = ` " @@ -68,6 +193,14 @@ exports[`rawHandler should convert to unsupported HTML block when no transformat " `; -exports[`rawHandler should not strip any text-level elements 1`] = `""`; +exports[`rawHandler should not strip any text-level elements 1`] = ` +" +

This is ncorect

+" +`; -exports[`rawHandler should preserve alignment 1`] = `""`; +exports[`rawHandler should preserve alignment 1`] = ` +" +

center

+" +`;