Skip to content

Commit

Permalink
[Test][GUI][Preflights] Force to select the dict versions
Browse files Browse the repository at this point in the history
When we have boolean + dict
  • Loading branch information
set-soft committed Oct 29, 2024
1 parent 294eb68 commit 4c22979
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 8 deletions.
39 changes: 31 additions & 8 deletions tests/GUI/cfg_out/0004.kibot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,45 @@ preflight:
check_fields:
field: References
check_zone_fills: false
draw_fancy_stackup: true
draw_stackup: true
drc: true
erc: true
draw_fancy_stackup:
pos_x: 20
columns:
- width: 20
draw_stackup:
pos_x: 20
columns:
- separator: ','
drc:
schematic_parity: false
format: HTML,RPT
filters:
- filter: preflight.drc.filters.dict
error: lib_symbol_issues
erc:
dir: preflight.erc
format: HTML,RPT
filters:
- filter: preflight.erc.filters.dict
error: lib_symbol_issues
erc_warnings: false
fill_zones: false
filters:
- filter: preflight.filters.filters.dict
error: lib_symbol_issues
ignore_unconnected: false
include_table: true
include_table:
outputs:
- bom_html
- bom_csv
- name: preflight.include_table.outputs.dict
pcb_replace:
date_command: preflight.pcb_replace
replace_tags:
tag: preflight.pcb_replace.replace_tags.dict
run_drc: true
run_erc: true
run_drc:
dir: preflight.run_drc
run_erc:
dir: preflight.run_erc
sch_replace:
date_command: preflight.sch_replace
replace_tags:
Expand All @@ -34,7 +56,8 @@ preflight:
update_pcb_characteristics: false
update_qr: false
update_stackup: false
update_xml: true
update_xml:
check_pcb_parity: true
outputs:
- name: bom_html
comment: Bill of Materials in HTML format
Expand Down
6 changes: 6 additions & 0 deletions tests/test_plot/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ def get_simple(path, items):
if name == 'layer' and path.endswith('.layers.dict'):
# Valid layer name
continue
if name == 'enabled' and path.startswith('preflight.'):
continue
valids = i[1]
if 'DataTypeDict' in valids:
continue
Expand Down Expand Up @@ -449,6 +451,10 @@ def try_all_preflights_recipe(ctx):
name = 'preflight.'+o
# Preflights can embed the first level
if len(c) == 1 and c[0][2] and 'DataTypeDict' in c[0][1]:
if len(c[0][1]) > 1:
# We have multiple data types, ensure the dict is selected
e.set_selection(name+'.'+o+'.choices', c[0][1].index('DataTypeDict'))
e.send_event(name+'.'+o+'.choices', 'EVT_CHOICE')
for_output(e, name, c[0][2])
else:
for_output(e, name, c)
Expand Down

0 comments on commit 4c22979

Please sign in to comment.