@@ -5,6 +5,8 @@ import { module, test } from 'qunit';
5
5
6
6
import type { Realm } from ' @cardstack/runtime-common' ;
7
7
8
+ import { PlaygroundSelections } from ' @cardstack/host/utils/local-storage-keys' ;
9
+
8
10
import type { Format } from ' https://cardstack.com/base/card-api' ;
9
11
10
12
import {
@@ -232,7 +234,7 @@ export class BlogPost extends CardDef {
232
234
[testRealmURL , ' Author/jane-doe.json' ],
233
235
]),
234
236
);
235
- window .localStorage .setItem (' playground-selections ' , ' ' );
237
+ window .localStorage .setItem (PlaygroundSelections , ' ' );
236
238
});
237
239
238
240
test (' can render playground panel when a card def is selected' , async function (assert ) {
@@ -264,7 +266,7 @@ export class BlogPost extends CardDef {
264
266
265
267
test (' can populate instance chooser dropdown options from recent files' , async function (assert ) {
266
268
window .localStorage .setItem (' recent-files' , ' ' );
267
- window .localStorage .setItem (' playground-selections ' , ' ' );
269
+ window .localStorage .setItem (PlaygroundSelections , ' ' );
268
270
269
271
await visitOperatorMode ({
270
272
submode: ' code' ,
@@ -352,7 +354,7 @@ export class BlogPost extends CardDef {
352
354
},
353
355
};
354
356
window .localStorage .setItem (
355
- ' playground-selections ' ,
357
+ PlaygroundSelections ,
356
358
JSON .stringify (selections ),
357
359
);
358
360
const assertCardExists = (fileName : string ) => {
@@ -739,7 +741,7 @@ export class BlogPost extends CardDef {
739
741
const blogPostId2 = ` ${testRealmURL }BlogPost/remote-work ` ;
740
742
741
743
window .localStorage .setItem (
742
- ' playground-selections ' ,
744
+ PlaygroundSelections ,
743
745
JSON .stringify ({
744
746
[` ${authorModuleId } ` ]: {
745
747
cardId: authorId ,
@@ -755,7 +757,7 @@ export class BlogPost extends CardDef {
755
757
}),
756
758
);
757
759
const getSelection = (moduleId : string ) => {
758
- let selections = window .localStorage .getItem (' playground-selections ' );
760
+ let selections = window .localStorage .getItem (PlaygroundSelections );
759
761
if (! selections ) {
760
762
throw new Error (' No selections found in mock local storage' );
761
763
}
@@ -818,7 +820,7 @@ export class BlogPost extends CardDef {
818
820
format: ' fitted' ,
819
821
});
820
822
821
- let selections = window .localStorage .getItem (' playground-selections ' );
823
+ let selections = window .localStorage .getItem (PlaygroundSelections );
822
824
assert .strictEqual (
823
825
selections ,
824
826
JSON .stringify ({
0 commit comments