@@ -35,6 +35,12 @@ describe('DigitalExperienceSourceAdapter', () => {
35
35
const LWC_META_FILE = join ( LWC_PATH , DE_METAFILE ) ;
36
36
const LWC_CONTENT_FILE = join ( LWC_PATH , 'content.json' ) ;
37
37
const LWC_JS_META_XML_FILE = join ( LWC_PATH , 'localComp.js-meta.xml' ) ;
38
+ const LWC_JS_FILE = join ( LWC_PATH , 'localComp.js' ) ;
39
+ const LWC_HTML_FILE = join ( LWC_PATH , 'localComp.html' ) ;
40
+ const LWC_CSS_FILE = join ( LWC_PATH , 'localComp.css' ) ;
41
+ const LWC_EDITOR_JSON_FILE = join ( LWC_PATH , 'editor.json' ) ;
42
+ const LWC_SVG_FILE = join ( LWC_PATH , 'localComp.svg' ) ;
43
+ const LWC_NESTED_FOLDERS_HTML_FILE = join ( LWC_PATH , 'folder1' , 'folder1_1' , 'folder1_1_1' , 'compHelper.html' ) ;
38
44
39
45
const registryAccess = new RegistryAccess ( ) ;
40
46
const forceIgnore = new ForceIgnore ( ) ;
@@ -48,6 +54,12 @@ describe('DigitalExperienceSourceAdapter', () => {
48
54
LWC_META_FILE ,
49
55
LWC_CONTENT_FILE ,
50
56
LWC_JS_META_XML_FILE ,
57
+ LWC_JS_FILE ,
58
+ LWC_HTML_FILE ,
59
+ LWC_CSS_FILE ,
60
+ LWC_EDITOR_JSON_FILE ,
61
+ LWC_SVG_FILE ,
62
+ LWC_NESTED_FOLDERS_HTML_FILE ,
51
63
] ) ;
52
64
53
65
const bundleAdapter = new DigitalExperienceSourceAdapter (
@@ -154,10 +166,21 @@ describe('DigitalExperienceSourceAdapter', () => {
154
166
forceIgnore
155
167
) ;
156
168
157
- it ( 'should return a SourceComponent for content json and .js-meta.xml' , ( ) => {
158
- expect ( digitalExperienceAdapter . getComponent ( LWC_CONTENT_FILE ) ) . to . deep . equal ( component ) ;
159
- expect ( digitalExperienceAdapter . getComponent ( LWC_META_FILE ) ) . to . deep . equal ( component ) ;
160
- expect ( digitalExperienceAdapter . getComponent ( LWC_JS_META_XML_FILE ) ) . to . deep . equal ( component ) ;
169
+ it ( 'should return a SourceComponent for files in inline media content' , ( ) => {
170
+ const files : string [ ] = [
171
+ LWC_CONTENT_FILE ,
172
+ LWC_META_FILE ,
173
+ LWC_JS_META_XML_FILE ,
174
+ LWC_JS_FILE ,
175
+ LWC_HTML_FILE ,
176
+ LWC_CSS_FILE ,
177
+ LWC_EDITOR_JSON_FILE ,
178
+ LWC_SVG_FILE ,
179
+ LWC_NESTED_FOLDERS_HTML_FILE ,
180
+ ] ;
181
+ files . forEach ( ( file ) => {
182
+ expect ( digitalExperienceAdapter . getComponent ( file ) ) . to . deep . equal ( component ) ;
183
+ } ) ;
161
184
} ) ;
162
185
} ) ;
163
186
} ) ;
0 commit comments