@operato/attribute 10.29.34 → 10.29.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +356 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov.info +27088 -0
- package/dist/src/ox-attribute-form.js +1 -0
- package/dist/src/ox-attribute-form.js.map +1 -1
- package/dist/src/ox-attribute-view.js +1 -0
- package/dist/src/ox-attribute-view.js.map +1 -1
- package/dist/test/attribute-file.test.d.ts +2 -0
- package/dist/test/attribute-file.test.js +30 -0
- package/dist/test/attribute-file.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/test/attribute-file.test.ts +35 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/attribute",
|
|
3
3
|
"description": "WebApplication attribute supporting components following open-wc recommendations",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "10.29.
|
|
5
|
+
"version": "10.29.37",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"module": "dist/src/index.js",
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@material/web": "^2.0.0",
|
|
62
|
-
"@operato/data-grist": "^10.29.
|
|
63
|
-
"@operato/graphql": "^10.29.
|
|
64
|
-
"@operato/grist-editor": "^10.29.
|
|
62
|
+
"@operato/data-grist": "^10.29.37",
|
|
63
|
+
"@operato/graphql": "^10.29.37",
|
|
64
|
+
"@operato/grist-editor": "^10.29.37",
|
|
65
65
|
"@operato/i18n": "^10.29.27",
|
|
66
|
-
"@operato/input": "^10.29.
|
|
67
|
-
"@operato/popup": "^10.29.
|
|
68
|
-
"@operato/property-editor": "^10.29.
|
|
69
|
-
"@operato/shell": "^10.29.
|
|
66
|
+
"@operato/input": "^10.29.37",
|
|
67
|
+
"@operato/popup": "^10.29.37",
|
|
68
|
+
"@operato/property-editor": "^10.29.37",
|
|
69
|
+
"@operato/shell": "^10.29.37",
|
|
70
70
|
"@operato/styles": "^10.29.30",
|
|
71
|
-
"@operato/utils": "^10.29.
|
|
71
|
+
"@operato/utils": "^10.29.37",
|
|
72
72
|
"lit": "^3.1.2"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"prettier --write"
|
|
104
104
|
]
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "38361a65226ee9f23814747b4f0520edf42c3184"
|
|
107
107
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { expect, fixture } from '@open-wc/testing'
|
|
2
|
+
import { html } from 'lit'
|
|
3
|
+
|
|
4
|
+
import '../src/ox-attribute-form.js'
|
|
5
|
+
import '../src/ox-attribute-view.js'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A file attribute.
|
|
9
|
+
*
|
|
10
|
+
* ## Why this is tested
|
|
11
|
+
*
|
|
12
|
+
* The `file` case fell through to `secret` in both the form and the view: a file attribute drew a
|
|
13
|
+
* password box (form) or "********" (view), and no file could be attached. What must hold: a file
|
|
14
|
+
* attribute is drawn with the file picker, and only with it.
|
|
15
|
+
*/
|
|
16
|
+
describe('file attribute', () => {
|
|
17
|
+
const attributeSet = {
|
|
18
|
+
entity: 'paper',
|
|
19
|
+
description: '',
|
|
20
|
+
items: [{ name: 'scan', description: '', tag: 'scan', type: 'file', active: true, options: {} }]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
for (const tag of ['ox-attribute-form', 'ox-attribute-view']) {
|
|
24
|
+
it(`${tag} draws the file picker`, async () => {
|
|
25
|
+
const el: any = await fixture(
|
|
26
|
+
tag === 'ox-attribute-form'
|
|
27
|
+
? html`<ox-attribute-form .attributeSet=${attributeSet}></ox-attribute-form>`
|
|
28
|
+
: html`<ox-attribute-view .attributeSet=${attributeSet}></ox-attribute-view>`
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
expect(el.renderRoot.querySelector('ox-input-file[name="scan"]'), 'no file picker').to.exist
|
|
32
|
+
expect(el.renderRoot.querySelector('input[type="password"], [secret-container]'), 'a password box instead').to.not.exist
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
})
|