@@ -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,68 @@ 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
+ b .eval_js ('window.debugging = "machines"' )
1205
+ time .sleep (5 )
1206
+
1207
+ b .click (f"#vm-{ self .name } -system-action-kebab" )
1208
+ b .wait_visible (f"#vm-{ self .name } -system-action-kebab + .pf-v5-c-menu" )
1209
+ b .click (f"#vm-{ self .name } -system-delete" )
1210
+ b .wait_visible (f"#vm-{ self .name } -delete-modal-dialog" )
1211
+ b .set_checked (f"#vm-{ self .name } -delete-modal-dialog input[name=check-action-vda]" , False )
1212
+ b .click (f"#vm-{ self .name } -delete-modal-dialog button:contains(\" Delete\" )" )
1213
+ b .wait_not_present (f"#vm-{ self .name } -delete-modal-dialog" )
1214
+ b .wait_visible ("#virtual-machines-listing" )
1215
+ b .wait_not_present (f"#vm-{ self .name } -system-name" )
1216
+
1217
+ self .open ().fill ()
1218
+ b .click (buttonSelector )
1219
+
1220
+ if not self .create_and_run :
1221
+ b .wait_visible (f"h1:contains(\" Creating VM { self .name } \" )" )
1222
+ b .wait_visible ("button:contains(\" Go to VMs list\" )" )
1223
+ else :
1224
+ b .wait_in_text (f"#vm-{ self .name } -system-state" , "Creating VM" )
1225
+ testlib .wait (lambda : "Running" in b .text (f"#vm-{ self .name } -system-state" ))
1226
+ b .click (f"#vm-{ self .name } -system-name" )
1227
+ b .wait_visible ("#vm-details" )
1228
+ b .wait_in_text ("h2.vm-name" , self .name )
1229
+
1230
+ b .click (f"#vm-{ self .name } -system-action-kebab" )
1231
+ b .wait_visible (f"#vm-{ self .name } -system-action-kebab + .pf-v5-c-menu" )
1232
+ b .click (f"#vm-{ self .name } -system-delete" )
1233
+ b .wait_visible (f"#vm-{ self .name } -delete-modal-dialog" )
1234
+ b .set_checked (f"#vm-{ self .name } -delete-modal-dialog input[name=check-action-vda]" , False )
1235
+ b .click (f"#vm-{ self .name } -delete-modal-dialog button:contains(\" Delete\" )" )
1236
+ b .wait_not_present (f"#vm-{ self .name } -delete-modal-dialog" )
1237
+ b .wait_visible ("#virtual-machines-listing" )
1238
+ b .wait_not_present (f"#vm-{ self .name } -system-name" )
1239
+
1240
+ return self
1241
+
1171
1242
def checkOsFiltered (self , present = False ):
1172
1243
b = self .browser
1173
1244
@@ -1913,6 +1984,11 @@ vnc_password= "{vnc_passwd}"
1913
1984
1914
1985
self ._assertScriptFinished ().checkEnvIsEmpty ()
1915
1986
1987
+ def checkMiddlePageWhenCreatingTest (self , dialog ):
1988
+ dialog .open ().fill ().checkMiddlePageWhenCreating ()
1989
+
1990
+ self ._assertScriptFinished ().checkEnvIsEmpty ()
1991
+
1916
1992
# Many of testCreate* tests use these helpers - let's keep them here to avoid repetition
1917
1993
def checkDialogFormValidationTest (self , dialog , errors , create = True , is_warning = False ):
1918
1994
dialog .open () \
0 commit comments