// Add an attachment to verify that it's version is not incremented in the target document (XWIKI-8157).
// FIXME: Remove the following wait when XWIKI-6688 is fixed.
viewPage.waitForDocExtraPaneActive("comments");
AttachmentsPane attachmentsPane = viewPage.openAttachmentsDocExtraPane();
attachmentsPane.setFileToUpload(getClass().getResource("/image.gif").getPath());
attachmentsPane.waitForUploadToFinish("image.gif");
Assert.assertEquals("1.1", attachmentsPane.getLatestVersionOfAttachment("image.gif"));
// Click on Copy from the Page top menu.
CopyPage copyPage = viewPage.copy();