dx: moved files created by tests to a folder (from root)

Massimo Melina committed Apr 20, 2025 at 19:16 UTC 93fa5be7e297ebe84c1b20baa5dcb78b6ca933a9
3 files changed +26 -35
.gitignore
+2 -11
@@ -2,18 +2,9 @@ node_modules
2 .idea
3 .vscode
4 dist
5 -shared/lib
6 -mui-grid-form/lib
7 -#produced by running
8 -counters.yaml
9 -*.log*
10 -self.*
11 -config.yaml*
12 -custom.html
13 -accounts.yaml
5 .DS_Store
15 -storage
16 -*.kv
6 +#produced by running
7 +tests/work
8
9 # Playwright
10 /test-results/
package.json
+3 -3
@@ -16,10 +16,10 @@
16 "build-server": "rm -rf dist/src dist/plugins && tsc --target es2018 && touch package.json && cp -v -r package.json central.json README* LICENSE* hfs.ico plugins dist && find dist -name .DS_Store -o -name storage -exec rm -rf {} + && node afterbuild.js",
17 "build-frontend": "npm run build --workspace=frontend",
18 "build-admin": "npm run build --workspace=admin",
19 - "server-for-test": "node dist/src --cwd . --config tests --debug && rm custom.html",
20 - "server-for-test-dev": "cross-env DEV=1 FRONTEND_PROXY=3005 ADMIN_PROXY=3006 nodemon --ignore tests/ --watch src -e ts,tsx --exec tsx src -- --cwd . --config tests",
19 + "server-for-test": "node dist/src --cwd tests/work --config tests --debug",
20 + "server-for-test-dev": "cross-env DEV=1 FRONTEND_PROXY=3005 ADMIN_PROXY=3006 nodemon --ignore tests/ --watch src -e ts,tsx --exec tsx src -- --cwd tests/work --config tests",
21 "test": "node --import tsx --test tests/test.ts",
22 - "test-with-server": "node dist/src --cwd . --config tests & pid=$! && sleep 2 && node --import tsx --test tests/test.ts; _exit=$?; kill $pid; exit $_exit",
22 + "test-with-server": "node dist/src --cwd tests/work --config tests & pid=$! && sleep 2 && node --import tsx --test tests/test.ts; _exit=$?; kill $pid; exit $_exit",
23 "test-ui": "npx playwright test --ui",
24 "pub": "cd dist && npm publish",
25 "dist": "npm run build-all && npx playwright test && npm run dist-bin",
tests/config.yaml
+21 -21
@@ -4,7 +4,7 @@ allowed_referer: x.com
4 localhost_admin: false
5 vfs:
6 masks:
7 - "**/config.yaml*|test.ts":
7 + "**/config.yaml*|test.ts|work":
8 can_see: false
9 tests/page/!*.png:
10 mime: text/plain
@@ -13,26 +13,26 @@ vfs:
13 cantSearchForMasks/page:
14 can_list: false
15 children:
16 - - source: tests/alfa.txt
16 + - source: ../alfa.txt
17 name: x%#x
18 - name: protectFromAbove
19 children:
20 - name: child
21 children:
22 - - source: tests/alfa.txt
22 + - source: ../alfa.txt
23 can_see: true
24 - name: renamed
25 - source: tests/alfa.txt
25 + source: ../alfa.txt
26 - name: f1
27 children:
28 - name: f2
29 children:
30 - - source: tests/alfa.txt
30 + - source: ../alfa.txt
31 - name: pic
32 mime: png
33 - source: tests/page/gpl.png
33 + source: ../page/gpl.png
34 - name: page
35 - source: tests/page
35 + source: ../page
36 default: index.html
37 - name: for-admins
38 can_read:
@@ -41,54 +41,54 @@ vfs:
41 can_see: can_read
42 children:
43 - name: upload
44 - source: tests
44 + source: ..
45 can_upload:
46 - admins
47 can_delete:
48 - admins
49 - - source: tests/alfa.txt
49 + - source: ../alfa.txt
50 - name: for-disabled
51 can_list:
52 - disabled_account
53 - - source: tests
53 + - source: ..
54 masks:
55 "**/!*.png|files|":
56 can_see: false
57 - name: renameChild
58 children:
59 - - source: tests
59 + - source: ..
60 rename:
61 alfa.txt: renamed1
62 page/gpl.png: renamed2
63 - name: cantListBut
64 - source: tests
64 + source: ..
65 can_list: false
66 masks:
67 "*":
68 can_list: true
69 - name: cantSearchForMasks
70 - source: tests
70 + source: ..
71 - name: cantReadBut
72 - source: tests
72 + source: ..
73 can_read: false
74 masks:
75 "*":
76 can_read: true
77 - name: cantReadButChild
78 - source: tests
78 + source: ..
79 can_read: false
80 children:
81 - - source: tests/alfa.txt
81 + - source: ../alfa.txt
82 can_read:
83 - rejetto
84 - name: cantListPage
85 - source: tests
85 + source: ..
86 masks:
87 page:
88 can_see: false
89 can_list: false
90 - name: cantListPageAlt
91 - source: tests
91 + source: ..
92 masks:
93 page:
94 can_see: false
@@ -98,13 +98,13 @@ vfs:
98 can_read:
99 - rejetto
100 - name: cantReadPage
101 - source: tests
101 + source: ..
102 masks:
103 page|*.ts|*.yaml*:
104 can_read: false
105 can_list: false
106 - name: cantReadRealFolder
107 - source: tests
107 + source: ..
108 can_read: false
109 can_list: false
110 - name: cantSeeThis
@@ -118,7 +118,7 @@ vfs:
118 this: false
119 children:
120 - name: hi
121 - source: tests
121 + source: ..
122 masks:
123 "*/page":
124 can_list: false