File tree Expand file tree Collapse file tree 5 files changed +48
-45
lines changed Expand file tree Collapse file tree 5 files changed +48
-45
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ onMounted(() => {
132
132
:value =" modelProxy"
133
133
class =" unset-all cursor-text block min-h-0 overflow-hidden resize-none placeholder-muted"
134
134
:class =" { 'whitespace-nowrap': !multiline }"
135
+ data-core-input
135
136
@input =" modelProxy = $event.target.value"
136
137
@keypress.enter =" handleEnter"
137
138
/>
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import { readFileSync } from 'node:fs'
2
+ import { expect , test } from '@playwright/test'
3
+
4
+ const publicKey = readFileSync ( './test/fixtures/encryption/test-key.public' ) . toString ( )
5
+ const privateKey = readFileSync ( './test/fixtures/encryption/test-key.private' ) . toString ( )
6
+
7
+ test . describe ( 'encryption' , ( ) => {
8
+ test . beforeEach ( async ( { page } ) => {
9
+ await page . goto ( '/' )
10
+ await page . evaluate ( async ( ) => {
11
+ // Allow the file to be processed by Vite.
12
+ await import ( '/_nuxt/test/e2e/seed-encrypted-docs' )
13
+ } )
14
+ } )
15
+
16
+ test ( 'does not show docs that cannot be decrypted' , async ( { page } ) => {
17
+ await page . goto ( '/docs' )
18
+ await page . waitForSelector ( '[data-is-mounted="true"]' )
19
+
20
+ expect ( await page . locator ( '[data-test-doc]' ) . count ( ) ) . toEqual ( 0 )
21
+ } )
22
+
23
+ test ( 'shows docs that can be decrypted' , async ( { page } ) => {
24
+ await page . goto ( '/settings' )
25
+ await page . waitForSelector ( '[data-is-mounted="true"]' )
26
+
27
+ await page . locator ( '[data-test-public-key] [data-core-input]' ) . fill ( publicKey . trim ( ) )
28
+ await page . locator ( '[data-test-private-key] [data-core-input]' ) . fill ( privateKey . trim ( ) )
29
+ await page . locator ( '[data-test-toggle-crypto]:not([disabled])' ) . click ( )
30
+
31
+ await page . goto ( '/docs' )
32
+ await page . waitForSelector ( '[data-is-mounted="true"]' )
33
+
34
+ expect ( await page . locator ( '[data-test-doc]' ) . count ( ) ) . toEqual ( 3 )
35
+ } )
36
+ } )
Original file line number Diff line number Diff line change
1
+ import { db } from '/src/db'
2
+ import docs from '/test/fixtures/encryption/docs.json' with { type : 'json' }
3
+
4
+ await Promise . all (
5
+ docs . map ( async ( doc : any ) => {
6
+ await db . docs . put ( doc , doc . id )
7
+ } ) ,
8
+ )
Original file line number Diff line number Diff line change 51
51
"/*" : [
52
52
" ./*"
53
53
],
54
+ "/_nuxt/*" : [
55
+ " ./*"
56
+ ],
54
57
"#components" : [
55
58
" ./components"
56
59
],
You can’t perform that action at this time.
0 commit comments