First cluster is always selected when present

This commit is contained in:
Benoît Seignovert 2024-02-20 15:36:40 +01:00
parent 11d878cecf
commit e3fda2c317
Signed by: Benoît Seignovert
GPG key ID: F5D8895227D18A0B
2 changed files with 14 additions and 8 deletions

View file

@ -153,13 +153,18 @@ def test_options_form_slurm(mock_cluster):
assert '<div class="flex-item-2 slurm-cluster" data-cluster="nautilus">' in html
assert '<div class="flex-item-2 slurm-cluster" data-cluster="waves">' in html
assert '<input type="radio" name="cluster" id="cluster_nautilus" value="nautilus">' in html
# The 1st cluster is always selected when present…
assert (
'<input type="radio" name="cluster" id="cluster_nautilus" value="nautilus" checked>' in html
)
assert (
'<label for="cluster_nautilus" class="btn btn-default btn-block"> Nautilus </label>' in html
)
# Partitions (hidden by default for multi-cluster)
assert '<div class="form-group partitions hidden">' in html
# … not the second one
assert '<input type="radio" name="cluster" id="cluster_waves" value="waves" >' in html
# Partitions
assert '<label for="partition" class="col-sm-3 control-label">Partition:</label>' in html
assert (