|
| 1 | +# SPDX-FileCopyrightText: 2021 Alliander N.V. |
| 2 | +# |
| 3 | +# SPDX-License-Identifier: Apache-2.0 |
| 4 | + |
| 5 | +*** Settings *** |
| 6 | +Documentation Basic test cases for executing the SCL Auto Alignment Service. |
| 7 | +Resource ./include/general-compas.robot |
| 8 | + |
| 9 | +Test Setup Initialize and Start OpenSCD |
| 10 | +Test Teardown Make screenshot and Stop OpenSCD |
| 11 | + |
| 12 | +*** Variables *** |
| 13 | +${substation1VoltageLevel} _af9a4ae3-ba2e-4c34-8e47-5af894ee20f4>S1 110kV |
| 14 | +${substation3VoltageLevel} _974565b1-ac55-4901-9f48-afc7ef5486df>S3 110kV |
| 15 | + |
| 16 | +*** Keywords *** |
| 17 | +Execute SCL Auto Alignment |
| 18 | + [Arguments] @{substationNames} |
| 19 | + Open Menu Auto Align SLD |
| 20 | + FOR ${substationName} IN @{substationNames} |
| 21 | + Check Checkbox ${dialog-selector} compas-auto-alignment section#substationsToAlign > mwc-list > mwc-check-list-item:has-text("${substationName}") input[type="checkbox"] |
| 22 | + END |
| 23 | + Click ${dialog-selector} mwc-button[slot="primaryAction"] > button |
| 24 | + Wait for dialog is closed |
| 25 | + Close Menu |
| 26 | + |
| 27 | +Check X/Y Coordinates |
| 28 | + [Arguments] ${id} ${x} ${y} |
| 29 | + Get Attribute single-line-diagram-plugin svg > g[id="${id}"] sxy:x == ${x} |
| 30 | + Get Attribute single-line-diagram-plugin svg > g[id="${id}"] sxy:y == ${y} |
| 31 | + |
| 32 | +*** Test Cases *** |
| 33 | +TestCase004-01 |
| 34 | + [Documentation] Execute the SCL Auto Alignment for a single Substation. |
| 35 | + Set Test Variable ${sclname} MiniGrid |
| 36 | + Set Test Variable ${scltype} SCD |
| 37 | + |
| 38 | + Enable Extension Single Line Diagram |
| 39 | + Enable Extension Auto Align SLD |
| 40 | + |
| 41 | + Open Menu Open project |
| 42 | + Open local file ${sclname} ${scltype} |
| 43 | + |
| 44 | + Execute SCL Auto Alignment Sub1 |
| 45 | + |
| 46 | + Select Tab Single Line Diagram |
| 47 | + Check X/Y Coordinates ${substation1VoltageLevel} 36 10 |
| 48 | + Check X/Y Coordinates ${substation3VoltageLevel} 0 0 |
| 49 | + |
| 50 | +TestCase004-02 |
| 51 | + [Documentation] Execute the SCL Auto Alignment for a multiple Substation. |
| 52 | + Set Test Variable ${sclname} MiniGrid |
| 53 | + Set Test Variable ${scltype} SCD |
| 54 | + |
| 55 | + Enable Extension Single Line Diagram |
| 56 | + Enable Extension Auto Align SLD |
| 57 | + |
| 58 | + Open Menu Open project |
| 59 | + Open local file ${sclname} ${scltype} |
| 60 | + |
| 61 | + Execute SCL Auto Alignment Sub1 Sub3 |
| 62 | + |
| 63 | + Select Tab Single Line Diagram |
| 64 | + Check X/Y Coordinates ${substation1VoltageLevel} 36 10 |
| 65 | + Check X/Y Coordinates ${substation3VoltageLevel} 12 8 |
| 66 | + |
0 commit comments