-
Notifications
You must be signed in to change notification settings - Fork 9
Add selenium test for importing attachment as string values #2597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| 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)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. fixed.
| } | ||
| catch(NoSuchElementException nse) | ||
| { | ||
| checker().fatal().error("Invalid attachment error not present."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For good measure, might want to change these to have spaces between words as that is more realistic.
| } | ||
| catch(NoSuchElementException nse) | ||
| { | ||
| checker().error("Invalid attachment error not present."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| checker().error("Invalid attachment error not present."); | |
| checker().withScreenshot().error("Invalid attachment error not present."); |
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