@@ -22,37 +22,8 @@ Upload new version
22
22
Click ${dialog-selector } mwc-button[slot="primaryAction"] > button
23
23
Wait for dialog is closed
24
24
25
- *** Test Cases ***
26
- TestCase002-01
27
- [Documentation] Check no versions on tab CoMPAS Versions
28
- Set Test Variable ${sclname } MiniGrid
29
- Set Test Variable ${scltype } SCD
30
-
31
- Open Menu Open project
32
- Open local file ${sclname } ${scltype }
33
-
34
- Select Tab CoMPAS Versions
35
- Get Text ${compas-versions-editor-selector } mwc-list > mwc-list-item > span:has-text("No versions found")
36
-
37
- TestCase002-02
38
- [Documentation] Check one versions on tab CoMPAS Versions
39
- Set Test Variable ${sclname } MiniGrid
40
- Set Test Variable ${scltype } SCD
41
-
42
- Open Menu Open project
43
- Open local file ${sclname } ${scltype }
44
-
45
- Set Test Variable ${sclname } ${TEST NAME }
46
- Set Test Variable ${scltype } CID
47
-
48
- Open Menu Save project
49
- Add to CoMPAS ${sclname } ${scltype } 1.0.0
50
-
51
- Select Tab CoMPAS Versions
52
- Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 1
53
-
54
- TestCase002-03
55
- [Documentation] Check every save created a new version on tab CoMPAS Versions
25
+ Initialize Versions
26
+ [Arguments] ${create-multiple-versions }
56
27
Set Test Variable ${sclname } MiniGrid
57
28
Set Test Variable ${scltype } SCD
58
29
@@ -68,69 +39,74 @@ TestCase002-03
68
39
Select Tab CoMPAS Versions
69
40
Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 1
70
41
42
+ IF ${create-multiple-versions } == True
71
43
Open Menu Save project
72
44
Update in CoMPAS MAJOR ${sclname } ${scltype } 2.0.0
73
-
74
- Select Tab CoMPAS Versions
75
45
Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 2
46
+ END
76
47
77
- Open Menu Save project
78
- Update in CoMPAS MINOR ${sclname } ${scltype } 2.1.0
48
+ Delete first substation
49
+ Select Tab Substation
50
+ # Got to the Substation tab and remove the first substation (Sub1), next the first substation should be Sub2.
51
+ Get Text ${substation-editor-selector } div#header > h1:has-text("Sub1")
52
+ Click ${substation-editor-selector } > abbr[title="Remove"] > mwc-icon-button[icon="delete"]
53
+ Get Text ${substation-editor-selector } div#header > h1:has-text("Sub2")
79
54
80
- Select Tab CoMPAS Versions
81
- Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 3
82
-
83
- Open Menu Save project
84
- Update in CoMPAS PATCH ${sclname } ${scltype } 2.1.1
85
-
86
- Select Tab CoMPAS Versions
87
- Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 4
88
55
89
- TestCase002-04
90
- [Documentation] Added a new version from a local file
56
+ *** Test Cases ***
57
+ TestCase002-01
58
+ [Documentation] Check no versions on tab CoMPAS Versions
91
59
Set Test Variable ${sclname } MiniGrid
92
60
Set Test Variable ${scltype } SCD
93
61
94
62
Open Menu Open project
95
63
Open local file ${sclname } ${scltype }
96
64
97
- Set Test Variable ${ sclname } ${ TEST NAME }
98
- Set Test Variable ${ scltype } CID
65
+ Select Tab CoMPAS Versions
66
+ Get Text ${ compas-versions-editor-selector } mwc-list > mwc-list-item > span:has-text("No versions found")
99
67
100
- Open Menu Save project
101
- Add to CoMPAS ${sclname } ${scltype } 1.0.0
68
+ TestCase002-02
69
+ [Documentation] Check one versions on tab CoMPAS Versions
70
+ Initialize Versions False
102
71
103
- Select Tab CoMPAS Versions
104
- Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 1
72
+ Select Tab CoMPAS Versions
73
+ Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 1
105
74
106
- Upload new version MAJOR MiniGrid SCD
75
+ TestCase002-03
76
+ [Documentation] Check every save created a new version on tab CoMPAS Versions
77
+ Initialize Versions False
107
78
108
- Select Tab CoMPAS Versions
109
- Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 2
110
- Get Text ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:last-child *= ${sclname } -${current-date } (2.0.0 )
79
+ Open Menu Save project
80
+ Update in CoMPAS MAJOR ${sclname } ${scltype } 2.0.0
111
81
112
- TestCase002-05
113
- [Documentation] Restore first version from the list of versions
114
- Set Test Variable ${sclname } MiniGrid
115
- Set Test Variable ${scltype } SCD
82
+ Select Tab CoMPAS Versions
83
+ Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 2
116
84
117
- Open Menu Open project
118
- Open local file ${sclname } ${scltype }
85
+ Open Menu Save project
86
+ Update in CoMPAS MINOR ${sclname } ${scltype } 2.1.0
119
87
120
- Set Test Variable ${ sclname } ${ TEST NAME }
121
- Set Test Variable ${ scltype } CID
88
+ Select Tab CoMPAS Versions
89
+ Get Element Count ${ compas-versions-editor-selector } mwc-list > mwc-check-list-item == 3
122
90
123
- Open Menu Save project
124
- Add to CoMPAS ${sclname } ${scltype } 1.0.0
91
+ Open Menu Save project
92
+ Update in CoMPAS PATCH ${sclname } ${scltype } 2.1.1
125
93
126
- Select Tab CoMPAS Versions
127
- Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 1
94
+ Select Tab CoMPAS Versions
95
+ Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 4
128
96
129
- Open Menu Save project
130
- Update in CoMPAS MAJOR ${sclname } ${scltype } 2.0.0
97
+ TestCase002-10
98
+ [Documentation] Added a new version from a local file
99
+ Initialize Versions False
131
100
132
- Select Tab CoMPAS Versions
133
- Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 2
101
+ Upload new version MAJOR MiniGrid SCD
102
+
103
+ Select Tab CoMPAS Versions
104
+ Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 2
105
+ Get Text ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:last-child *= ${sclname } -${current-date } (2.0.0 )
106
+
107
+ TestCase002-11
108
+ [Documentation] Restore first version from the list of versions
109
+ Initialize Versions True
134
110
135
111
# First check that the cancel is working form the dialog.
136
112
Click ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:first-child mwc-icon:first-child
@@ -143,28 +119,9 @@ TestCase002-05
143
119
Wait for dialog is closed
144
120
Check Title Filename ${sclname } -${current-date } -1.0.0 ${scltype }
145
121
146
- TestCase002-06
147
- [Documentation] Delete first version from the list of versions
148
- Set Test Variable ${sclname } MiniGrid
149
- Set Test Variable ${scltype } SCD
150
-
151
- Open Menu Open project
152
- Open local file ${sclname } ${scltype }
153
-
154
- Set Test Variable ${sclname } ${TEST NAME }
155
- Set Test Variable ${scltype } CID
156
-
157
- Open Menu Save project
158
- Add to CoMPAS ${sclname } ${scltype } 1.0.0
159
-
160
- Select Tab CoMPAS Versions
161
- Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 1
162
-
163
- Open Menu Save project
164
- Update in CoMPAS MAJOR ${sclname } ${scltype } 2.0.0
165
-
166
- Select Tab CoMPAS Versions
167
- Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 2
122
+ TestCase002-20
123
+ [Documentation] Delete first version from the list of versions
124
+ Initialize Versions True
168
125
169
126
# First check that the cancel is working form the dialog.
170
127
Click ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:first-child mwc-icon:nth-child(2)
@@ -177,36 +134,100 @@ TestCase002-06
177
134
Wait for dialog is closed
178
135
Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 1
179
136
180
- TestCase002-07
181
- [Documentation] Delete all versions from CoMPAS
182
- Set Test Variable ${sclname } MiniGrid
183
- Set Test Variable ${scltype } SCD
137
+ TestCase002-21
138
+ [Documentation] Delete all versions from CoMPAS
139
+ Initialize Versions True
184
140
185
- Open Menu Open project
186
- Open local file ${sclname } ${scltype }
141
+ # First check that the cancel is working form the dialog.
142
+ Click ${compas-versions-editor-selector } mwc-icon-button[icon="delete_forever"] > button
143
+ Click ${dialog-selector } mwc-button[slot="secondaryAction"] > button
144
+ Wait for dialog is closed
145
+ Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 2
146
+ # Next delete all versions.
147
+ Click ${compas-versions-editor-selector } mwc-icon-button[icon="delete_forever"] > button
148
+ Click ${dialog-selector } mwc-button[slot="primaryAction"] > button
149
+ Wait for dialog is closed
150
+ Get Text ${compas-versions-editor-selector } mwc-list > mwc-list-item > span:has-text("No versions found")
187
151
188
- Set Test Variable ${sclname } ${TEST NAME }
189
- Set Test Variable ${scltype } CID
152
+ TestCase002-30
153
+ [Documentation] Compare current version from CoMPAS
154
+ Initialize Versions False
190
155
191
- Open Menu Save project
192
- Add to CoMPAS ${sclname } ${scltype } 1.0.0
156
+ Delete first substation
193
157
194
- Select Tab CoMPAS Versions
195
- Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 1
158
+ Select Tab CoMPAS Versions
159
+ # Next select the first version from the list and compare this to the current open edited version.
160
+ Click ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:nth-child(1) mwc-checkbox
161
+ Click ${compas-versions-editor-selector } mwc-fab[label="Compare version (current)"] > button
162
+ Get Text ${dialog-selector } \#wizard-content > mwc-list > mwc-list-item:nth-child(5) >> text=Substation
163
+ Click ${dialog-selector } mwc-button[slot="primaryAction"] > button
164
+ Wait for dialog is closed
196
165
197
- Open Menu Save project
198
- Update in CoMPAS MAJOR ${sclname } ${scltype } 2.0.0
166
+ TestCase002-31
167
+ [Documentation] Compare current version from CoMPAS not selecting correct number of versions
168
+ Initialize Versions True
199
169
200
- Select Tab CoMPAS Versions
201
- Get Element Count ${ compas-versions-editor-selector } mwc-list > mwc-check-list-item == 2
170
+ Open Menu Save project
171
+ Update in CoMPAS MAJOR ${ sclname } ${ scltype } 3.0.0
202
172
203
- # First check that the cancel is working form the dialog.
204
- Click ${compas-versions-editor-selector } mwc-icon-button[icon="delete_forever"] > button
205
- Click ${dialog-selector } mwc-button[slot="secondaryAction"] > button
173
+ Select Tab CoMPAS Versions
174
+ # Now select no versions and try to compare, should show a error dialog.
175
+ Click ${compas-versions-editor-selector } mwc-fab[label="Compare version (current)"] > button
176
+ Get Text ${dialog-selector } \#wizard-content:has-text("Select maximum one version to compare the current project against.")
177
+ Click ${dialog-selector } mwc-button[slot="secondaryAction"] > button
206
178
Wait for dialog is closed
207
- Get Element Count ${compas-versions-editor-selector } mwc-list > mwc-check-list-item == 2
208
- # Next delete all versions.
209
- Click ${compas-versions-editor-selector } mwc-icon-button[icon="delete_forever"] > button
210
- Click ${dialog-selector } mwc-button[slot="primaryAction"] > button
179
+
180
+ # Now select two versions and try to compare, should show a error dialog.
181
+ Click ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:nth-child(1) mwc-checkbox
182
+ Click ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:nth-child(2) mwc-checkbox
183
+ Click ${compas-versions-editor-selector } mwc-fab[label="Compare version (current)"] > button
184
+ Get Text ${dialog-selector } \#wizard-content:has-text("Select maximum one version to compare the current project against.")
185
+ Click ${dialog-selector } mwc-button[slot="secondaryAction"] > button
186
+ Wait for dialog is closed
187
+
188
+ TestCase002-32
189
+ [Documentation] Compare current version from CoMPAS
190
+ Initialize Versions False
191
+
192
+ Delete first substation
193
+ Open Menu Save project
194
+ Update in CoMPAS MAJOR ${sclname } ${scltype } 2.0.0
195
+
196
+ Select Tab CoMPAS Versions
197
+ # Next select the first and second version from the list and compare this to the current open edited version.
198
+ Click ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:nth-child(1) mwc-checkbox
199
+ Click ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:nth-child(2) mwc-checkbox
200
+ Click ${compas-versions-editor-selector } mwc-fab[label="Compare versions"] > button
201
+ Get Text ${dialog-selector } \#wizard-content > mwc-list > mwc-list-item:nth-child(4) >> text=Substation
202
+ Click ${dialog-selector } mwc-button[slot="primaryAction"] > button
203
+ Wait for dialog is closed
204
+
205
+
206
+ TestCase002-33
207
+ [Documentation] Compare versions from CoMPAS not selecting correct number of versions
208
+ Initialize Versions True
209
+
210
+ Open Menu Save project
211
+ Update in CoMPAS MAJOR ${sclname } ${scltype } 3.0.0
212
+
213
+ Select Tab CoMPAS Versions
214
+ # Now select no versions and try to compare, should show a error dialog.
215
+ Click ${compas-versions-editor-selector } mwc-fab[label="Compare versions"] > button
216
+ Get Text ${dialog-selector } \#wizard-content:has-text("Select maximum two versions to compare with each other.")
217
+ Click ${dialog-selector } mwc-button[slot="secondaryAction"] > button
218
+ Wait for dialog is closed
219
+
220
+ # Now select one versions and try to compare, should show a error dialog.
221
+ Click ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:nth-child(1) mwc-checkbox
222
+ Click ${compas-versions-editor-selector } mwc-fab[label="Compare versions"] > button
223
+ Get Text ${dialog-selector } \#wizard-content:has-text("Select maximum two versions to compare with each other.")
224
+ Click ${dialog-selector } mwc-button[slot="secondaryAction"] > button
225
+ Wait for dialog is closed
226
+
227
+ # Now select three versions (first is already selected) and try to compare, should show a error dialog.
228
+ Click ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:nth-child(2) mwc-checkbox
229
+ Click ${compas-versions-editor-selector } mwc-list > mwc-check-list-item:nth-child(3) mwc-checkbox
230
+ Click ${compas-versions-editor-selector } mwc-fab[label="Compare versions"] > button
231
+ Get Text ${dialog-selector } \#wizard-content:has-text("Select maximum two versions to compare with each other.")
232
+ Click ${dialog-selector } mwc-button[slot="secondaryAction"] > button
211
233
Wait for dialog is closed
212
- Get Text ${compas-versions-editor-selector } mwc-list > mwc-list-item > span:has-text("No versions found")
0 commit comments