Class {
#name : #MarkdeepTest,
#superclass : #TestCase,
#category : #'Grafoscopio-Utils-Tests'
}
{ #category : #tests }
MarkdeepTest >> markdeepTestingPictureSnippet [
^ (XMLHTMLParser on: '
') parseDocument
]
{ #category : #tests }
MarkdeepTest >> testLePictureImport [
| metadata |
metadata := STON fromString: (self markdeepTestingPictureSnippet xpath: '@st-data') stringValue.
self assert:
(LePictureSnippet new injectMetadataFrom: metadata)
]
{ #category : #tests }
MarkdeepTest >> testMetadaIncludesParentId [
| aPage aSnippetOne aSnippetTwo |
aPage := LeUIExamples new database pageBuilder title: 'Test Page'; add.
aSnippetOne := aPage snippetBuilder string: 'Parent snippet'; add.
aSnippetTwo := aPage snippetBuilder string: 'Child Snippet'; add.
aSnippetTwo parent: aSnippetOne.
self assert: (aSnippetTwo metadata values includes: aSnippetOne uidString)
]