From 9a40eb2e289e327f5a2538d97be453e03b0d46c9 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 21 Aug 2024 09:57:40 +0200 Subject: [PATCH] DEBUG: log pod creation form validation testCreatePodUser often fails with > wait_js_cond(ph_is_present("#create-pod-create-btn:not([disabled]):not([aria-disabled=true])")): Error: condition did not become true That disappears the minute we throw any console.log at it. --- Makefile | 2 +- src/PodCreateModal.jsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 036e40351..6dacc0ac7 100644 --- a/Makefile +++ b/Makefile @@ -196,7 +196,7 @@ prepare-check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common test/reference # run the browser integration tests; skip check for SELinux denials # this will run all tests/check-* and format them as TAP check: prepare-check - TEST_AUDIT_NO_SELINUX=1 test/common/run-tests ${RUN_TESTS_OPTIONS} + TEST_AUDIT_NO_SELINUX=1 test/common/run-tests -t ${RUN_TESTS_OPTIONS} bots: $(COCKPIT_REPO_STAMP) test/common/make-bots diff --git a/src/PodCreateModal.jsx b/src/PodCreateModal.jsx index 522d8819a..2c38cef76 100644 --- a/src/PodCreateModal.jsx +++ b/src/PodCreateModal.jsx @@ -106,8 +106,12 @@ export const PodCreateModal = ({ user, systemServiceAvailable, userServiceAvaila .length > 0; // If one field has error, the whole group (dynamicList) is invalid // If at least one group is invalid, then the whole form is invalid - return validationFailed.publish?.some(groupHasError) || + const res = validationFailed.publish?.some(groupHasError) || !!validationFailed.podName; + + console.log("isFormInvalid", JSON.stringify(validationFailed), "->", res); + + return res; }; const validatePodName = value => {