Problem/Motivation

The CRM app lacks basic CRUD unit tests. Since I'm new to Drupal I'm going to keep the scope of this ticket small and only add a test for the happy path creation of a Person CRM Contact. I'm basing this on what's tested in item 4 in the list defined in this PR: https://git.drupalcode.org/project/crm/-/merge_requests/97/diffs

Remaining tasks

1) Identify the process I'm creating the test for and describe it in this ticket. This would normally be overkill, but since I'm new it's nice to set milestones, and seeing that I understand what I'm testing might make things easier for the reviewer.

2) Identify Drupal unit test best practices, add links to this ticket. Again, normally overkill but milestones are nice.

3) Code the unit test, verify locally, submit a PR for review.

Issue fork crm-3544964

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

speckles created an issue. See original summary.

speckles’s picture

Okay, the most basic unit test to verify Person CRM contacts can be added already exists -> https://git.drupalcode.org/project/crm/-/blob/1.0.x/tests/src/Functional...

So I'm going to change this ticket to 'Can be added using their last name'

speckles’s picture

Nevermind, that just validates that an organization can be created. Either way, that's clearly an example of what I need to do, but with the person form instead of the organization form

speckles’s picture

Okay, I've been stuck on this long enough, ended up leaning way too hard on AI to get it done, but I've got code ready for review.

bluegeek9 made their first commit to this issue’s fork.

bluegeek9 changed the visibility of the branch 1.0.x to hidden.

bluegeek9’s picture

Title: "Create Person CRM Contact" Unit Test » Add tests for Contact and Relationship Forms
bluegeek9’s picture

Assigned: speckles » bluegeek9

bluegeek9 changed the visibility of the branch 3544964-create-person-crm to hidden.

bluegeek9’s picture

Assigned: bluegeek9 » Unassigned
Status: Active » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triage issues and adding more context to existing issues.
  • Flagging CRM as a favorite on the project page to help others discover it and show your support.
  • Review the Developer Docs for accuracy and clarity.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.