Comments (3)
Current state of things is described fully in the PR referenced above.
Summary from PR:
This PR adds a new Test Trait to make it easier to write Kernel tests for Chado Storage. As mentioned in the linked issue, the plan is to write a full suite of Chado Storage kernel tests for each field. This PR lays the ground work for that and adds an example test for the property field.
NOTE: When looking at the property test you will notice that the data provider would provide two test datasets except that the second one is commented out. This is because the second one currently fails due to #1398.
ChadoLinkerPropertyDefault Field
tripal_chado/tests/src/Kernel/Plugin/ChadoStorage/ChadoLinkerPropertyDefaultTest.php
The $fields array describes the hypothetical fields and properties to test. For this test, there are two property fields whose chado storage properties match the form currently used in this field. It also provides a single "other" field which contains properties to meet the unique constraint for feature.
The dataProvider provideFieldExpectations() currently provides one set of expectations which includes the values for a single property field and the other field. As noted above, there is a second set of expectations which is commented out currently that allows us to test multiple property fields attached to the same content type... However, it is not currently being used in tests due to Issue #1398.
testInsertValues()
Currently tests ChadoStorage addTypes(), getTypes(), insertValues() methods for expectation sets provided by the data provider. This is written/tested to work once we uncomment the second expectation set.
I still have the following tests to implement for this field but will do so in another PR as this one was already becoming substantial.
- Create Values in Chado using ChadoStorage when they violate unique constraint.
- Load values in Chado using ChadoStorage when they don't yet exist.
- Load values in Chado using ChadoStorage after we just inserted them.
- Update values in Chado using ChadoStorage after we just inserted them.
- Update values in Chado using ChadoStorage when they don't actually exist.
- Ensure property field picks up records in Chado not added through field.
from tripal.
With PR #1584, we now have a full test suite for a single property field. The next step are:
- to resolve bugs known bugs in the property field
- to document this new API for testing the chado interaction of fields
- to write similar tests for other existing fields
from tripal.
Closing because this is more a documentation issue at this point.
from tripal.
Related Issues (20)
- Code coverage failure for pull requests from cloned repos HOT 1
- Make sure admin route permissions are logical and consistent
- There are no custom tables by default even after preparing HOT 7
- Chado CVTerm service: do we need one or do we just always use Tripal Terms? HOT 2
- Add depreciation notices to legacy code HOT 2
- Change the CV term for the Contact bundle from local:contact to a real term NCIT:C47954 HOT 5
- Can't view job log HOT 3
- Setting CV terms on non Tripal fields attached to Tripal content types
- Edit Field Settings WSOD on Drupal 10.2 HOT 4
- Checking for new fields HOT 3
- Tripal Layout TODO
- Create YAML for all Content Types Layouts
- Testing needed for Layouts
- Split the Taxonomy Importer
- Tripal Layout uses machine name as the module title in Admin -> Extensions HOT 2
- Twig\Error\LoaderError: Template "@organisms/list/list.twig" is not defined HOT 7
- PHPUnit testing error on Drupal 10.2 - not sure if it's an incompatibility, bug or something else HOT 12
- Adding generic Tripal properties to a content type gives WSOD and error.
- Tripal (not chado) fields cannot be added through GUI HOT 1
- The predefined null contact gets published
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tripal.