mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-17 16:50:30 +03:00
test(mxl): покрыть настройки элемента управления кейсами и проверкой
Ключ control возился дословно, но проверялся только косвенно — через платформенную фикстуру стенда. Теперь у него свои кейсы на обе стороны (сборка блоба из DSL и раундтрип), строка в описании ячейки с пометкой «раундтрип, не для ручного авторинга» и проверка в валидаторе: значение и настройки элемента управления бывают только у ячейки-поля ввода — на корпусе ни одного вхождения в обычной ячейке. Проверки ячеек со значением заодно перестали зависеть от наличия таких форматов в макете: раньше блок целиком пропускался, когда ни одного формата с признаком значения нет, — то есть ровно в том случае, который эта проверка и ловит. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
43d2f660da
commit
8770ef940b
@@ -152,7 +152,8 @@
|
|||||||
| `{ ... }` | Обычная ячейка **без** `col`; нужна для `style`, `detail`, `template` |
|
| `{ ... }` | Обычная ячейка **без** `col`; нужна для `style`, `detail`, `template` |
|
||||||
|
|
||||||
Объект-элемент трактуется по его ключам: если среди них есть ключ ячейки (`span`, `rowspan`,
|
Объект-элемент трактуется по его ключам: если среди них есть ключ ячейки (`span`, `rowspan`,
|
||||||
`style`, `param`, `detail`, `text`, `template`, `valueType`, `controlType`, `value`) — объект
|
`style`, `param`, `detail`, `text`, `template`, `valueType`, `controlType`, `value`,
|
||||||
|
`control`) — объект
|
||||||
описывает
|
описывает
|
||||||
свойства ячейки. Иначе он целиком считается её текстом, а его ключи — идентификаторами языков.
|
свойства ячейки. Иначе он целиком считается её текстом, а его ключи — идентификаторами языков.
|
||||||
|
|
||||||
@@ -186,6 +187,7 @@
|
|||||||
| `valueType` | нет | — | Тип значения: ячейка становится полем ввода (см. ниже) |
|
| `valueType` | нет | — | Тип значения: ячейка становится полем ввода (см. ниже) |
|
||||||
| `controlType` | нет | `input` | Элемент управления поля ввода: `input` или `checkbox`. Только вместе с `valueType` |
|
| `controlType` | нет | `input` | Элемент управления поля ввода: `input` или `checkbox`. Только вместе с `valueType` |
|
||||||
| `value` | нет | — | Значение в поле ввода. Только вместе с `valueType` |
|
| `value` | нет | — | Значение в поле ввода. Только вместе с `valueType` |
|
||||||
|
| `control` | нет | — | Настройки элемента управления в записи платформы (base64). Раундтрип, не для ручного авторинга |
|
||||||
|
|
||||||
### Содержимое ячейки
|
### Содержимое ячейки
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# mxl-validate v1.3 — Validate 1C spreadsheet
|
# mxl-validate v1.4 — Validate 1C spreadsheet
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
param(
|
param(
|
||||||
[Alias('Path')]
|
[Alias('Path')]
|
||||||
@@ -449,43 +449,53 @@ for ($i = 0; $i -lt $formatNodes.Count; $i++) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($ri in $root.SelectNodes("d:rowsItem", $nsMgr)) {
|
||||||
|
if ($stopped) { break }
|
||||||
|
$row = $ri.SelectSingleNode("d:row", $nsMgr)
|
||||||
|
if (-not $row) { continue }
|
||||||
|
$idxNode = $ri.SelectSingleNode("d:index", $nsMgr)
|
||||||
|
$rn = if ($idxNode) { $idxNode.InnerText } else { '?' }
|
||||||
|
$rowFmt = $row.SelectSingleNode("d:formatIndex", $nsMgr)
|
||||||
|
if ($rowFmt -and $valueFormatIdx.ContainsKey([int]$rowFmt.InnerText)) {
|
||||||
|
Report-Warn "Row ${rn}: formatIndex points to a value format (cell-only property)"
|
||||||
|
}
|
||||||
|
foreach ($cGroup in $row.SelectNodes("d:c", $nsMgr)) {
|
||||||
|
$cell = $cGroup.SelectSingleNode("d:c", $nsMgr)
|
||||||
|
if (-not $cell) { continue }
|
||||||
|
$fNode = $cell.SelectSingleNode("d:f", $nsMgr)
|
||||||
|
if (-not $fNode -or -not $valueFormatIdx.ContainsKey([int]$fNode.InnerText)) {
|
||||||
|
# Значение и настройки элемента управления бывают только у ячейки-поля ввода:
|
||||||
|
# на корпусе ни одного <v> и ни одного <control> в обычной ячейке.
|
||||||
|
if ($cell.SelectSingleNode("d:v", $nsMgr)) {
|
||||||
|
Report-Error "Row ${rn}: cell carries value but its format has no containsValue"
|
||||||
|
}
|
||||||
|
if ($cell.SelectSingleNode("d:control", $nsMgr)) {
|
||||||
|
Report-Error "Row ${rn}: cell carries control settings but its format has no containsValue"
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if ($cell.SelectSingleNode("d:tl", $nsMgr)) {
|
||||||
|
Report-Error "Row ${rn}: cell contains a value and text at the same time"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach ($cols in $root.SelectNodes("d:columns", $nsMgr)) {
|
||||||
|
foreach ($ci in $cols.SelectNodes("d:columnsItem", $nsMgr)) {
|
||||||
|
$col = $ci.SelectSingleNode("d:column", $nsMgr)
|
||||||
|
if (-not $col) { continue }
|
||||||
|
$fmtNode = $col.SelectSingleNode("d:formatIndex", $nsMgr)
|
||||||
|
if ($fmtNode -and $valueFormatIdx.ContainsKey([int]$fmtNode.InnerText)) {
|
||||||
|
$colIdxNode = $ci.SelectSingleNode("d:index", $nsMgr)
|
||||||
|
$colIdxText = if ($colIdxNode) { $colIdxNode.InnerText } else { '?' }
|
||||||
|
Report-Warn "Column ${colIdxText}: formatIndex points to a value format (cell-only property)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$dfi = $root.SelectSingleNode("d:defaultFormatIndex", $nsMgr)
|
||||||
|
if ($dfi -and $valueFormatIdx.ContainsKey([int]$dfi.InnerText)) {
|
||||||
|
Report-Warn "defaultFormatIndex points to a value format (cell-only property)"
|
||||||
|
}
|
||||||
if ($valueFormatIdx.Count -gt 0) {
|
if ($valueFormatIdx.Count -gt 0) {
|
||||||
foreach ($ri in $root.SelectNodes("d:rowsItem", $nsMgr)) {
|
|
||||||
if ($stopped) { break }
|
|
||||||
$row = $ri.SelectSingleNode("d:row", $nsMgr)
|
|
||||||
if (-not $row) { continue }
|
|
||||||
$idxNode = $ri.SelectSingleNode("d:index", $nsMgr)
|
|
||||||
$rn = if ($idxNode) { $idxNode.InnerText } else { '?' }
|
|
||||||
$rowFmt = $row.SelectSingleNode("d:formatIndex", $nsMgr)
|
|
||||||
if ($rowFmt -and $valueFormatIdx.ContainsKey([int]$rowFmt.InnerText)) {
|
|
||||||
Report-Warn "Row ${rn}: formatIndex points to a value format (cell-only property)"
|
|
||||||
}
|
|
||||||
foreach ($cGroup in $row.SelectNodes("d:c", $nsMgr)) {
|
|
||||||
$cell = $cGroup.SelectSingleNode("d:c", $nsMgr)
|
|
||||||
if (-not $cell) { continue }
|
|
||||||
$fNode = $cell.SelectSingleNode("d:f", $nsMgr)
|
|
||||||
if (-not $fNode -or -not $valueFormatIdx.ContainsKey([int]$fNode.InnerText)) { continue }
|
|
||||||
if ($cell.SelectSingleNode("d:tl", $nsMgr)) {
|
|
||||||
Report-Error "Row ${rn}: cell contains a value and text at the same time"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($cols in $root.SelectNodes("d:columns", $nsMgr)) {
|
|
||||||
foreach ($ci in $cols.SelectNodes("d:columnsItem", $nsMgr)) {
|
|
||||||
$col = $ci.SelectSingleNode("d:column", $nsMgr)
|
|
||||||
if (-not $col) { continue }
|
|
||||||
$fmtNode = $col.SelectSingleNode("d:formatIndex", $nsMgr)
|
|
||||||
if ($fmtNode -and $valueFormatIdx.ContainsKey([int]$fmtNode.InnerText)) {
|
|
||||||
$colIdxNode = $ci.SelectSingleNode("d:index", $nsMgr)
|
|
||||||
$colIdxText = if ($colIdxNode) { $colIdxNode.InnerText } else { '?' }
|
|
||||||
Report-Warn "Column ${colIdxText}: formatIndex points to a value format (cell-only property)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$dfi = $root.SelectSingleNode("d:defaultFormatIndex", $nsMgr)
|
|
||||||
if ($dfi -and $valueFormatIdx.ContainsKey([int]$dfi.InnerText)) {
|
|
||||||
Report-Warn "defaultFormatIndex points to a value format (cell-only property)"
|
|
||||||
}
|
|
||||||
Report-OK "Value cells: $($valueFormatIdx.Count) value formats"
|
Report-OK "Value cells: $($valueFormatIdx.Count) value formats"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# mxl-validate v1.3 — Validate 1C spreadsheet document Template.xml
|
# mxl-validate v1.4 — Validate 1C spreadsheet document Template.xml
|
||||||
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
|
||||||
"""Validates spreadsheet Template.xml: height, palette refs, column/row indices, areas, merges."""
|
"""Validates spreadsheet Template.xml: height, palette refs, column/row indices, areas, merges."""
|
||||||
import sys, os, argparse
|
import sys, os, argparse
|
||||||
@@ -430,40 +430,61 @@ def main():
|
|||||||
if kinds != ['xs:boolean'] and kinds != ['xs:decimal']:
|
if kinds != ['xs:boolean'] and kinds != ['xs:decimal']:
|
||||||
r.warn(f'Format {i}: checkbox control on a type other than Boolean or Number')
|
r.warn(f'Format {i}: checkbox control on a type other than Boolean or Number')
|
||||||
|
|
||||||
if value_format_idx:
|
for ri in root.findall(f'{{{NS_D}}}rowsItem'):
|
||||||
for ri in root.findall(f'{{{NS_D}}}rowsItem'):
|
if r.stopped:
|
||||||
if r.stopped:
|
break
|
||||||
break
|
row = ri.find(f'{{{NS_D}}}row')
|
||||||
row = ri.find(f'{{{NS_D}}}row')
|
if row is None:
|
||||||
if row is None:
|
continue
|
||||||
|
idx_node = ri.find(f'{{{NS_D}}}index')
|
||||||
|
rn = idx_node.text if idx_node is not None else '?'
|
||||||
|
row_fmt = row.find(f'{{{NS_D}}}formatIndex')
|
||||||
|
if row_fmt is not None and row_fmt.text and int(row_fmt.text) in value_format_idx:
|
||||||
|
r.warn(f'Row {rn}: formatIndex points to a value format (cell-only property)')
|
||||||
|
for c_group in row.findall(f'{{{NS_D}}}c'):
|
||||||
|
cell = c_group.find(f'{{{NS_D}}}c')
|
||||||
|
if cell is None:
|
||||||
continue
|
continue
|
||||||
idx_node = ri.find(f'{{{NS_D}}}index')
|
f_node = cell.find(f'{{{NS_D}}}f')
|
||||||
rn = idx_node.text if idx_node is not None else '?'
|
if f_node is None or not f_node.text or int(f_node.text) not in value_format_idx:
|
||||||
row_fmt = row.find(f'{{{NS_D}}}formatIndex')
|
continue
|
||||||
if row_fmt is not None and row_fmt.text and int(row_fmt.text) in value_format_idx:
|
if cell.find(f'{{{NS_D}}}tl') is not None:
|
||||||
r.warn(f'Row {rn}: formatIndex points to a value format (cell-only property)')
|
r.error(f'Row {rn}: cell contains a value and text at the same time')
|
||||||
for c_group in row.findall(f'{{{NS_D}}}c'):
|
# Значение и настройки элемента управления бывают только у ячейки-поля ввода: на корпусе
|
||||||
cell = c_group.find(f'{{{NS_D}}}c')
|
# ни одного <v> и ни одного <control> в обычной ячейке.
|
||||||
if cell is None:
|
for ri in root.findall(f'{{{NS_D}}}rowsItem'):
|
||||||
continue
|
if r.stopped:
|
||||||
f_node = cell.find(f'{{{NS_D}}}f')
|
break
|
||||||
if f_node is None or not f_node.text or int(f_node.text) not in value_format_idx:
|
row = ri.find(f'{{{NS_D}}}row')
|
||||||
continue
|
if row is None:
|
||||||
if cell.find(f'{{{NS_D}}}tl') is not None:
|
continue
|
||||||
r.error(f'Row {rn}: cell contains a value and text at the same time')
|
idx_node = ri.find(f'{{{NS_D}}}index')
|
||||||
for cols in root.findall(f'{{{NS_D}}}columns'):
|
rn = idx_node.text if idx_node is not None else '?'
|
||||||
for ci in cols.findall(f'{{{NS_D}}}columnsItem'):
|
for c_group in row.findall(f'{{{NS_D}}}c'):
|
||||||
col = ci.find(f'{{{NS_D}}}column')
|
cell = c_group.find(f'{{{NS_D}}}c')
|
||||||
if col is None:
|
if cell is None:
|
||||||
continue
|
continue
|
||||||
fmt_node = col.find(f'{{{NS_D}}}formatIndex')
|
f_node = cell.find(f'{{{NS_D}}}f')
|
||||||
if fmt_node is not None and fmt_node.text and int(fmt_node.text) in value_format_idx:
|
is_value = f_node is not None and f_node.text and int(f_node.text) in value_format_idx
|
||||||
col_idx_node = ci.find(f'{{{NS_D}}}index')
|
if is_value:
|
||||||
col_idx_text = col_idx_node.text if col_idx_node is not None else '?'
|
continue
|
||||||
r.warn(f'Column {col_idx_text}: formatIndex points to a value format (cell-only property)')
|
for tag, what in (('v', 'value'), ('control', 'control settings')):
|
||||||
dfi = root.find(f'{{{NS_D}}}defaultFormatIndex')
|
if cell.find(f'{{{NS_D}}}{tag}') is not None:
|
||||||
if dfi is not None and dfi.text and int(dfi.text) in value_format_idx:
|
r.error(f'Row {rn}: cell carries {what} but its format has no containsValue')
|
||||||
r.warn('defaultFormatIndex points to a value format (cell-only property)')
|
for cols in root.findall(f'{{{NS_D}}}columns'):
|
||||||
|
for ci in cols.findall(f'{{{NS_D}}}columnsItem'):
|
||||||
|
col = ci.find(f'{{{NS_D}}}column')
|
||||||
|
if col is None:
|
||||||
|
continue
|
||||||
|
fmt_node = col.find(f'{{{NS_D}}}formatIndex')
|
||||||
|
if fmt_node is not None and fmt_node.text and int(fmt_node.text) in value_format_idx:
|
||||||
|
col_idx_node = ci.find(f'{{{NS_D}}}index')
|
||||||
|
col_idx_text = col_idx_node.text if col_idx_node is not None else '?'
|
||||||
|
r.warn(f'Column {col_idx_text}: formatIndex points to a value format (cell-only property)')
|
||||||
|
dfi = root.find(f'{{{NS_D}}}defaultFormatIndex')
|
||||||
|
if dfi is not None and dfi.text and int(dfi.text) in value_format_idx:
|
||||||
|
r.warn('defaultFormatIndex points to a value format (cell-only property)')
|
||||||
|
if value_format_idx:
|
||||||
r.ok(f'Value cells: {len(value_format_idx)} value formats')
|
r.ok(f'Value cells: {len(value_format_idx)} value formats')
|
||||||
|
|
||||||
# --- Finalize ---
|
# --- Finalize ---
|
||||||
|
|||||||
@@ -152,7 +152,8 @@
|
|||||||
| `{ ... }` | Обычная ячейка **без** `col`; нужна для `style`, `detail`, `template` |
|
| `{ ... }` | Обычная ячейка **без** `col`; нужна для `style`, `detail`, `template` |
|
||||||
|
|
||||||
Объект-элемент трактуется по его ключам: если среди них есть ключ ячейки (`span`, `rowspan`,
|
Объект-элемент трактуется по его ключам: если среди них есть ключ ячейки (`span`, `rowspan`,
|
||||||
`style`, `param`, `detail`, `text`, `template`, `valueType`, `controlType`, `value`) — объект
|
`style`, `param`, `detail`, `text`, `template`, `valueType`, `controlType`, `value`,
|
||||||
|
`control`) — объект
|
||||||
описывает
|
описывает
|
||||||
свойства ячейки. Иначе он целиком считается её текстом, а его ключи — идентификаторами языков.
|
свойства ячейки. Иначе он целиком считается её текстом, а его ключи — идентификаторами языков.
|
||||||
|
|
||||||
@@ -186,6 +187,7 @@
|
|||||||
| `valueType` | нет | — | Тип значения: ячейка становится полем ввода (см. ниже) |
|
| `valueType` | нет | — | Тип значения: ячейка становится полем ввода (см. ниже) |
|
||||||
| `controlType` | нет | `input` | Элемент управления поля ввода: `input` или `checkbox`. Только вместе с `valueType` |
|
| `controlType` | нет | `input` | Элемент управления поля ввода: `input` или `checkbox`. Только вместе с `valueType` |
|
||||||
| `value` | нет | — | Значение в поле ввода. Только вместе с `valueType` |
|
| `value` | нет | — | Значение в поле ввода. Только вместе с `valueType` |
|
||||||
|
| `control` | нет | — | Настройки элемента управления в записи платформы (base64). Раундтрип, не для ручного авторинга |
|
||||||
|
|
||||||
### Содержимое ячейки
|
### Содержимое ячейки
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<languageSettings>
|
||||||
|
<currentLanguage>ru</currentLanguage>
|
||||||
|
<defaultLanguage>ru</defaultLanguage>
|
||||||
|
<languageInfo>
|
||||||
|
<id>ru</id>
|
||||||
|
<code>Русский</code>
|
||||||
|
<description>Русский</description>
|
||||||
|
</languageInfo>
|
||||||
|
</languageSettings>
|
||||||
|
<columns>
|
||||||
|
<size>2</size>
|
||||||
|
</columns>
|
||||||
|
<rowsItem>
|
||||||
|
<index>0</index>
|
||||||
|
<row>
|
||||||
|
<c>
|
||||||
|
<c>
|
||||||
|
<f>1</f>
|
||||||
|
<control xsi:type="xs:base64Binary">77u/MiwxLDM4MWVkNjI0LTkyMTctNGU2My04NWRiLWM0YzNjYjg3ZGFhZSwNCnsN
|
||||||
|
Cns5LA0KeyJQYXR0ZXJuIiwNCnsiUyJ9DQp9LA0Kew0Kew0KezE2LDEsDQp7Myw0
|
||||||
|
LA0KezB9DQp9LA0KezMsNCwNCnswfQ0KfSwNCns3LDMsMCwxLDEwMH0sMCwNCnsz
|
||||||
|
LDQsDQp7MH0NCn0sDQp7Myw0LA0KezB9DQp9LA0KezMsNCwNCnswfQ0KfSwNCnsz
|
||||||
|
LDMsDQp7LTd9DQp9LA0KezMsMywNCnstMjF9DQp9LA0KezMsMSwNCnstMTh9LDAs
|
||||||
|
MCwwfSwNCnsxLDB9LDAsMCwxMDAsMCwwfSwzMCwwLDAsMSwwLDAsMSwxLDEsMCwx
|
||||||
|
LDAsMCwwLDAsMCw0LDAsDQp7IlUifSwNCnsiVSJ9LCIiLDAsMSwwLDAsMCwwLA0K
|
||||||
|
ezQsMCwNCnswfSwiIiwtMSwtMSwxLDAsIiJ9LA0KezQsMCwNCnswfSwiIiwtMSwt
|
||||||
|
MSwxLDAsIiJ9LDAsMCwwLA0KezAsMCwwfSwNCnsxLDB9LDAsMCwwLDAsMCwwLDAs
|
||||||
|
MTY3NzcyMTUsMn0NCn0sDQp7MSwNCns5YTc2NDNkMi0xOWU5LTQ1ZTItODg5My0y
|
||||||
|
ODBiYzkxOTVhOTcsDQp7NCwNCnsiVSJ9LA0KeyJVIn0sMCwiIiwwLDB9DQp9DQp9
|
||||||
|
LA0KezB9LDAsMSwwLA0KezEsMH0sMH0NCn0sMA==</control>
|
||||||
|
</c>
|
||||||
|
</c>
|
||||||
|
<c>
|
||||||
|
<c>
|
||||||
|
<f>1</f>
|
||||||
|
</c>
|
||||||
|
</c>
|
||||||
|
</row>
|
||||||
|
</rowsItem>
|
||||||
|
<templateMode>true</templateMode>
|
||||||
|
<defaultFormatIndex>2</defaultFormatIndex>
|
||||||
|
<height>1</height>
|
||||||
|
<vgRows>1</vgRows>
|
||||||
|
<namedItem xsi:type="NamedItemCells">
|
||||||
|
<name>Настройки</name>
|
||||||
|
<area>
|
||||||
|
<type>Rows</type>
|
||||||
|
<beginRow>0</beginRow>
|
||||||
|
<endRow>0</endRow>
|
||||||
|
<beginColumn>-1</beginColumn>
|
||||||
|
<endColumn>-1</endColumn>
|
||||||
|
</area>
|
||||||
|
</namedItem>
|
||||||
|
<format>
|
||||||
|
<containsValue>true</containsValue>
|
||||||
|
<valueType>
|
||||||
|
<v8:Type>xs:decimal</v8:Type>
|
||||||
|
<v8:NumberQualifiers>
|
||||||
|
<v8:Digits>10</v8:Digits>
|
||||||
|
<v8:FractionDigits>2</v8:FractionDigits>
|
||||||
|
<v8:AllowedSign>Any</v8:AllowedSign>
|
||||||
|
</v8:NumberQualifiers>
|
||||||
|
</valueType>
|
||||||
|
<controlType>35af3d93-d7c7-4a2e-a8eb-bac87a1a3f26</controlType>
|
||||||
|
</format>
|
||||||
|
<format>
|
||||||
|
<width>10</width>
|
||||||
|
</format>
|
||||||
|
</document>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"name": "Ячейка-поле ввода: настройки элемента управления",
|
||||||
|
"input": {
|
||||||
|
"columns": 2,
|
||||||
|
"areas": [
|
||||||
|
{
|
||||||
|
"name": "Настройки",
|
||||||
|
"rows": [
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"col": 1,
|
||||||
|
"valueType": "Number(10,2)",
|
||||||
|
"controlType": "checkbox",
|
||||||
|
"control": "77u/MiwxLDM4MWVkNjI0LTkyMTctNGU2My04NWRiLWM0YzNjYjg3ZGFhZSwNCnsN\nCns5LA0KeyJQYXR0ZXJuIiwNCnsiUyJ9DQp9LA0Kew0Kew0KezE2LDEsDQp7Myw0\nLA0KezB9DQp9LA0KezMsNCwNCnswfQ0KfSwNCns3LDMsMCwxLDEwMH0sMCwNCnsz\nLDQsDQp7MH0NCn0sDQp7Myw0LA0KezB9DQp9LA0KezMsNCwNCnswfQ0KfSwNCnsz\nLDMsDQp7LTd9DQp9LA0KezMsMywNCnstMjF9DQp9LA0KezMsMSwNCnstMTh9LDAs\nMCwwfSwNCnsxLDB9LDAsMCwxMDAsMCwwfSwzMCwwLDAsMSwwLDAsMSwxLDEsMCwx\nLDAsMCwwLDAsMCw0LDAsDQp7IlUifSwNCnsiVSJ9LCIiLDAsMSwwLDAsMCwwLA0K\nezQsMCwNCnswfSwiIiwtMSwtMSwxLDAsIiJ9LA0KezQsMCwNCnswfSwiIiwtMSwt\nMSwxLDAsIiJ9LDAsMCwwLA0KezAsMCwwfSwNCnsxLDB9LDAsMCwwLDAsMCwwLDAs\nMTY3NzcyMTUsMn0NCn0sDQp7MSwNCns5YTc2NDNkMi0xOWU5LTQ1ZTItODg5My0y\nODBiYzkxOTVhOTcsDQp7NCwNCnsiVSJ9LA0KeyJVIn0sMCwiIiwwLDB9DQp9DQp9\nLA0KezB9LDAsMSwwLA0KezEsMH0sMH0NCn0sMA=="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"col": 2,
|
||||||
|
"valueType": "Number(10,2)",
|
||||||
|
"controlType": "checkbox"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"outputPath": "Template.xml"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"name": "Roundtrip — настройки элемента управления",
|
||||||
|
"preRun": [
|
||||||
|
{
|
||||||
|
"script": "mxl-compile/scripts/mxl-compile",
|
||||||
|
"input": {
|
||||||
|
"columns": 2,
|
||||||
|
"areas": [
|
||||||
|
{
|
||||||
|
"name": "Настройки",
|
||||||
|
"rows": [
|
||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"col": 1,
|
||||||
|
"valueType": "Number(10,2)",
|
||||||
|
"controlType": "checkbox",
|
||||||
|
"control": "77u/MiwxLDM4MWVkNjI0LTkyMTctNGU2My04NWRiLWM0YzNjYjg3ZGFhZSwNCnsN\nCns5LA0KeyJQYXR0ZXJuIiwNCnsiUyJ9DQp9LA0Kew0Kew0KezE2LDEsDQp7Myw0\nLA0KezB9DQp9LA0KezMsNCwNCnswfQ0KfSwNCns3LDMsMCwxLDEwMH0sMCwNCnsz\nLDQsDQp7MH0NCn0sDQp7Myw0LA0KezB9DQp9LA0KezMsNCwNCnswfQ0KfSwNCnsz\nLDMsDQp7LTd9DQp9LA0KezMsMywNCnstMjF9DQp9LA0KezMsMSwNCnstMTh9LDAs\nMCwwfSwNCnsxLDB9LDAsMCwxMDAsMCwwfSwzMCwwLDAsMSwwLDAsMSwxLDEsMCwx\nLDAsMCwwLDAsMCw0LDAsDQp7IlUifSwNCnsiVSJ9LCIiLDAsMSwwLDAsMCwwLA0K\nezQsMCwNCnswfSwiIiwtMSwtMSwxLDAsIiJ9LA0KezQsMCwNCnswfSwiIiwtMSwt\nMSwxLDAsIiJ9LDAsMCwwLA0KezAsMCwwfSwNCnsxLDB9LDAsMCwwLDAsMCwwLDAs\nMTY3NzcyMTUsMn0NCn0sDQp7MSwNCns5YTc2NDNkMi0xOWU5LTQ1ZTItODg5My0y\nODBiYzkxOTVhOTcsDQp7NCwNCnsiVSJ9LA0KeyJVIn0sMCwiIiwwLDB9DQp9DQp9\nLA0KezB9LDAsMSwwLA0KezEsMH0sMH0NCn0sMA=="
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"col": 2,
|
||||||
|
"valueType": "Number(10,2)",
|
||||||
|
"controlType": "checkbox"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"args": {
|
||||||
|
"-JsonPath": "{inputFile}",
|
||||||
|
"-OutputPath": "Template.xml"
|
||||||
|
},
|
||||||
|
"cwd": "{workDir}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": {
|
||||||
|
"templatePath": "Template.xml"
|
||||||
|
},
|
||||||
|
"args_extra": [
|
||||||
|
"-OutputPath",
|
||||||
|
"{workDir}/back.json"
|
||||||
|
],
|
||||||
|
"expect": {
|
||||||
|
"files": [
|
||||||
|
"back.json"
|
||||||
|
],
|
||||||
|
"stdoutContains": "[OK] Decompiled:"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<languageSettings>
|
||||||
|
<currentLanguage>ru</currentLanguage>
|
||||||
|
<defaultLanguage>ru</defaultLanguage>
|
||||||
|
<languageInfo>
|
||||||
|
<id>ru</id>
|
||||||
|
<code>Русский</code>
|
||||||
|
<description>Русский</description>
|
||||||
|
</languageInfo>
|
||||||
|
</languageSettings>
|
||||||
|
<columns>
|
||||||
|
<size>2</size>
|
||||||
|
</columns>
|
||||||
|
<rowsItem>
|
||||||
|
<index>0</index>
|
||||||
|
<row>
|
||||||
|
<c>
|
||||||
|
<c>
|
||||||
|
<f>1</f>
|
||||||
|
<control xsi:type="xs:base64Binary">77u/MiwxLDM4MWVkNjI0LTkyMTctNGU2My04NWRiLWM0YzNjYjg3ZGFhZSwNCnsN
|
||||||
|
Cns5LA0KeyJQYXR0ZXJuIiwNCnsiUyJ9DQp9LA0Kew0Kew0KezE2LDEsDQp7Myw0
|
||||||
|
LA0KezB9DQp9LA0KezMsNCwNCnswfQ0KfSwNCns3LDMsMCwxLDEwMH0sMCwNCnsz
|
||||||
|
LDQsDQp7MH0NCn0sDQp7Myw0LA0KezB9DQp9LA0KezMsNCwNCnswfQ0KfSwNCnsz
|
||||||
|
LDMsDQp7LTd9DQp9LA0KezMsMywNCnstMjF9DQp9LA0KezMsMSwNCnstMTh9LDAs
|
||||||
|
MCwwfSwNCnsxLDB9LDAsMCwxMDAsMCwwfSwzMCwwLDAsMSwwLDAsMSwxLDEsMCwx
|
||||||
|
LDAsMCwwLDAsMCw0LDAsDQp7IlUifSwNCnsiVSJ9LCIiLDAsMSwwLDAsMCwwLA0K
|
||||||
|
ezQsMCwNCnswfSwiIiwtMSwtMSwxLDAsIiJ9LA0KezQsMCwNCnswfSwiIiwtMSwt
|
||||||
|
MSwxLDAsIiJ9LDAsMCwwLA0KezAsMCwwfSwNCnsxLDB9LDAsMCwwLDAsMCwwLDAs
|
||||||
|
MTY3NzcyMTUsMn0NCn0sDQp7MSwNCns5YTc2NDNkMi0xOWU5LTQ1ZTItODg5My0y
|
||||||
|
ODBiYzkxOTVhOTcsDQp7NCwNCnsiVSJ9LA0KeyJVIn0sMCwiIiwwLDB9DQp9DQp9
|
||||||
|
LA0KezB9LDAsMSwwLA0KezEsMH0sMH0NCn0sMA==</control>
|
||||||
|
</c>
|
||||||
|
</c>
|
||||||
|
<c>
|
||||||
|
<c>
|
||||||
|
<f>1</f>
|
||||||
|
</c>
|
||||||
|
</c>
|
||||||
|
</row>
|
||||||
|
</rowsItem>
|
||||||
|
<templateMode>true</templateMode>
|
||||||
|
<defaultFormatIndex>2</defaultFormatIndex>
|
||||||
|
<height>1</height>
|
||||||
|
<vgRows>1</vgRows>
|
||||||
|
<namedItem xsi:type="NamedItemCells">
|
||||||
|
<name>Настройки</name>
|
||||||
|
<area>
|
||||||
|
<type>Rows</type>
|
||||||
|
<beginRow>0</beginRow>
|
||||||
|
<endRow>0</endRow>
|
||||||
|
<beginColumn>-1</beginColumn>
|
||||||
|
<endColumn>-1</endColumn>
|
||||||
|
</area>
|
||||||
|
</namedItem>
|
||||||
|
<format>
|
||||||
|
<containsValue>true</containsValue>
|
||||||
|
<valueType>
|
||||||
|
<v8:Type>xs:decimal</v8:Type>
|
||||||
|
<v8:NumberQualifiers>
|
||||||
|
<v8:Digits>10</v8:Digits>
|
||||||
|
<v8:FractionDigits>2</v8:FractionDigits>
|
||||||
|
<v8:AllowedSign>Any</v8:AllowedSign>
|
||||||
|
</v8:NumberQualifiers>
|
||||||
|
</valueType>
|
||||||
|
<controlType>35af3d93-d7c7-4a2e-a8eb-bac87a1a3f26</controlType>
|
||||||
|
</format>
|
||||||
|
<format>
|
||||||
|
<width>10</width>
|
||||||
|
</format>
|
||||||
|
</document>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"columns": 2,
|
||||||
|
"defaultWidth": 10,
|
||||||
|
"fonts": {},
|
||||||
|
"styles": {},
|
||||||
|
"areas": [
|
||||||
|
{
|
||||||
|
"name": "Настройки",
|
||||||
|
"rows": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"valueType": "Number(10,2)",
|
||||||
|
"controlType": "checkbox",
|
||||||
|
"control": "77u/MiwxLDM4MWVkNjI0LTkyMTctNGU2My04NWRiLWM0YzNjYjg3ZGFhZSwNCnsN\nCns5LA0KeyJQYXR0ZXJuIiwNCnsiUyJ9DQp9LA0Kew0Kew0KezE2LDEsDQp7Myw0\nLA0KezB9DQp9LA0KezMsNCwNCnswfQ0KfSwNCns3LDMsMCwxLDEwMH0sMCwNCnsz\nLDQsDQp7MH0NCn0sDQp7Myw0LA0KezB9DQp9LA0KezMsNCwNCnswfQ0KfSwNCnsz\nLDMsDQp7LTd9DQp9LA0KezMsMywNCnstMjF9DQp9LA0KezMsMSwNCnstMTh9LDAs\nMCwwfSwNCnsxLDB9LDAsMCwxMDAsMCwwfSwzMCwwLDAsMSwwLDAsMSwxLDEsMCwx\nLDAsMCwwLDAsMCw0LDAsDQp7IlUifSwNCnsiVSJ9LCIiLDAsMSwwLDAsMCwwLA0K\nezQsMCwNCnswfSwiIiwtMSwtMSwxLDAsIiJ9LA0KezQsMCwNCnswfSwiIiwtMSwt\nMSwxLDAsIiJ9LDAsMCwwLA0KezAsMCwwfSwNCnsxLDB9LDAsMCwwLDAsMCwwLDAs\nMTY3NzcyMTUsMn0NCn0sDQp7MSwNCns5YTc2NDNkMi0xOWU5LTQ1ZTItODg5My0y\nODBiYzkxOTVhOTcsDQp7NCwNCnsiVSJ9LA0KeyJVIn0sMCwiIiwwLDB9DQp9DQp9\nLA0KezB9LDAsMSwwLA0KezEsMH0sMH0NCn0sMA=="
|
||||||
|
},
|
||||||
|
{ "valueType": "Number(10,2)", "controlType": "checkbox" }
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "Ошибка: значение и настройки элемента управления у ячейки без признака значения",
|
||||||
|
"setup": "fixture:value-tags-without-flag",
|
||||||
|
"params": { "templatePath": "Template.xml" },
|
||||||
|
"expectError": true,
|
||||||
|
"expect": { "stdoutContains": "but its format has no containsValue" }
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document xmlns="http://v8.1c.ru/8.2/data/spreadsheet" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<languageSettings>
|
||||||
|
<currentLanguage>ru</currentLanguage>
|
||||||
|
<defaultLanguage>ru</defaultLanguage>
|
||||||
|
<languageInfo>
|
||||||
|
<id>ru</id>
|
||||||
|
<code>Русский</code>
|
||||||
|
<description>Русский</description>
|
||||||
|
</languageInfo>
|
||||||
|
</languageSettings>
|
||||||
|
<columns>
|
||||||
|
<size>2</size>
|
||||||
|
</columns>
|
||||||
|
<rowsItem>
|
||||||
|
<index>0</index>
|
||||||
|
<row>
|
||||||
|
<c>
|
||||||
|
<c>
|
||||||
|
<f>0</f>
|
||||||
|
<v xsi:type="xs:string">значение без признака</v>
|
||||||
|
</c>
|
||||||
|
</c>
|
||||||
|
<c>
|
||||||
|
<c>
|
||||||
|
<f>1</f>
|
||||||
|
<control xsi:type="xs:base64Binary">MSwx</control>
|
||||||
|
</c>
|
||||||
|
</c>
|
||||||
|
</row>
|
||||||
|
</rowsItem>
|
||||||
|
<templateMode>true</templateMode>
|
||||||
|
<defaultFormatIndex>1</defaultFormatIndex>
|
||||||
|
<height>1</height>
|
||||||
|
<format>
|
||||||
|
<width>72</width>
|
||||||
|
</format>
|
||||||
|
</document>
|
||||||
Reference in New Issue
Block a user