@things-factory/organization 10.1.202 → 10.1.205

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/organization",
3
- "version": "10.1.202",
3
+ "version": "10.1.205",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -36,10 +36,10 @@
36
36
  "@operato/p13n": "^10.0.0",
37
37
  "@operato/popup": "^10.15.0",
38
38
  "@operato/shell": "^10.0.0",
39
- "@things-factory/auth-base": "^10.1.202",
40
- "@things-factory/code-ui": "^10.1.202",
41
- "@things-factory/contact": "^10.1.202",
42
- "@things-factory/shell": "^10.1.188"
39
+ "@things-factory/auth-base": "^10.1.205",
40
+ "@things-factory/code-ui": "^10.1.205",
41
+ "@things-factory/contact": "^10.1.205",
42
+ "@things-factory/shell": "^10.1.205"
43
43
  },
44
- "gitHead": "3243b81eb1a4d3d903a01929f3a85d5b8df438dd"
44
+ "gitHead": "7311492aa5eaa00993c0325053f5f7ae8b1fb024"
45
45
  }
@@ -0,0 +1,32 @@
1
+ import { readFileSync } from 'fs'
2
+ import path from 'path'
3
+
4
+ /**
5
+ * The assignees editor does not offer Role (ADR-0091 decision 9).
6
+ *
7
+ * The worklist refuses a Role assignee by name on every activity save and on issue. "Anyone of the role"
8
+ * lives in the activity's assigneeRole only, so a Role row here could only end in a refusal on save.
9
+ * The approval-line editor is a different thing and keeps Role.
10
+ */
11
+ const read = (file: string) => readFileSync(path.resolve(__dirname, '..', file), 'utf-8')
12
+
13
+ describe('the assignees editor', () => {
14
+ const source = read('client/component/assignees-editor.ts')
15
+
16
+ it('does not offer Role as an assignee type', () => {
17
+ const options = source.match(/options: \[(''[^\]]*)\]/)?.[1] ?? ''
18
+ expect(options).toMatch(/'Employee'/)
19
+ expect(options).not.toMatch(/'Role'/)
20
+ })
21
+
22
+ it('has no Role branch or role lookup', () => {
23
+ expect(source).not.toMatch(/case 'Role'/)
24
+ expect(source).not.toMatch(/queryName: 'roles'/)
25
+ })
26
+ })
27
+
28
+ describe('the approval-line editor', () => {
29
+ it('keeps Role', () => {
30
+ expect(read('client/component/approval-line-items-editor.ts')).toMatch(/options: \['', 'Employee', 'Department', 'Role'/)
31
+ })
32
+ })