This PR adds another validation scope or level. The Column Headers Validator validates column headers in the file to matches the headers defined by the Importer.
Please describe each things this PR does. For example, a PR may 1) solve a specific bug, 2) create an auomated test to ensure it doesn't return.
Updates the scopes array in the validateForm() method of the Importer to include the key/scope 'HEADERS'.
Adds a plugin into the plugin directory that corresponds to the HEADER validator scope.
Testing
Automated Testing
Please describe each automated test this PR creates and provide a list of the assertions it makes using casual language.Do not just say things like "asserts the array is not empty" but rather say "Ensures that the return value of method X with these parameters is not an empty array".
This PR has automated test included to test the following:
Kernel Test: Tests headers for:
Headers row (line no.1 in the data file) is missing.
Mismatch column headers: Extra header and Missing header
Skip validation, set validator as todo/upcoming.
Manual Testing
Describe in detail how someone should manually test this functionality.Make sure to include whether they need to build a docker from scratch, create any records, etc.
Create test data
Create a project
Create a genus
Pair the project - genus in project prop using the genus term in the configuration as the type, alternatively with the module properly configured use the service below.
Issue #48 Column Headers Validator
Motivation
This PR adds another validation scope or level. The Column Headers Validator validates column headers in the file to matches the headers defined by the Importer.
This PR is dependent on (https://github.com/TripalCultivate/TripalCultivate-Phenotypes/pull/50) Data File Validator
What does this PR do?
Please describe each things this PR does. For example, a PR may 1) solve a specific bug, 2) create an auomated test to ensure it doesn't return.
Testing
Automated Testing
Please describe each automated test this PR creates and provide a list of the assertions it makes using casual language. Do not just say things like "asserts the array is not empty" but rather say "Ensures that the return value of method X with these parameters is not an empty array".
This PR has automated test included to test the following:
Manual Testing
Describe in detail how someone should manually test this functionality. Make sure to include whether they need to build a docker from scratch, create any records, etc.
Execute Tripal Job created by the install.
Configure module.
Load Tripal Cultivate PhenoShare Importer page. mysite/admin/tripal/loaders/trpcultivate-phenotypes-share
Download a template file provided in the importer and use it as test file.
Alter header row (line no.1 of the template file) to test validation.