Skip to content

Commit b434567

Browse files
author
Dennis Labordus
committed
Added Validator tests for REST API beside Websockets.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 9eb4d67 commit b434567

File tree

2 files changed

+50
-4
lines changed

2 files changed

+50
-4
lines changed

integration-testing/TestSuite005-validator.robot

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ TestCase005-01
2121
Set Test Variable ${sclname} SingleSubstation
2222
Set Test Variable ${scltype} SCD
2323

24-
Open Menu Open project
25-
Open local file ${sclname} ${scltype}
24+
Change Websockets setting True
25+
Open Menu Open project
26+
Open local file ${sclname} ${scltype}
2627

2728
Execute SCL Validator
2829

@@ -32,12 +33,45 @@ TestCase005-01
3233
Get Element Count mwc-dialog#diagnostic > filtered-list > abbr == 332
3334

3435
TestCase005-02
36+
[Documentation] Execute the SCL Validator (REST API) with OCL Validation Errros.
37+
Set Test Variable ${sclname} SingleSubstation
38+
Set Test Variable ${scltype} SCD
39+
40+
Change Websockets setting False
41+
Open Menu Open project
42+
Open local file ${sclname} ${scltype}
43+
44+
Execute SCL Validator
45+
46+
Open Menu View diagnostics
47+
Get Text mwc-dialog#diagnostic > filtered-list > mwc-list-item:nth-child(4) == Validate using OCL
48+
Get Attribute mwc-dialog#diagnostic > filtered-list > abbr:nth-child(6) title *= [SCD File] DataTypeTemplates section is mandatory (line 1)
49+
Get Element Count mwc-dialog#diagnostic > filtered-list > abbr == 332
50+
51+
TestCase005-03
3552
[Documentation] Execute the SCL Validator (Websockets) with XSD Validation Errors.
3653
Set Test Variable ${sclname} XsdValidationErrors
3754
Set Test Variable ${scltype} SCD
3855

39-
Open Menu Open project
40-
Open local file ${sclname} ${scltype}
56+
Change Websockets setting True
57+
Open Menu Open project
58+
Open local file ${sclname} ${scltype}
59+
60+
Execute SCL Validator
61+
62+
Open Menu View diagnostics
63+
Get Text mwc-dialog#diagnostic > filtered-list > mwc-list-item:nth-child(12) == Validate using OCL
64+
Get Attribute mwc-dialog#diagnostic > filtered-list > abbr:nth-child(14) title *= [XSD validation] (line: 32, column: 47): cvc-complex-type.4: Attribute 'type' must appear on element 'DO'.
65+
Get Element Count mwc-dialog#diagnostic > filtered-list > abbr == 11
66+
67+
TestCase005-04
68+
[Documentation] Execute the SCL Validator (REST API) with XSD Validation Errors.
69+
Set Test Variable ${sclname} XsdValidationErrors
70+
Set Test Variable ${scltype} SCD
71+
72+
Change Websockets setting False
73+
Open Menu Open project
74+
Open local file ${sclname} ${scltype}
4175

4276
Execute SCL Validator
4377

integration-testing/include/general-compas.robot

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,15 @@ Update in CoMPAS
4141
# check if the title (filename) changed to the new expected one. This way we know we can close the menu.
4242
Check Title Filename ${sclname}-${current-date}-${expectedVersion} ${scltype}
4343
Close Menu
44+
45+
Change Websockets setting
46+
[Arguments] ${checked}
47+
Open Menu CoMPAS Settings
48+
IF ${checked} == True
49+
Check Checkbox ${dialog-selector} compas-settings mwc-switch#useWebsockets #basic-switch
50+
ELSE
51+
Uncheck Checkbox ${dialog-selector} compas-settings mwc-switch#useWebsockets #basic-switch
52+
END
53+
Click ${dialog-selector} mwc-button[slot="primaryAction"] > button
54+
Wait for dialog is closed
55+
Close Menu

0 commit comments

Comments
 (0)