Skip to content

Commit a5b92e5

Browse files
author
Dennis Labordus
committed
Added test for new menu options of CoMPAS
Signed-off-by: Dennis Labordus <[email protected]>
1 parent c334a9d commit a5b92e5

File tree

3 files changed

+71
-21
lines changed

3 files changed

+71
-21
lines changed

RELEASE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ For information about CoMPAS go to this [site](https://com-pas.github.io/).
1010

1111
## Release notes
1212

13+
### Release 0.14.1
14+
15+
Next release for testing the CoMPAS System with all components.
16+
- [OpenSCD CoMPAS Edition](https://github.com/com-pas/compas-open-scd) (Version 0.24.0.4):
17+
- Save current project as version to an existing SCL File in CoMPAS;
18+
- Switch to other base image (Bitnami) for container image;
19+
1320
### Release 0.14.0
1421

1522
Next release for testing the CoMPAS System with all components.

integration-testing/TestSuite001-basic-compas.robot

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,24 @@
55
*** Settings ***
66
Documentation Basic test cases for opening and saving SCL files to/from Local File and CoMPAS.
77
Resource ./include/general-compas.robot
8+
Resource include/general-compas.robot
89

910
Test Setup Initialize and Start OpenSCD
1011
Test Teardown Make screenshot and Stop OpenSCD
1112

1213
*** Test Cases ***
1314
TestCase001-01
1415
[Documentation] Open project from Local File
15-
Set Test Variable ${sclname} MiniGrid
16-
Set Test Variable ${scltype} SCD
17-
1816
Open Menu Open project
19-
Open local file ${sclname} ${scltype}
17+
Open local file MiniGrid SCD
2018

2119
Select Tab Substation
2220
Get Text ${substation-editor-selector} section > h1:has-text("Sub1")
2321

2422
TestCase001-02
2523
[Documentation] Open project from Local File and Add to CoMPAS
26-
Set Test Variable ${sclname} MiniGrid
27-
Set Test Variable ${scltype} SCD
28-
2924
Open Menu Open project
30-
Open local file ${sclname} ${scltype}
25+
Open local file MiniGrid SCD
3126

3227
Set Test Variable ${sclname} ${TEST NAME}
3328
Set Test Variable ${scltype} CID
@@ -41,11 +36,8 @@ TestCase001-02
4136
TestCase001-03
4237
[Documentation] Open project from CoMPAS
4338
# First we need to add a project to CoMPAS to be able to open it from CoMPAS.
44-
Set Test Variable ${sclname} MiniGrid
45-
Set Test Variable ${scltype} SCD
46-
4739
Open Menu Open project
48-
Open local file ${sclname} ${scltype}
40+
Open local file MiniGrid SCD
4941

5042
Set Test Variable ${sclname} ${TEST NAME}
5143
Set Test Variable ${scltype} CID
@@ -65,11 +57,8 @@ TestCase001-03
6557
TestCase001-04
6658
[Documentation] Open project from CoMPAS and Save to Local File
6759
# First we need to add a project to CoMPAS to be able to open it from CoMPAS.
68-
Set Test Variable ${sclname} MiniGrid
69-
Set Test Variable ${scltype} SCD
70-
7160
Open Menu Open project
72-
Open local file ${sclname} ${scltype}
61+
Open local file MiniGrid SCD
7362

7463
Set Test Variable ${sclname} ${TEST NAME}
7564
Set Test Variable ${scltype} CID
@@ -81,13 +70,43 @@ TestCase001-04
8170
Save to local file ${sclname} ${scltype}
8271

8372
TestCase001-05
73+
[Documentation] Save a existing project from CoMPAS as new project
74+
# First we need to add a project to CoMPAS to be able to open it from CoMPAS.
75+
Open Menu Open project
76+
Open local file MiniGrid SCD
77+
78+
Set Test Variable ${sclname} ${TEST NAME}
79+
Set Test Variable ${scltype} CID
80+
81+
Open Menu Save project
82+
Add to CoMPAS MiniGrid ${sclname} ${scltype} 1.0.0
83+
84+
Open Menu Save project as
85+
Save as to CoMPAS ${sclname}-${current-date}-1.0.0 ${sclname}-as ${scltype} 1.0.0
86+
87+
TestCase001-06
88+
[Documentation] Save local project as new version to existing project in CoMPAS
89+
# First we need to add a project to CoMPAS to be able to open it from CoMPAS.
90+
Open Menu Open project
91+
Open local file MiniGrid SCD
92+
93+
Set Test Variable ${sclname} ${TEST NAME}
94+
Set Test Variable ${scltype} CID
95+
96+
Open Menu Save project
97+
Add to CoMPAS MiniGrid ${sclname} ${scltype} 1.0.0
98+
99+
Open Menu Open project
100+
Open local file MiniGrid SCD
101+
102+
Open Menu Save as version
103+
Save version to CoMPAS MINOR ${sclname} ${scltype} 1.1.0
104+
105+
TestCase001-10
84106
[Documentation] Trying saving local file to CoMPAS with invalid name
85107
# First we will open the local file to be saved.
86-
Set Test Variable ${sclname} MiniGrid
87-
Set Test Variable ${scltype} SCD
88-
89108
Open Menu Open project
90-
Open local file ${sclname} ${scltype}
109+
Open local file MiniGrid SCD
91110

92111
# Try saving the file with a invalid name
93112
Set Test Variable ${sclname} invalid/*name
@@ -107,4 +126,3 @@ TestCase001-05
107126
# Check if the expected error message is found
108127
Set Test Variable ${secondaryMessage} ApplicationError: Name is not a correct name to be used later as filename. (CORE-8000) (400)
109128
Check CoMPAS Error ${secondaryMessage}
110-

integration-testing/include/general-compas.robot

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@ Add to CoMPAS
3030
# check if the title (filename) changed to the new expected one.
3131
Check Title Filename ${name}-${current-date}-${expectedVersion} ${type}
3232

33+
Save as to CoMPAS
34+
[Arguments] ${initialValue} ${name} ${type} ${expectedVersion}
35+
# Make sure the initial value is entered. so we can continue.
36+
Get Text mwc-dialog#compas-save-as-dlg > compas-save mwc-textfield#name label > input == ${initialValue}
37+
Fill Text mwc-dialog#compas-save-as-dlg > compas-save mwc-textfield#name label > input ${name}-${current-date}
38+
Click mwc-dialog#compas-save-as-dlg > compas-save compas-scltype-select mwc-select
39+
Click mwc-dialog#compas-save-as-dlg > compas-save compas-scltype-select mwc-select > mwc-list-item[value="${type.upper()}"]
40+
Click mwc-dialog#compas-save-as-dlg > mwc-button[slot="primaryAction"] > button
41+
Wait for dialog is closed
42+
Close Menu
43+
# check if the title (filename) changed to the new expected one.
44+
Check Title Filename ${name}-${current-date}-${expectedVersion} ${type}
45+
3346
Update in CoMPAS
3447
[Arguments] ${changeType} ${name} ${type} ${expectedVersion}
3548
Click mwc-dialog#compas-save-dlg > compas-save compas-changeset-radiogroup mwc-list > mwc-radio-list-item[value="${changeType.upper()}"]
@@ -39,6 +52,18 @@ Update in CoMPAS
3952
# check if the title (filename) changed to the new expected one.
4053
Check Title Filename ${name}-${current-date}-${expectedVersion} ${type}
4154

55+
Save version to CoMPAS
56+
[Arguments] ${changeType} ${name} ${type} ${expectedVersion}
57+
Click mwc-dialog#compas-save-as-version-dlg > compas-open compas-scltype-list > mwc-list > mwc-list-item >> span:has-text("${type.upper()}")
58+
Click mwc-dialog#compas-save-as-version-dlg > compas-open compas-scl-list > filtered-list > mwc-list-item:has-text("${name}-${current-date}")
59+
Click mwc-dialog#compas-save-as-version-dlg > compas-save compas-changeset-radiogroup mwc-list > mwc-radio-list-item[value="${changeType.upper()}"]
60+
Click mwc-dialog#compas-save-as-version-dlg > mwc-button[slot="primaryAction"] > button
61+
Wait for dialog is closed
62+
Close Menu
63+
# check if the title (filename) changed to the new expected one.
64+
Check Title Filename ${name}-${current-date}-${expectedVersion} ${type}
65+
66+
4267
Change Websockets setting
4368
[Arguments] ${checked}
4469
Open Menu CoMPAS Settings

0 commit comments

Comments
 (0)