From d9d8d04cd36a0d79539e2f5c1348ae68c911fd03 Mon Sep 17 00:00:00 2001 From: Siobhan Date: Tue, 27 Feb 2024 17:26:13 +0000 Subject: [PATCH] test: Add new test to ensure video block is hidden --- .../StringStripGutenbergContentForExcerptTests.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Tests/WordPressSharedTests/StringStripGutenbergContentForExcerptTests.swift b/Tests/WordPressSharedTests/StringStripGutenbergContentForExcerptTests.swift index e73f269..fb55293 100644 --- a/Tests/WordPressSharedTests/StringStripGutenbergContentForExcerptTests.swift +++ b/Tests/WordPressSharedTests/StringStripGutenbergContentForExcerptTests.swift @@ -38,4 +38,13 @@ class StringStripGutenbergContentForExcerptTests: XCTestCase { XCTAssertEqual(summary, expectedSummary) } + + func testStrippingGutenbergContentForExcerptWithVideoPress2() { + let content = "

Before

\n\n
\nhttps://videopress.com/v/AbCDe?resizeToParent=true&cover=true&preloadContent=metadata&useAverageColor=true\n
\n\n

After

" + let expectedSummary = "

Before

\n

After

" + + let summary = content.strippingGutenbergContentForExcerpt() + + XCTAssertEqual(summary, expectedSummary) + } }