Skip to content

Commit

Permalink
DEBUG: log pod creation form validation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
martinpitt committed Aug 21, 2024
1 parent 0879745 commit 9a40eb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/PodCreateModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 9a40eb2

Please sign in to comment.