The test succeeded as the old Cockpit File component did trigger an invalid state and now it doesn't. Regardless of that issue, opening the dialog, configuration a valid path and then starting a vm via virsh start subVmTest1 and then pressing "add" does add the share to the VM (without any errors)
So this actually works, but maybe we need to change the current implementation:
Verify if we can add shares on the fly
Allow adding shares on the fly and warn that a VM needs to be restarted
Update the dialog state when a VM is started?
Alternatively we just ignore this case, from Cockpit's view you can't start a VM while adding a snapshot.
According to our [old broken test TestMachinesFilesystem.testBasic] (https://github.com/cockpit-project/cockpit-machines/blob/323/test/check-machines-filesystems#L134) starting a VM while the "add new shared filesystem" should disable the create button but that is not the case.
The test succeeded as the old Cockpit File component did trigger an invalid state and now it doesn't. Regardless of that issue, opening the dialog, configuration a valid path and then starting a vm via
virsh start subVmTest1
and then pressing "add" does add the share to the VM (without any errors)So this actually works, but maybe we need to change the current implementation:
Alternatively we just ignore this case, from Cockpit's view you can't start a VM while adding a snapshot.