Add selenium test for importing attachment as string values#2597
Merged
XingY merged 2 commits intorelease25.7-SNAPSHOTfrom Aug 4, 2025
Merged
Add selenium test for importing attachment as string values#2597XingY merged 2 commits intorelease25.7-SNAPSHOTfrom
XingY merged 2 commits intorelease25.7-SNAPSHOTfrom
Conversation
labkey-susanh
requested changes
Aug 1, 2025
| try | ||
| { | ||
| String expectedError = "Row 1: Can't upload '" + attachmentValue + "' to field " + LIST_ATTACHMENT01_NAME + " with type Attachment."; | ||
| isElementPresent(Locator.tagWithClass("div", "labkey-error").withText(expectedError)); |
Contributor
There was a problem hiding this comment.
Shouldn't there be an assertion attached to this? The catch will fail if there is no error, but will succeed if the error is something else, which may hide the failure for the attachment field.
| } | ||
| catch(NoSuchElementException nse) | ||
| { | ||
| checker().fatal().error("Invalid attachment error not present."); |
Contributor
There was a problem hiding this comment.
Is this fatal? Seems like testing of the other import scenarios could still proceed (though will likely also fail).
| public class InlineImagesListTest extends BaseWebDriverTest | ||
| { | ||
| private final static String PROJECT_NAME = "InlineImagesListTestProject"; | ||
| private final static String IMPORT_PROJECT_NAME = "InlineImagesListImportTestProject"; |
Contributor
There was a problem hiding this comment.
For good measure, might want to change these to have spaces between words as that is more realistic.
labkey-susanh
approved these changes
Aug 4, 2025
| } | ||
| catch(NoSuchElementException nse) | ||
| { | ||
| checker().error("Invalid attachment error not present."); |
Contributor
There was a problem hiding this comment.
Suggested change
| checker().error("Invalid attachment error not present."); | |
| checker().withScreenshot().error("Invalid attachment error not present."); |
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
Selenium test for Issue 53498: Sample Manager: Attachment field is lost after export/import round trip. We are no longer accepting string values for attachment fields for import. The exception is list archive import, which we do still allow attachment name being provided.
Related Pull Requests
Changes