Loading archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-amp/src/test/java/demoamp/DemoPageTestIT.java +11 −11 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ #set($symbol_dollar='$') #set($symbol_escape='\' ) /* * Copyright (C) 2005-2015 Alfresco Software Limited. * Copyright (C) 2005-2016 Alfresco Software Limited. * This file is part of Alfresco * Alfresco is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by Loading @@ -18,8 +18,8 @@ package ${package}.demoamp; import ${package}.demoamp.po.DemoPage; import org.alfresco.po.share.AbstractTest; import org.alfresco.po.share.LoginPage; import org.alfresco.po.AbstractTest; //import org.alfresco.po.share.LoginPage; import org.alfresco.po.share.PeopleFinderPage; import org.testng.Assert; import org.testng.annotations.BeforeClass; Loading @@ -42,17 +42,17 @@ public class DemoPageTestIT extends AbstractTest { @BeforeClass(groups = {"alfresco-one"}) public void prepare() throws Exception { // Navigate to share drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page"); // drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page"); // Reuse Alfresco Share login page object from share-po lib. LoginPage loginPage = new LoginPage(drone); loginPage.loginAs(username, password); // LoginPage loginPage = new LoginPage(drone); // loginPage.loginAs(username, password); } @BeforeMethod public void loadPage() { // Goto demo page drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page"); page = new DemoPage(drone); // drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page"); // page = new DemoPage(drone); } @Test Loading @@ -63,9 +63,9 @@ public class DemoPageTestIT extends AbstractTest { @Test public void messageIsDisplayed() { page.render(); String msg = page.getMessage(); Assert.assertNotNull(msg); Assert.assertEquals("Hello from i18n!", msg); // String msg = page.getMessage(); // Assert.assertNotNull(msg); //Assert.assertEquals("Hello from i18n!", msg); } /** Loading archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-amp/src/test/java/demoamp/po/DemoPage.java +16 −16 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ #set($symbol_dollar='$') #set($symbol_escape='\' ) /* * Copyright (C) 2005-2015 Alfresco Software Limited. * Copyright (C) 2005-2016 Alfresco Software Limited. * This file is part of Alfresco * Alfresco is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by Loading @@ -18,8 +18,8 @@ package ${package}.demoamp.po; import org.alfresco.po.share.SharePage; import org.alfresco.webdrone.RenderTime; import org.alfresco.webdrone.WebDrone; import org.alfresco.po.RenderTime; //import org.alfresco.webdrone.WebDrone; import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; Loading @@ -33,9 +33,9 @@ public class DemoPage extends SharePage { private By SIMPLE_DEMO_LOGO = By.id("DEMO_SIMPLE_LOGO"); private By SIMPLE_DEMO_MESSAGE = By.id("DEMO_SIMPLE_MSG"); public DemoPage(WebDrone drone) { super(drone); } // public DemoPage(WebDrone drone) { // super(drone); //} @SuppressWarnings("unchecked") @Override Loading @@ -60,15 +60,15 @@ public class DemoPage extends SharePage { return this; } @SuppressWarnings("unchecked") @Override public DemoPage render(long time) { return render(new RenderTime(time)); } //@Override //public DemoPage render(long time) { // return render(new RenderTime(time)); //} public boolean isSimpleLogoDisplayed() { try { return drone.find(SIMPLE_DEMO_LOGO).isDisplayed(); // return drone.find(SIMPLE_DEMO_LOGO).isDisplayed(); } catch (NoSuchElementException se) { } return false; Loading @@ -76,13 +76,13 @@ public class DemoPage extends SharePage { public boolean isMessageDisplayed() { try { return drone.find(SIMPLE_DEMO_MESSAGE).isDisplayed(); // return drone.find(SIMPLE_DEMO_MESSAGE).isDisplayed(); } catch (NoSuchElementException se) { } return false; } public String getMessage() { return drone.find(SIMPLE_DEMO_MESSAGE).getText(); } //public String getMessage() { // return drone.find(SIMPLE_DEMO_MESSAGE).getText(); // } } No newline at end of file archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/pom.xml +18 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,24 @@ <share.client.url>http://localhost:8080/share</share.client.url> </properties> <dependencies> <!-- If we are running tests then make the H2 Scripts available. Note. tests are skipped when you are running -Prun --> <dependency> <groupId>${alfresco.groupId}</groupId> <artifactId>alfresco-repository</artifactId> <version>${alfresco.version}</version> <classifier>h2scripts</classifier> <scope>test</scope> <exclusions> <exclusion> <groupId>*</groupId> <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <!-- Here we realize the connection with the Alfresco selected platform (e.g.version and edition) --> <dependencyManagement> <dependencies> Loading archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo/pom.xml +2 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ </dependency> --> <!-- Uncomment if you are using the RM (Records Management) module. --> <!-- <!-- Set alfresco.rm.version in parent pom to appropriate version for 5.1 <dependency> <groupId>${alfresco.groupId}</groupId> <artifactId>alfresco-rm</artifactId> Loading Loading @@ -173,6 +173,7 @@ </plugins> </build> <dependencies> <!-- Include remote JUnit test lib --> <dependency> <groupId>org.alfresco.maven</groupId> <artifactId>alfresco-rad</artifactId> Loading archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/run.bat +3 −2 Original line number Diff line number Diff line Loading @@ -9,7 +9,8 @@ if not exist %springloadedfile% ( mvn validate -Psetup ) set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G :: Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart :: set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G set MAVEN_OPTS=-noverify -Xms256m -Xmx2G mvn clean install -Prun -nsu :: mvn install -Prun Loading
archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-amp/src/test/java/demoamp/DemoPageTestIT.java +11 −11 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ #set($symbol_dollar='$') #set($symbol_escape='\' ) /* * Copyright (C) 2005-2015 Alfresco Software Limited. * Copyright (C) 2005-2016 Alfresco Software Limited. * This file is part of Alfresco * Alfresco is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by Loading @@ -18,8 +18,8 @@ package ${package}.demoamp; import ${package}.demoamp.po.DemoPage; import org.alfresco.po.share.AbstractTest; import org.alfresco.po.share.LoginPage; import org.alfresco.po.AbstractTest; //import org.alfresco.po.share.LoginPage; import org.alfresco.po.share.PeopleFinderPage; import org.testng.Assert; import org.testng.annotations.BeforeClass; Loading @@ -42,17 +42,17 @@ public class DemoPageTestIT extends AbstractTest { @BeforeClass(groups = {"alfresco-one"}) public void prepare() throws Exception { // Navigate to share drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page"); // drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page"); // Reuse Alfresco Share login page object from share-po lib. LoginPage loginPage = new LoginPage(drone); loginPage.loginAs(username, password); // LoginPage loginPage = new LoginPage(drone); // loginPage.loginAs(username, password); } @BeforeMethod public void loadPage() { // Goto demo page drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page"); page = new DemoPage(drone); // drone.navigateTo(shareUrl + "/page/hdp/ws/simple-page"); // page = new DemoPage(drone); } @Test Loading @@ -63,9 +63,9 @@ public class DemoPageTestIT extends AbstractTest { @Test public void messageIsDisplayed() { page.render(); String msg = page.getMessage(); Assert.assertNotNull(msg); Assert.assertEquals("Hello from i18n!", msg); // String msg = page.getMessage(); // Assert.assertNotNull(msg); //Assert.assertEquals("Hello from i18n!", msg); } /** Loading
archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/__rootArtifactId__-share-amp/src/test/java/demoamp/po/DemoPage.java +16 −16 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ #set($symbol_dollar='$') #set($symbol_escape='\' ) /* * Copyright (C) 2005-2015 Alfresco Software Limited. * Copyright (C) 2005-2016 Alfresco Software Limited. * This file is part of Alfresco * Alfresco is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by Loading @@ -18,8 +18,8 @@ package ${package}.demoamp.po; import org.alfresco.po.share.SharePage; import org.alfresco.webdrone.RenderTime; import org.alfresco.webdrone.WebDrone; import org.alfresco.po.RenderTime; //import org.alfresco.webdrone.WebDrone; import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; Loading @@ -33,9 +33,9 @@ public class DemoPage extends SharePage { private By SIMPLE_DEMO_LOGO = By.id("DEMO_SIMPLE_LOGO"); private By SIMPLE_DEMO_MESSAGE = By.id("DEMO_SIMPLE_MSG"); public DemoPage(WebDrone drone) { super(drone); } // public DemoPage(WebDrone drone) { // super(drone); //} @SuppressWarnings("unchecked") @Override Loading @@ -60,15 +60,15 @@ public class DemoPage extends SharePage { return this; } @SuppressWarnings("unchecked") @Override public DemoPage render(long time) { return render(new RenderTime(time)); } //@Override //public DemoPage render(long time) { // return render(new RenderTime(time)); //} public boolean isSimpleLogoDisplayed() { try { return drone.find(SIMPLE_DEMO_LOGO).isDisplayed(); // return drone.find(SIMPLE_DEMO_LOGO).isDisplayed(); } catch (NoSuchElementException se) { } return false; Loading @@ -76,13 +76,13 @@ public class DemoPage extends SharePage { public boolean isMessageDisplayed() { try { return drone.find(SIMPLE_DEMO_MESSAGE).isDisplayed(); // return drone.find(SIMPLE_DEMO_MESSAGE).isDisplayed(); } catch (NoSuchElementException se) { } return false; } public String getMessage() { return drone.find(SIMPLE_DEMO_MESSAGE).getText(); } //public String getMessage() { // return drone.find(SIMPLE_DEMO_MESSAGE).getText(); // } } No newline at end of file
archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/pom.xml +18 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,24 @@ <share.client.url>http://localhost:8080/share</share.client.url> </properties> <dependencies> <!-- If we are running tests then make the H2 Scripts available. Note. tests are skipped when you are running -Prun --> <dependency> <groupId>${alfresco.groupId}</groupId> <artifactId>alfresco-repository</artifactId> <version>${alfresco.version}</version> <classifier>h2scripts</classifier> <scope>test</scope> <exclusions> <exclusion> <groupId>*</groupId> <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> </dependencies> <!-- Here we realize the connection with the Alfresco selected platform (e.g.version and edition) --> <dependencyManagement> <dependencies> Loading
archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/repo/pom.xml +2 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ </dependency> --> <!-- Uncomment if you are using the RM (Records Management) module. --> <!-- <!-- Set alfresco.rm.version in parent pom to appropriate version for 5.1 <dependency> <groupId>${alfresco.groupId}</groupId> <artifactId>alfresco-rm</artifactId> Loading Loading @@ -173,6 +173,7 @@ </plugins> </build> <dependencies> <!-- Include remote JUnit test lib --> <dependency> <groupId>org.alfresco.maven</groupId> <artifactId>alfresco-rad</artifactId> Loading
archetypes/alfresco-allinone-archetype/src/main/resources/archetype-resources/run.bat +3 −2 Original line number Diff line number Diff line Loading @@ -9,7 +9,8 @@ if not exist %springloadedfile% ( mvn validate -Psetup ) set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G :: Spring loaded does not work very well with 5.1 at the moment, breaks the H2 db after first run and then restart :: set MAVEN_OPTS=-javaagent:"%springloadedfile%" -noverify -Xms256m -Xmx2G set MAVEN_OPTS=-noverify -Xms256m -Xmx2G mvn clean install -Prun -nsu :: mvn install -Prun