@operato/board 10.29.8 → 10.29.10
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 +28 -0
- package/coverage/lcov-report/index.html +71 -26
- package/coverage/lcov.info +4477 -470
- package/dist/src/figure-provider.d.ts +52 -16
- package/dist/src/figure-provider.js +70 -65
- package/dist/src/figure-provider.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.js +62 -9
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
- package/dist/src/ox-board-modeller.d.ts +5 -0
- package/dist/src/ox-board-modeller.js +7 -5
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/resolved-scene.js +7 -4
- package/dist/src/resolved-scene.js.map +1 -1
- package/dist/src/types.d.ts +8 -0
- package/dist/src/types.js.map +1 -1
- package/dist/test/component-menu.test.d.ts +1 -0
- package/dist/test/component-menu.test.js +61 -0
- package/dist/test/component-menu.test.js.map +1 -0
- package/dist/test/figure-provider.test.js +108 -99
- package/dist/test/figure-provider.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/test/component-menu.test.ts +69 -0
- package/test/figure-provider.test.ts +123 -107
- package/translations/en.json +2 -1
- package/translations/ja.json +2 -1
- package/translations/ko.json +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operato/board",
|
|
3
|
-
"version": "10.29.
|
|
3
|
+
"version": "10.29.10",
|
|
4
4
|
"description": "Webcomponent for board following open-wc recommendations",
|
|
5
5
|
"author": "heartyoh",
|
|
6
6
|
"type": "module",
|
|
@@ -120,18 +120,18 @@
|
|
|
120
120
|
"dependencies": {
|
|
121
121
|
"@material/web": "^2.0.0",
|
|
122
122
|
"@open-wc/scoped-elements": "^2.1.3",
|
|
123
|
-
"@operato/app": "^10.29.
|
|
124
|
-
"@operato/data-grist": "^10.29.
|
|
125
|
-
"@operato/font": "^10.29.
|
|
123
|
+
"@operato/app": "^10.29.9",
|
|
124
|
+
"@operato/data-grist": "^10.29.9",
|
|
125
|
+
"@operato/font": "^10.29.9",
|
|
126
126
|
"@operato/graphql": "^10.29.5",
|
|
127
127
|
"@operato/i18n": "^10.29.1",
|
|
128
|
-
"@operato/input": "^10.29.
|
|
129
|
-
"@operato/layout": "^10.29.
|
|
130
|
-
"@operato/markdown": "^10.29.
|
|
131
|
-
"@operato/popup": "^10.29.
|
|
132
|
-
"@operato/property-editor": "^10.29.
|
|
133
|
-
"@operato/property-panel": "^10.29.
|
|
134
|
-
"@operato/styles": "^10.29.
|
|
128
|
+
"@operato/input": "^10.29.9",
|
|
129
|
+
"@operato/layout": "^10.29.9",
|
|
130
|
+
"@operato/markdown": "^10.29.9",
|
|
131
|
+
"@operato/popup": "^10.29.9",
|
|
132
|
+
"@operato/property-editor": "^10.29.9",
|
|
133
|
+
"@operato/property-panel": "^10.29.9",
|
|
134
|
+
"@operato/styles": "^10.29.9",
|
|
135
135
|
"@operato/utils": "^10.29.1",
|
|
136
136
|
"@types/file-saver": "^2.0.4",
|
|
137
137
|
"@types/sortablejs": "^1.10.7",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"devDependencies": {
|
|
145
145
|
"@custom-elements-manifest/analyzer": "^0.10.0",
|
|
146
146
|
"@hatiolab/prettier-config": "^1.0.0",
|
|
147
|
-
"@hatiolab/things-scene": "^10.1.
|
|
147
|
+
"@hatiolab/things-scene": "^10.1.74",
|
|
148
148
|
"@open-wc/eslint-config": "^12.0.3",
|
|
149
149
|
"@open-wc/testing": "^4.0.0",
|
|
150
150
|
"@rollup/plugin-image": "^3.0.3",
|
|
@@ -180,5 +180,5 @@
|
|
|
180
180
|
"prettier --write"
|
|
181
181
|
]
|
|
182
182
|
},
|
|
183
|
-
"gitHead": "
|
|
183
|
+
"gitHead": "d9e090a2bbdaa75eff2e8864f1557fbfbc814733"
|
|
184
184
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { expect, fixture, html } from '@open-wc/testing'
|
|
2
|
+
|
|
3
|
+
import { ComponentMenu } from '../src/modeller/component-toolbar/component-menu.js'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A tray template that cannot be placed here (ADR-0114 P7): shown dimmed with its mark, its reason on hover, and
|
|
7
|
+
* nothing happens when it is picked -- no add mode, no image drag.
|
|
8
|
+
*/
|
|
9
|
+
customElements.get('test-component-menu') || customElements.define('test-component-menu', class extends ComponentMenu {})
|
|
10
|
+
|
|
11
|
+
const group = {
|
|
12
|
+
name: 'figure',
|
|
13
|
+
templates: [
|
|
14
|
+
{ type: 'hatiolab.com/ok', description: 'OK figure', icon: '', group: 'figure', model: { type: 'hatiolab.com/ok' } },
|
|
15
|
+
{
|
|
16
|
+
type: 'hatiolab.com/future',
|
|
17
|
+
description: 'Future figure',
|
|
18
|
+
icon: '',
|
|
19
|
+
group: 'figure',
|
|
20
|
+
model: { type: 'hatiolab.com/future' },
|
|
21
|
+
unavailableReason: 'this server cannot read figure-asset-9',
|
|
22
|
+
unavailableLabel: 'format unsupported'
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function menuWith(added: unknown[]) {
|
|
28
|
+
const scene = { rootContainer: { trigger: () => {} }, startAddMode: (model: unknown) => added.push(model) }
|
|
29
|
+
const menu = (await fixture(html`<test-component-menu .groups=${[group]} .scene=${scene as never}></test-component-menu>`)) as ComponentMenu
|
|
30
|
+
menu.group = 'figure'
|
|
31
|
+
await menu.updateComplete
|
|
32
|
+
return menu
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const itemOf = (menu: ComponentMenu, type: string) => menu.renderRoot.querySelector(`[data-type="${type}"]`) as HTMLElement
|
|
36
|
+
|
|
37
|
+
describe('트레이 — 놓을 수 없는 템플릿', () => {
|
|
38
|
+
it('흐리게 · 표 · 사유를 가진다, 아이콘은 끌리지 않는다', async () => {
|
|
39
|
+
const menu = await menuWith([])
|
|
40
|
+
const item = itemOf(menu, 'hatiolab.com/future')
|
|
41
|
+
expect(item.hasAttribute('unavailable')).to.equal(true)
|
|
42
|
+
expect(item.getAttribute('aria-disabled')).to.equal('true')
|
|
43
|
+
expect(item.getAttribute('title')).to.equal('this server cannot read figure-asset-9')
|
|
44
|
+
expect(item.querySelector('[mark]')!.textContent).to.equal('format unsupported')
|
|
45
|
+
expect(item.querySelector('[reason]')!.textContent).to.equal('this server cannot read figure-asset-9')
|
|
46
|
+
expect(item.querySelector('img')!.getAttribute('draggable')).to.equal('false')
|
|
47
|
+
expect(getComputedStyle(item).opacity).to.equal('0.5')
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
it('★ 고르면 아무 일도 없다 — 놓을 수 있는 것은 추가 모드에 들어간다', async () => {
|
|
51
|
+
const added: unknown[] = []
|
|
52
|
+
const menu = await menuWith(added)
|
|
53
|
+
|
|
54
|
+
itemOf(menu, 'hatiolab.com/future').click()
|
|
55
|
+
expect(added).to.deep.equal([])
|
|
56
|
+
|
|
57
|
+
menu.group = 'figure'
|
|
58
|
+
await menu.updateComplete
|
|
59
|
+
itemOf(menu, 'hatiolab.com/ok').click()
|
|
60
|
+
expect(added).to.deep.equal([{ type: 'hatiolab.com/ok' }])
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
it('놓을 수 있는 템플릿에는 표 · 사유가 없다', async () => {
|
|
64
|
+
const menu = await menuWith([])
|
|
65
|
+
const item = itemOf(menu, 'hatiolab.com/ok')
|
|
66
|
+
expect(item.hasAttribute('unavailable')).to.equal(false)
|
|
67
|
+
expect(item.querySelector('[mark]')).to.equal(null)
|
|
68
|
+
})
|
|
69
|
+
})
|
|
@@ -2,10 +2,17 @@ import { expect } from '@open-wc/testing'
|
|
|
2
2
|
|
|
3
3
|
import { Component, hasFigure, registerTypeResolver, resetFigures, resolveUnknownTypes } from '@hatiolab/things-scene'
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
createFigureResolver,
|
|
7
|
+
FIGURE_TYPE_MAP_CHANGED,
|
|
8
|
+
figureMapReleaseOfPage,
|
|
9
|
+
resetFigureMapPage,
|
|
10
|
+
setFigureMapChoice,
|
|
11
|
+
type FigureBlueprintsAnswer
|
|
12
|
+
} from '../src/figure-provider.js'
|
|
6
13
|
|
|
7
14
|
/**
|
|
8
|
-
* The path a
|
|
15
|
+
* The path a figure takes to a board (ADR-0063 결정 2, ADR-0114): one batch question by full name.
|
|
9
16
|
*
|
|
10
17
|
* things-scene holds the seat and knows nothing about figures; this package fills it. What is
|
|
11
18
|
* checked here is the part that belongs to the board: which names are asked about, what happens to
|
|
@@ -33,11 +40,17 @@ const figureAssetOf = (type: string) => ({
|
|
|
33
40
|
{ id: 'a0', unit: 'deg', value: 0 }
|
|
34
41
|
],
|
|
35
42
|
nodes: [
|
|
36
|
-
{
|
|
43
|
+
{
|
|
44
|
+
id: 'body.shape',
|
|
45
|
+
op: 'extrude@1',
|
|
46
|
+
args: ['zero', 'w', 'w', 'w'],
|
|
47
|
+
outputs: { shape: 'body.s' },
|
|
48
|
+
params: { frame: 'body.local', axis: 'y', section: 'rectangle' }
|
|
49
|
+
},
|
|
37
50
|
{
|
|
38
51
|
id: 'body.pose',
|
|
39
52
|
op: 'rigid@1',
|
|
40
|
-
args: ['zero', '
|
|
53
|
+
args: ['zero', 'zero', 'zero', 'a0', 'a0', 'a0'],
|
|
41
54
|
outputs: { pose: 'body.p' },
|
|
42
55
|
params: { from: 'body.local', to: 'asset' }
|
|
43
56
|
},
|
|
@@ -56,166 +69,169 @@ const figureAssetOf = (type: string) => ({
|
|
|
56
69
|
}
|
|
57
70
|
})
|
|
58
71
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
/** A server that answers from a table, from one map release, and records each question. */
|
|
73
|
+
function serverOf(
|
|
74
|
+
published: Record<string, unknown>,
|
|
75
|
+
release: { version: number; revision: number } | null = { version: 1, revision: 1 },
|
|
76
|
+
refusals: Record<string, string> = {}
|
|
77
|
+
) {
|
|
78
|
+
const asked: { types: string[]; map: string }[] = []
|
|
79
|
+
const state = { release }
|
|
65
80
|
return {
|
|
66
81
|
asked,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
82
|
+
state,
|
|
83
|
+
fetch: async (types: readonly string[], map: string): Promise<FigureBlueprintsAnswer> => {
|
|
84
|
+
asked.push({ types: [...types], map })
|
|
85
|
+
const items = types.filter(type => published[type]).map(type => ({ type, ref: `${type}@1`, asset: published[type] }))
|
|
86
|
+
const refused = types
|
|
87
|
+
.filter(type => !published[type])
|
|
88
|
+
.map(type => ({ type, code: 'figure-not-in-type-map', message: refusals[type] ?? `${type} is not in the type map` }))
|
|
89
|
+
return { release: state.release, items, refused }
|
|
73
90
|
}
|
|
74
91
|
}
|
|
75
92
|
}
|
|
76
93
|
|
|
77
|
-
|
|
94
|
+
const name = (label: string) => `hatiolab.com/${label}-${Math.random().toString(36).slice(2, 8)}`
|
|
95
|
+
|
|
96
|
+
describe('figure 공급자 — 보드가 Figure 를 정식 이름으로 한 번에 묻는다', () => {
|
|
78
97
|
afterEach(() => {
|
|
79
98
|
resetFigures()
|
|
99
|
+
resetFigureMapPage()
|
|
80
100
|
})
|
|
81
101
|
|
|
82
|
-
it('
|
|
83
|
-
const
|
|
102
|
+
it('등록되지 않은 type 을 대소문자와 관계없이 한 번에 묻는다 — 이미 등록된 것은 묻지 않는다', async () => {
|
|
103
|
+
const mixer = name('eq-mixer')
|
|
104
|
+
const { asked, fetch } = serverOf({ [mixer]: figureAssetOf(mixer) })
|
|
84
105
|
|
|
85
|
-
await createFigureResolver(fetch)([
|
|
106
|
+
await createFigureResolver(fetch)([mixer, 'rect', 'Conveyor', 'text', 'VEH_AGV_01'])
|
|
86
107
|
|
|
87
|
-
expect(asked).to.deep.equal(['
|
|
108
|
+
expect(asked).to.deep.equal([{ types: [mixer, 'Conveyor', 'VEH_AGV_01'], map: 'ACTIVE' }])
|
|
88
109
|
})
|
|
89
110
|
|
|
90
|
-
it('이미 등록된
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Component.register('EQ_TAKEN', class Taken extends Component {} as never)
|
|
111
|
+
it('이미 등록된 이름은 묻지 않고, figure 가 그 컴포넌트를 덮지 않는다', async () => {
|
|
112
|
+
const taken = name('taken')
|
|
113
|
+
const { asked, fetch } = serverOf({ [taken]: figureAssetOf(taken) })
|
|
114
|
+
Component.register(taken, class Taken extends Component {} as never)
|
|
95
115
|
|
|
96
|
-
await createFigureResolver(fetch)([
|
|
116
|
+
await createFigureResolver(fetch)([taken])
|
|
97
117
|
|
|
98
118
|
expect(asked).to.deep.equal([])
|
|
99
|
-
expect(hasFigure(
|
|
119
|
+
expect(hasFigure(taken)).to.equal(false)
|
|
100
120
|
})
|
|
101
121
|
|
|
102
|
-
it('받은 자산을
|
|
103
|
-
const
|
|
122
|
+
it('받은 자산을 물은 이름으로 등록한다', async () => {
|
|
123
|
+
const conveyor = name('conveyor')
|
|
124
|
+
const { fetch } = serverOf({ [conveyor]: figureAssetOf(conveyor) })
|
|
104
125
|
|
|
105
|
-
await createFigureResolver(fetch)([
|
|
126
|
+
await createFigureResolver(fetch)([conveyor])
|
|
106
127
|
|
|
107
|
-
expect(hasFigure(
|
|
108
|
-
|
|
109
|
-
expect(Component.register('EQ_REGISTERED')).to.not.equal(undefined)
|
|
128
|
+
expect(hasFigure(conveyor)).to.equal(true)
|
|
129
|
+
expect(Component.register(conveyor)).to.not.equal(undefined)
|
|
110
130
|
})
|
|
111
131
|
|
|
112
|
-
it('
|
|
113
|
-
const
|
|
132
|
+
it('★ 그리지 못한 이름은 서버가 준 이유를 그대로 돌려준다 — 읽을 수 없는 자산도 그 이름만 이유를 받는다', async () => {
|
|
133
|
+
const good = name('good')
|
|
134
|
+
const broken = name('broken')
|
|
135
|
+
const missing = name('missing')
|
|
136
|
+
const brokenAsset = figureAssetOf(broken)
|
|
137
|
+
brokenAsset.appearance = []
|
|
138
|
+
const { fetch } = serverOf({ [good]: figureAssetOf(good), [broken]: brokenAsset }, { version: 1, revision: 1 }, { [missing]: '타입 맵에 없습니다' })
|
|
114
139
|
|
|
115
|
-
await createFigureResolver(fetch)([
|
|
140
|
+
const answer = await createFigureResolver(fetch)([good, broken, missing])
|
|
116
141
|
|
|
117
|
-
expect(hasFigure(
|
|
118
|
-
|
|
119
|
-
expect(
|
|
142
|
+
expect(hasFigure(good)).to.equal(true)
|
|
143
|
+
expect(hasFigure(broken)).to.equal(false)
|
|
144
|
+
expect(answer!.refused.map(r => r.type)).to.deep.equal([missing, broken])
|
|
145
|
+
expect(answer!.refused[0].message).to.equal('타입 맵에 없습니다')
|
|
120
146
|
})
|
|
121
147
|
|
|
122
|
-
it('
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
let message = ''
|
|
126
|
-
try {
|
|
127
|
-
await createFigureResolver(fetch)(['EQ_NEW', 'EQ_OLD'])
|
|
128
|
-
} catch (error) {
|
|
129
|
-
message = error instanceof Error ? error.message : String(error)
|
|
148
|
+
it('물을 수 없으면 거절한다 — 씬은 실패로 모으고 보드는 열린다', async () => {
|
|
149
|
+
const fetch = async () => {
|
|
150
|
+
throw new Error('no route to the door')
|
|
130
151
|
}
|
|
131
|
-
|
|
132
|
-
expect(message).to.contain('not a figure asset: EQ_OLD')
|
|
133
|
-
expect(hasFigure('EQ_NEW')).to.equal(true)
|
|
134
|
-
expect(hasFigure('EQ_OLD')).to.equal(false)
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
it('읽을 수 없는 자산은 그 type 만 실패로 남는다', async () => {
|
|
138
|
-
const broken = figurePayloadOf('EQ_ASSET_BROKEN')
|
|
139
|
-
broken.asset.appearance = []
|
|
140
|
-
const { fetch } = fetcherOf({ EQ_BESIDE: figurePayloadOf('EQ_BESIDE'), EQ_ASSET_BROKEN: broken })
|
|
141
|
-
|
|
142
152
|
let message = ''
|
|
143
153
|
try {
|
|
144
|
-
await createFigureResolver(fetch)(['
|
|
154
|
+
await createFigureResolver(fetch as never)([name('x')])
|
|
145
155
|
} catch (error) {
|
|
146
156
|
message = error instanceof Error ? error.message : String(error)
|
|
147
157
|
}
|
|
148
|
-
|
|
149
|
-
expect(message).to.contain('EQ_ASSET_BROKEN')
|
|
150
|
-
expect(hasFigure('EQ_BESIDE')).to.equal(true)
|
|
151
|
-
expect(hasFigure('EQ_ASSET_BROKEN')).to.equal(false)
|
|
158
|
+
expect(message).to.contain('no route to the door')
|
|
152
159
|
})
|
|
153
160
|
|
|
154
|
-
it('
|
|
155
|
-
const
|
|
161
|
+
it('★ 페이지는 처음 받은 맵 릴리스를 기억하고, 후보의 revision 이 바뀐 답은 등록하지 않는다', async () => {
|
|
162
|
+
const first = name('first')
|
|
163
|
+
const later = name('later')
|
|
164
|
+
const server = serverOf({ [first]: figureAssetOf(first), [later]: figureAssetOf(later) }, { version: 2, revision: 3 })
|
|
165
|
+
const resolver = createFigureResolver(server.fetch)
|
|
166
|
+
setFigureMapChoice('CANDIDATE')
|
|
156
167
|
|
|
157
|
-
|
|
168
|
+
await resolver([first])
|
|
169
|
+
expect(figureMapReleaseOfPage()).to.deep.equal({ map: 'CANDIDATE', version: 2, revision: 3 })
|
|
170
|
+
|
|
171
|
+
let changed: any = null
|
|
172
|
+
const listen = (e: Event) => (changed = (e as CustomEvent).detail)
|
|
173
|
+
window.addEventListener(FIGURE_TYPE_MAP_CHANGED, listen)
|
|
158
174
|
try {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
175
|
+
server.state.release = { version: 2, revision: 4 }
|
|
176
|
+
const answer = await resolver([later])
|
|
177
|
+
expect(hasFigure(later)).to.equal(false)
|
|
178
|
+
expect(answer!.refused.map(r => r.type)).to.deep.equal([later])
|
|
179
|
+
expect(changed).to.deep.equal({ was: { map: 'CANDIDATE', version: 2, revision: 3 }, now: { map: 'CANDIDATE', version: 2, revision: 4 } })
|
|
180
|
+
expect(figureMapReleaseOfPage()).to.deep.equal({ map: 'CANDIDATE', version: 2, revision: 3 })
|
|
181
|
+
} finally {
|
|
182
|
+
window.removeEventListener(FIGURE_TYPE_MAP_CHANGED, listen)
|
|
162
183
|
}
|
|
163
|
-
|
|
164
|
-
expect(rejected).to.equal(false)
|
|
165
|
-
expect(hasFigure('EQ_NOT_PUBLISHED')).to.equal(false)
|
|
166
184
|
})
|
|
167
185
|
|
|
168
|
-
it('
|
|
169
|
-
const
|
|
186
|
+
it('★ 활성 맵과 후보 맵의 등록을 한 페이지에서 섞지 않는다', async () => {
|
|
187
|
+
const active = name('active')
|
|
188
|
+
const preview = name('preview')
|
|
189
|
+
const server = serverOf({ [active]: figureAssetOf(active), [preview]: figureAssetOf(preview) }, { version: 1, revision: 1 })
|
|
190
|
+
const resolver = createFigureResolver(server.fetch)
|
|
170
191
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
await createFigureResolver(fetch)(['EQ_BESIDE_BROKEN', 'EQ_BROKEN'])
|
|
174
|
-
} catch (error) {
|
|
175
|
-
message = error instanceof Error ? error.message : String(error)
|
|
176
|
-
}
|
|
192
|
+
await resolver([active])
|
|
193
|
+
expect(figureMapReleaseOfPage()).to.deep.equal({ map: 'ACTIVE', version: 1, revision: 1 })
|
|
177
194
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
195
|
+
setFigureMapChoice('CANDIDATE')
|
|
196
|
+
const answer = await resolver([preview])
|
|
197
|
+
|
|
198
|
+
expect(server.asked.map(a => a.map)).to.deep.equal(['ACTIVE', 'CANDIDATE'])
|
|
199
|
+
expect(hasFigure(preview)).to.equal(false)
|
|
200
|
+
expect(answer!.refused.map(r => r.type)).to.deep.equal([preview])
|
|
181
201
|
})
|
|
182
202
|
|
|
183
|
-
it('
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
203
|
+
it('맵 릴리스가 없는 서버(저작 서버의 최신 정책)는 기억하지 않는다', async () => {
|
|
204
|
+
const a = name('a')
|
|
205
|
+
const b = name('b')
|
|
206
|
+
const server = serverOf({ [a]: figureAssetOf(a), [b]: figureAssetOf(b) }, null)
|
|
207
|
+
const resolver = createFigureResolver(server.fetch)
|
|
188
208
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
await createFigureResolver(fetch)(['EQ_BESIDE_MALFORMED', 'EQ_MALFORMED'])
|
|
192
|
-
} catch (error) {
|
|
193
|
-
message = error instanceof Error ? error.message : String(error)
|
|
194
|
-
}
|
|
209
|
+
await resolver([a])
|
|
210
|
+
await resolver([b])
|
|
195
211
|
|
|
196
|
-
expect(
|
|
197
|
-
expect(hasFigure(
|
|
198
|
-
expect(hasFigure(
|
|
212
|
+
expect(figureMapReleaseOfPage()).to.equal(null)
|
|
213
|
+
expect(hasFigure(a)).to.equal(true)
|
|
214
|
+
expect(hasFigure(b)).to.equal(true)
|
|
199
215
|
})
|
|
200
216
|
|
|
201
|
-
it('씬의 자리에 앉아 동작한다 —
|
|
202
|
-
const
|
|
203
|
-
const
|
|
217
|
+
it('씬의 자리에 앉아 동작한다 — 받은 것은 그려지고 나머지는 자리표시로 남는다', async () => {
|
|
218
|
+
const onBoard = name('on-board')
|
|
219
|
+
const never = name('never')
|
|
220
|
+
const { fetch } = serverOf({ [onBoard]: figureAssetOf(onBoard) })
|
|
221
|
+
const takeBack = registerTypeResolver(createFigureResolver(fetch) as never)
|
|
204
222
|
|
|
205
223
|
try {
|
|
206
224
|
const model = {
|
|
207
225
|
type: 'container',
|
|
208
226
|
components: [
|
|
209
|
-
{ type:
|
|
210
|
-
{ type:
|
|
227
|
+
{ type: onBoard, left: 0, top: 0, width: 100, height: 100 },
|
|
228
|
+
{ type: never, left: 0, top: 0, width: 100, height: 100 }
|
|
211
229
|
]
|
|
212
230
|
}
|
|
213
|
-
|
|
214
231
|
const resolution = await resolveUnknownTypes(model)
|
|
215
|
-
|
|
216
|
-
expect(resolution.unresolved).to.deep.equal(['EQ_NEVER_PUBLISHED'])
|
|
232
|
+
expect(resolution.unresolved).to.deep.equal([never])
|
|
217
233
|
expect(resolution.failed).to.deep.equal([])
|
|
218
|
-
expect(hasFigure(
|
|
234
|
+
expect(hasFigure(onBoard)).to.equal(true)
|
|
219
235
|
} finally {
|
|
220
236
|
takeBack()
|
|
221
237
|
}
|
package/translations/en.json
CHANGED
|
@@ -36,5 +36,6 @@
|
|
|
36
36
|
"label.list": "list",
|
|
37
37
|
"label.visibility-domain": "public in group",
|
|
38
38
|
"label.visibility-private": "private",
|
|
39
|
-
"label.visibility-public": "public"
|
|
39
|
+
"label.visibility-public": "public",
|
|
40
|
+
"text.figure-type-map-changed": "the type map changed. reopen to draw it."
|
|
40
41
|
}
|
package/translations/ja.json
CHANGED
package/translations/ko.json
CHANGED