Class {
#name : #MarkdeepTest,
#superclass : #TestCase,
#category : #'Grafoscopio-Utils-Tests'
}
{ #category : #tests }
MarkdeepTest >> markdeepTestingPictureSnippet [
^ (XMLHTMLParser on: '
') parseDocument
]
{ #category : #tests }
MarkdeepTest >> testLePictureImport [
| metadata testSnippet |
metadata := STON fromString: (self markdeepTestingPictureSnippet xpath: 'st-class') stringValue.
testSnippet := LePictureSnippet new injectMetadataFrom: metadata.
self assert: (testSnippet metadata at: 'parent') isNotNil.
]
{ #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)
]