Giter Site home page Giter Site logo

Comments (3)

laceysanderson avatar laceysanderson commented on August 15, 2024

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.

laceysanderson avatar laceysanderson commented on August 15, 2024

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.

laceysanderson avatar laceysanderson commented on August 15, 2024

Closing because this is more a documentation issue at this point.

from tripal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.