Add test automation for miscellaneous sample and sample type issues.#2491
Merged
labkey-danield merged 21 commits intodevelopfrom Jul 8, 2025
Merged
Add test automation for miscellaneous sample and sample type issues.#2491labkey-danield merged 21 commits intodevelopfrom
labkey-danield merged 21 commits intodevelopfrom
Conversation
…a required parent. Add a list of realistic domain names. Remove deprecated code. Add an isRequired parameter to EntityTypeDesigner
… used in the name expression. Remove check for 'Add' button being disabled if all parent entity types are added. It added little value and made the test fragile.
labkey-tchad
approved these changes
Jul 1, 2025
| StringBuilder sbNameExpression = new StringBuilder(); | ||
|
|
||
| // Covers Issue 52180 | ||
| String parentsampleTypeEncoded = PARENT_SAMPLE_TYPE.replace("/", "\\/"); |
Member
There was a problem hiding this comment.
Isn't this what PARENT_SAMPLE_TYPE_INPUT is for?
Comment on lines
76
to
77
| private static final String DEFAULT_SAMPLE_PARENT_VALUE = "SS" + | ||
| EscapeUtil.escapeForNameExpression(TestDataGenerator.randomString(3).replaceAll("[_)]", ".")); // '_' is used as delimiter to get batchRandomId and ) is used to close the defaultValue() |
Member
There was a problem hiding this comment.
When I was messing with this test, escaping didn't seem to work for default values. The backslashes just ended up being part of the default value. If escaping worked, you should be able to not exclude _ and ) from the value.
labkey-susanh
approved these changes
Jul 1, 2025
|
|
||
| checker().verifyTrue("Name of derived sample doesn't look correct. Should contain 'Parent Sample'.", | ||
| derivedSampleName.contains("Parent Sample")); | ||
| checker().verifyTrue("Name of derived sample doesn't look correct. Should contain 'tricky06'.", |
Contributor
There was a problem hiding this comment.
The use of 'tricky06' is a little magical here. Perhaps capture this in a constant somewhere like PARENT_FIELD_VALUE_PREFIX = "tricky06"?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
Updating shared test components to aid with the test automation identified in the related PR.
Related Pull Requests
Changes