@@ -252,6 +252,15 @@ class TestMachinesCreate(machineslib.VirtualMachinesCase):
252
252
253
253
dialog .cancel ()
254
254
255
+ # Check the details in the middle page after the VM creation
256
+ runner .checkMiddlePageWhenCreatingTest (TestMachinesCreate .VmDialog (self , sourceType = "file" , location = config .NOVELL_MOCKUP_ISO_PATH ))
257
+
258
+ runner .checkMiddlePageWhenCreatingTest (TestMachinesCreate .VmDialog (self , sourceType = "disk_image" , location = config .NOVELL_MOCKUP_ISO_PATH ))
259
+
260
+ runner .checkMiddlePageWhenCreatingTest (TestMachinesCreate .VmDialog (self , sourceType = "file" , location = config .NOVELL_MOCKUP_ISO_PATH , create_and_run = True ))
261
+
262
+ runner .checkMiddlePageWhenCreatingTest (TestMachinesCreate .VmDialog (self , sourceType = "disk_image" , location = config .NOVELL_MOCKUP_ISO_PATH , create_and_run = True ))
263
+
255
264
def testCreateNameGeneration (self ):
256
265
config = TestMachinesCreate .TestCreateConfig
257
266
runner = TestMachinesCreate .CreateVmRunner (self )
@@ -1168,6 +1177,66 @@ vnc_password= "{vnc_passwd}"
1168
1177
1169
1178
return self
1170
1179
1180
+ def checkMiddlePageWhenCreating (self ):
1181
+ b = self .browser
1182
+
1183
+ buttonSelector = "#create-and-run" if self .create_and_run else "#create-and-edit"
1184
+ b .click (buttonSelector )
1185
+
1186
+ if not self .create_and_run :
1187
+ b .wait_visible (f"h1:contains(\" Creating VM { self .name } \" )" )
1188
+ b .click ("button:contains(\" Go to VMs list\" )" )
1189
+ b .wait_visible ("#virtual-machines-listing" )
1190
+ b .wait_in_text (f"#vm-{ self .name } -system-state" , "Creating VM" )
1191
+
1192
+ b .click (f"#vm-{ self .name } -system-name" )
1193
+ b .wait_visible (f"h1:contains(\" Creating VM { self .name } \" )" )
1194
+ b .click ("button:contains(\" Go to VMs list\" )" )
1195
+ b .wait_visible ("#virtual-machines-listing" )
1196
+ b .wait_in_text (
1197
+ f"#vm-{ self .name } -system-state" ,
1198
+ "Running" if self .create_and_run else "Shut off" )
1199
+
1200
+ b .click (f"#vm-{ self .name } -system-name" )
1201
+ b .wait_visible ("#vm-details" )
1202
+ b .wait_in_text ("h2.vm-name" , self .name )
1203
+ # debug
1204
+ time .sleep (5 )
1205
+
1206
+ b .click (f"#vm-{ self .name } -system-action-kebab" )
1207
+ b .wait_visible (f"#vm-{ self .name } -system-action-kebab .pf-v5-c-dropdown__menu.pf-m-align-right" )
1208
+ b .click (f"#vm-{ self .name } -system-delete" )
1209
+ b .wait_visible (f"#vm-{ self .name } -delete-modal-dialog" )
1210
+ b .set_checked (f"#vm-{ self .name } -delete-modal-dialog input[name=check-action-vda]" , False )
1211
+ b .click (f"#vm-{ self .name } -delete-modal-dialog button:contains(\" Delete\" )" )
1212
+ b .wait_not_present (f"#vm-{ self .name } -delete-modal-dialog" )
1213
+ b .wait_visible ("#virtual-machines-listing" )
1214
+ b .wait_not_present (f"#vm-{ self .name } -system-name" )
1215
+
1216
+ self .open ().fill ()
1217
+ b .click (buttonSelector )
1218
+
1219
+ if not self .create_and_run :
1220
+ b .wait_visible (f"h1:contains(\" Creating VM { self .name } \" )" )
1221
+ b .wait_visible ("button:contains(\" Go to VMs list\" )" )
1222
+ else :
1223
+ b .wait_in_text (f"#vm-{ self .name } -system-state" , "Creating VM" )
1224
+ testlib .wait (lambda : "Running" in b .text (f"#vm-{ self .name } -system-state" ))
1225
+ b .click (f"#vm-{ self .name } -system-name" )
1226
+ b .wait_visible ("#vm-details" )
1227
+ b .wait_in_text ("h2.vm-name" , self .name )
1228
+
1229
+ b .click (f"#vm-{ self .name } -system-action-kebab" )
1230
+ b .click (f"#vm-{ self .name } -system-delete" )
1231
+ b .wait_visible (f"#vm-{ self .name } -delete-modal-dialog" )
1232
+ b .set_checked (f"#vm-{ self .name } -delete-modal-dialog input[name=check-action-vda]" , False )
1233
+ b .click (f"#vm-{ self .name } -delete-modal-dialog button:contains(\" Delete\" )" )
1234
+ b .wait_not_present (f"#vm-{ self .name } -delete-modal-dialog" )
1235
+ b .wait_visible ("#virtual-machines-listing" )
1236
+ b .wait_not_present (f"#vm-{ self .name } -system-name" )
1237
+
1238
+ return self
1239
+
1171
1240
def checkOsFiltered (self , present = False ):
1172
1241
b = self .browser
1173
1242
@@ -1913,6 +1982,11 @@ vnc_password= "{vnc_passwd}"
1913
1982
1914
1983
self ._assertScriptFinished ().checkEnvIsEmpty ()
1915
1984
1985
+ def checkMiddlePageWhenCreatingTest (self , dialog ):
1986
+ dialog .open ().fill ().checkMiddlePageWhenCreating ()
1987
+
1988
+ self ._assertScriptFinished ().checkEnvIsEmpty ()
1989
+
1916
1990
# Many of testCreate* tests use these helpers - let's keep them here to avoid repetition
1917
1991
def checkDialogFormValidationTest (self , dialog , errors , create = True , is_warning = False ):
1918
1992
dialog .open () \
0 commit comments