Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Field Testing: focused on the field creation forms in Drupal 10.2+ #1842

Merged
merged 17 commits into from
Jun 22, 2024

Conversation

laceysanderson
Copy link
Member

@laceysanderson laceysanderson commented Apr 2, 2024

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:

  • chado integer using the feature.feature_id column
  • chado boolean using the feature.is_analysis column
  • chado string using the feature.name column
  • chado text using the feature.uniquename column

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.

@laceysanderson laceysanderson added Tripal 4 Any issue or pull request focused on Tripal 4 Group 1 - Tripal Content Types | Terms | Fields Any issue relating to Tripal Content including types, terms, and fields. Group 9 - Automated Testing Any issue related to automated testing including needed test cases, concerns, etc. labels Apr 2, 2024
@laceysanderson laceysanderson self-assigned this Apr 2, 2024
@laceysanderson laceysanderson linked an issue Apr 2, 2024 that may be closed by this pull request
@laceysanderson laceysanderson marked this pull request as ready for review June 18, 2024 22:00
@spficklin
Copy link
Member

Code review looks good. I don't have any issues with it, just a few questions (above). I'm just waiting for tests to finish then I'll approve.

@laceysanderson laceysanderson merged commit b17081e into 4.x Jun 22, 2024
15 checks passed
@laceysanderson laceysanderson deleted the tv4g9-issue1822-fieldTesting branch June 22, 2024 03:17
@laceysanderson
Copy link
Member Author

Thanks for the review @spficklin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group 1 - Tripal Content Types | Terms | Fields Any issue relating to Tripal Content including types, terms, and fields. Group 9 - Automated Testing Any issue related to automated testing including needed test cases, concerns, etc. Tripal 4 Any issue or pull request focused on Tripal 4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automated Testing for fields
2 participants