From bd4cefc2c410700233a4f7ab6519e4fd3baeae12 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 19 Jan 2024 11:20:08 -0300 Subject: [PATCH] [Tests][KiKit Present][Added] Local and File cases --- tests/test_plot/test_misc.py | 24 +++++++++++++++++++ .../kikit_present_file_1.kibot.yaml | 6 ++--- .../kikit_present_local_1.kibot.yaml | 3 ++- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index ebf96a1c6..46efe2faa 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -1926,6 +1926,30 @@ def test_present_1(test_dir): ctx.clean_up(keep_project=True) +@pytest.mark.slow +@pytest.mark.skipif(not context.ki7(), reason="Just testing with 7") +def test_present_2(test_dir): + prj = 'light_control' + ctx = context.TestContext(test_dir, prj, 'kikit_present_local_1', 'Present/Local_1') + ctx.run() + ctx.expect_out_file_d(['boards/light_control-back.svg', 'boards/light_control-front.svg', + 'boards/light_control-gerbers.zip', 'boards/light_control.kicad_pcb', + 'css/styles.css', 'index.html']) + ctx.clean_up(keep_project=True) + + +@pytest.mark.slow +@pytest.mark.skipif(not context.ki7(), reason="Just testing with 7") +def test_present_3(test_dir): + prj = 'light_control' + ctx = context.TestContext(test_dir, prj, 'kikit_present_file_1', 'Present/Files') + ctx.run() + ctx.expect_out_file_d(['boards/light_control-back.png', 'boards/light_control-front.png', + 'boards/light_control-gerbers.png', 'boards/light_control.kicad_pcb', + 'css/styles.css', 'index.html']) + ctx.clean_up(keep_project=True) + + def test_groups_1(test_dir): """ Groups definitions """ prj = 'simple_2layer' # fake diff --git a/tests/yaml_samples/kikit_present_file_1.kibot.yaml b/tests/yaml_samples/kikit_present_file_1.kibot.yaml index c64841ce8..9f11d574c 100644 --- a/tests/yaml_samples/kikit_present_file_1.kibot.yaml +++ b/tests/yaml_samples/kikit_present_file_1.kibot.yaml @@ -12,9 +12,9 @@ outputs: boards: mode: file comment: This is a comment - front_image: pp/front.png - back_image: pp/back.png - gerbers: pp/gerbers.zip + front_image: docs/images/kibot_370x200b.png + back_image: docs/images/kibot_370x200.png + gerbers: docs/images/Esquema.png resources: 'tests/data/silly_project.md' # template: 'default' repository: 'https://github.com/INTI-CMNB/KiBot/' diff --git a/tests/yaml_samples/kikit_present_local_1.kibot.yaml b/tests/yaml_samples/kikit_present_local_1.kibot.yaml index 670520971..a16124760 100644 --- a/tests/yaml_samples/kikit_present_local_1.kibot.yaml +++ b/tests/yaml_samples/kikit_present_local_1.kibot.yaml @@ -14,7 +14,8 @@ outputs: comment: This is a comment name: Light control # back_image: Raytraced - back_image: Blender + # back_image: Blender + back_image: PcbDraw repository: 'https://github.com/INTI-CMNB/KiBot/' - name: PcbDraw