Skip to content

Commit c90ab6c

Browse files
committed
fix(e2e): properties related apis
1 parent ba9b84c commit c90ab6c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

e2e-tests/logseq-api.spec.ts

+11
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,13 @@ test('(File graph): block related apis',
8686
expect(mb.uuid).toBe(b.uuid)
8787

8888
// properties
89+
// FIXME: redundant api call
90+
await callAPI('upsert_block_property', b1.uuid, 'a')
8991
await callAPI('upsert_block_property', b1.uuid, 'a', 1)
9092
let prop1 = await callAPI('get_block_property', b1.uuid, 'a')
9193

94+
expect(prop1).toBe(1)
95+
9296
await callAPI('upsert_block_property', b1.uuid, 'a', 2)
9397
prop1 = await callAPI('get_block_property', b1.uuid, 'a')
9498

@@ -199,5 +203,12 @@ test('(DB graph): block related apis',
199203

200204
expect(prop1).toEqual({ ':plugin.property/a': 'a', ':plugin.property/b': 'b' })
201205

206+
// properties schema
207+
await callAPI('upsert_property', 'p1')
208+
prop1 = await callAPI('get_property', 'p1')
209+
210+
expect(prop1.title).toBe('p1')
211+
expect(prop1.ident).toBe(':plugin.property/p1')
212+
202213
// await page.pause()
203214
})

0 commit comments

Comments
 (0)