Automated Field Testing: focused on the field creation forms in Drupal 10.2+ #1842
+290
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tripal 4 Core Dev Task
Issue #1822
Tripal Version: 4
Description
This PR tests the field create UI in Drupal 10.2+ for four simple chado fields. I started this is reference to #1805 which did not have automated testing to confirm that we don't break this annoying collection of subforms in the future 🤪
This test walks through the create a field forms. It has to submit every time there would normally be ajax involved since ajax doesn't work in the test environment. Specifically, it creates a field attached to a feature content type:
In all these cases it fills in the field label, machine name, selects the storage information, provides some help text and chooses a cvterm from the autocomplete.
Testing?
Automated testing changes only so they way to test is by confirming they pass and doing a code review.
You can also add
print $this->getSession()->getPage()->getContent();
at any point in the test to look at the full output of the virtual page in the test environment.