@@ -56,12 +56,12 @@ export function setupInteractSubmodeTests(
5656 let string: typeof import (' https://cardstack.com/base/string' );
5757 let spec: typeof import (' https://cardstack.com/base/spec' );
5858 let cardsGrid: typeof import (' https://cardstack.com/base/cards-grid' );
59- let fileApi : typeof import (' https://cardstack.com/base/file-api ' );
59+ let markdownFileDef : typeof import (' https://cardstack.com/base/markdown- file-def ' );
6060 cardApi = await loader .import (` ${baseRealm .url }card-api ` );
6161 string = await loader .import (` ${baseRealm .url }string ` );
6262 spec = await loader .import (` ${baseRealm .url }spec ` );
6363 cardsGrid = await loader .import (` ${baseRealm .url }cards-grid ` );
64- fileApi = await loader .import (` ${baseRealm .url }file-api ` );
64+ markdownFileDef = await loader .import (` ${baseRealm .url }markdown- file-def ` );
6565
6666 let {
6767 field,
@@ -76,7 +76,7 @@ export function setupInteractSubmodeTests(
7676 let { default : StringField } = string ;
7777 let { Spec } = spec ;
7878 let { CardsGrid } = cardsGrid ;
79- let { FileDef } = fileApi ;
79+ let { MarkdownDef } = markdownFileDef ;
8080
8181 class Pet extends CardDef {
8282 static displayName = ' Pet' ;
@@ -245,7 +245,7 @@ export function setupInteractSubmodeTests(
245245 class FileLinkCard extends CardDef {
246246 static displayName = ' File Link Card' ;
247247 @field title = contains (StringField );
248- @field attachment = linksTo (FileDef );
248+ @field attachment = linksTo (MarkdownDef );
249249
250250 static isolated = class Isolated extends Component <typeof this > {
251251 <template >
@@ -313,8 +313,8 @@ export function setupInteractSubmodeTests(
313313 ' personnel.gts' : { Personnel },
314314 ' pet.gts' : { Pet , Puppy },
315315 ' shipping-info.gts' : { ShippingInfo },
316- ' README.txt ' : ` Hello World ` ,
317- ' FileLinkCard/notes.txt ' : ' Hello from a file link' ,
316+ ' README.md ' : ` # Hello World` ,
317+ ' FileLinkCard/notes.md ' : ' # Hello from a file link' ,
318318 ' person-entry.json' : new Spec ({
319319 cardTitle: ' Person Card' ,
320320 cardDescription: ' Spec for Person Card' ,
@@ -392,11 +392,11 @@ export function setupInteractSubmodeTests(
392392 relationships: {
393393 attachment: {
394394 links: {
395- self: ' ./notes.txt ' ,
395+ self: ' ./notes.md ' ,
396396 },
397397 data: {
398398 type: ' file-meta' ,
399- id: ' ./notes.txt ' ,
399+ id: ' ./notes.md ' ,
400400 },
401401 },
402402 },
@@ -408,6 +408,28 @@ export function setupInteractSubmodeTests(
408408 },
409409 },
410410 },
411+ ' FileLinkCard/empty.json' : {
412+ data: {
413+ type: ' card' ,
414+ attributes: {
415+ title: ' Empty linked file' ,
416+ },
417+ relationships: {
418+ attachment: {
419+ links: {
420+ self: null ,
421+ },
422+ data: null ,
423+ },
424+ },
425+ meta: {
426+ adoptsFrom: {
427+ module: ' ../file-link-card' ,
428+ name: ' FileLinkCard' ,
429+ },
430+ },
431+ },
432+ },
411433 ' Puppy/marco.json' : new Puppy ({ name: ' Marco' , age: ' 5 months' }),
412434 ' grid.json' : new CardsGrid (),
413435 ' index.json' : new CardsGrid (),
0 commit comments