diff options
Diffstat (limited to 'tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/LdifEditorTest.java')
-rw-r--r-- | tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/LdifEditorTest.java | 58 |
1 files changed, 17 insertions, 41 deletions
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/LdifEditorTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/LdifEditorTest.java index d591c0db5..5f69391c5 100644 --- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/LdifEditorTest.java +++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/LdifEditorTest.java @@ -21,20 +21,11 @@ package org.apache.directory.studio.test.integration.ui; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; -import org.apache.directory.server.core.integ.AbstractLdapTestUnit; import org.apache.directory.studio.test.integration.ui.bots.LdifEditorBot; import org.apache.directory.studio.test.integration.ui.bots.NewWizardBot; -import org.apache.directory.studio.test.integration.ui.bots.StudioBot; -import org.apache.directory.studio.test.integration.ui.bots.utils.Assertions; -import org.apache.directory.studio.test.integration.ui.bots.utils.FrameworkRunnerWithScreenshotCaptureListener; -import org.apache.directory.studio.test.integration.ui.bots.utils.StudioSystemUtils; -import org.junit.After; -import org.junit.Assume; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; /** @@ -42,30 +33,8 @@ import org.junit.runner.RunWith; * * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> */ -@RunWith(FrameworkRunnerWithScreenshotCaptureListener.class) -public class LdifEditorTest extends AbstractLdapTestUnit +public class LdifEditorTest extends AbstractTestBase { - private StudioBot studioBot; - - - @Before - public void setUp() throws Exception - { - studioBot = new StudioBot(); - studioBot.resetLdapPerspective(); - - // activate search and modifications logs, they also include an LDIF editor and increment the counter - studioBot.getSearchLogsViewBot().getSearchLogsText(); - studioBot.getModificationLogsViewBot().getModificationLogsText(); - } - - - @After - public void tearDown() throws Exception - { - Assertions.genericTearDownAssertions(); - } - /** * Test for DIRSTUDIO-1043 (First open of LDIF editor fails) @@ -73,22 +42,29 @@ public class LdifEditorTest extends AbstractLdapTestUnit @Test public void testNewLdifEditor() throws Exception { - /* - * This test fails on Jenkins Windows Server, to be investigated... - */ - // Assume.assumeFalse( StudioSystemUtils.IS_OS_WINDOWS_SERVER ); - + // Open first LDIF editor NewWizardBot newWizard = studioBot.openNewWizard(); newWizard.selectLdifFile(); assertTrue( newWizard.isFinishButtonEnabled() ); newWizard.clickFinishButton(); - // TODO: use matcher instead of hard code editor number - LdifEditorBot ldifEditorBot = new LdifEditorBot( "LDIF 3" ); + LdifEditorBot ldifEditorBot = new LdifEditorBot( "LDIF" ); ldifEditorBot.activate(); ldifEditorBot.typeText( "dn: dc=test\nobjectClass: domain\n\n" ); assertTrue( ldifEditorBot.isDirty() ); ldifEditorBot.close(); + + // Open second LDIF editor + NewWizardBot newWizard2 = studioBot.openNewWizard(); + newWizard2.selectLdifFile(); + assertTrue( newWizard2.isFinishButtonEnabled() ); + newWizard2.clickFinishButton(); + + LdifEditorBot ldifEditorBot2 = new LdifEditorBot( "LDIF" ); + ldifEditorBot2.activate(); + ldifEditorBot2.typeText( "dn: dc=test\nobjectClass: domain\n\n" ); + assertTrue( ldifEditorBot2.isDirty() ); + ldifEditorBot2.close(); } } |