On Thu, May 3, 2012 at 11:02 AM, Vincent Massol <[email protected]> wrote:
Hi Marius,
On May 2, 2012, at 7:10 PM, GitHub wrote:
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-enterprise Commit: 6e0258a75e0e666db2f48672bcdb41bbefe0b717 https://github.com/xwiki/xwiki-enterprise/commit/6e0258a75e0e666db2f48672bcd... Author: Marius Dumitru Florea <[email protected]> Date: 2012-05-02 (Wed, 02 May 2012)
Changed paths: M xwiki-enterprise-test/xwiki-enterprise-test-wysiwyg/src/test/it/org/xwiki/test/wysiwyg/framework/WysiwygTestSetup.java
Log Message: ----------- [misc] Display hidden documents for Admin user because various WYSIWYG tests use hidden documents.
diff --git a/xwiki-enterprise-test/xwiki-enterprise-test-wysiwyg/src/test/it/org/xwiki/test/wysiwyg/framework/WysiwygTestSetup.java b/xwiki-enterprise-test/xwiki-enterprise-test-wysiwyg/src/test/it/org/xwiki/test/wysiwyg/framework/WysiwygTestSetup.java index 690daf1..97689c4 100644 --- a/xwiki-enterprise-test/xwiki-enterprise-test-wysiwyg/src/test/it/org/xwiki/test/wysiwyg/framework/WysiwygTestSetup.java +++ b/xwiki-enterprise-test/xwiki-enterprise-test-wysiwyg/src/test/it/org/xwiki/test/wysiwyg/framework/WysiwygTestSetup.java @@ -55,6 +55,9 @@ protected void setUp() throws Exception return; }
+ // Make sure the hidden documents are displayed to the Admin user. + displayHiddenDocumentsForAdmin(firstXWikiTest); + // Set up the WYSIWYG tests using the first WYSIWYG Test case for Selenium and skin executor API. enableAllEditingFeatures(firstXWikiTest); } @@ -82,14 +85,28 @@ private AbstractWysiwygTestCase getFirstWysiwygTest(Test test) }
/** + * Sets the Admin user preference to display the hidden documents. + * + * @param helperTest helper {@link AbstractWysiwygTestCase} instance whose API to use to do the setup + */ + private void displayHiddenDocumentsForAdmin(AbstractWysiwygTestCase helperTest) + { + helperTest.loginAsAdmin(); + helperTest.open("XWiki", "Admin", "edit", "editor=object"); + String propertyId = "XWiki.XWikiUsers_0_displayHiddenDocuments"; + if (!"1".equals(helperTest.getSelenium().getSelectedValue(propertyId))) { + helperTest.setFieldValue(propertyId, "1"); + helperTest.clickEditSaveAndContinue(); + } + }
Shouldn't this API be added to the UserProfile PageObject instead?
This change is for the WYSIWYG tests (still) running on Selenium 1 so adding to the UserProfile page object doesn't help me.. Thanks, Marius
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs