Revision f64f32be
Added by Andreas Müller almost 2 years ago
src/main/java/eu/etaxonomy/dataportal/DataPortalSite.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
import java.net.URI; |
12 | 12 |
|
13 |
import org.apache.log4j.Logger; |
|
13 |
import org.apache.logging.log4j.LogManager; |
|
14 |
import org.apache.logging.log4j.Logger; |
|
14 | 15 |
|
15 | 16 |
/** |
16 |
* |
|
17 | 17 |
* @author a.kohlbecker |
18 |
* |
|
19 | 18 |
*/ |
20 | 19 |
public enum DataPortalSite { |
21 | 20 |
|
... | ... | |
25 | 24 |
floramalesiana, |
26 | 25 |
reference; |
27 | 26 |
|
28 |
DataPortalContext context;
|
|
27 |
public final Logger logger = LogManager.getLogger();
|
|
29 | 28 |
|
30 |
public final Logger logger = Logger.getLogger(DataPortalSite.class);
|
|
29 |
DataPortalContext context;
|
|
31 | 30 |
|
32 | 31 |
private DataPortalSite() { |
33 | 32 |
|
src/main/java/eu/etaxonomy/dataportal/ElementUtils.java | ||
---|---|---|
12 | 12 |
import java.util.List; |
13 | 13 |
|
14 | 14 |
import org.apache.commons.lang3.StringUtils; |
15 |
import org.apache.log4j.Logger; |
|
15 |
import org.apache.logging.log4j.LogManager; |
|
16 |
import org.apache.logging.log4j.Logger; |
|
16 | 17 |
import org.openqa.selenium.By; |
17 | 18 |
import org.openqa.selenium.WebElement; |
18 | 19 |
import org.openqa.selenium.support.ui.WebDriverWait; |
... | ... | |
26 | 27 |
/** |
27 | 28 |
* @author andreas |
28 | 29 |
* @since Sep 16, 2011 |
29 |
* |
|
30 | 30 |
*/ |
31 | 31 |
public class ElementUtils { |
32 | 32 |
|
33 |
|
|
34 |
public static final Logger logger = Logger.getLogger(ElementUtils.class); |
|
35 |
|
|
33 |
private static final Logger logger = LogManager.getLogger(); |
|
36 | 34 |
|
37 | 35 |
public static List<BaseElement> baseElementsFromFootNoteListElements(List<WebElement> fnListElements) { |
38 |
List<BaseElement> footNotes = new ArrayList<BaseElement>();
|
|
36 |
List<BaseElement> footNotes = new ArrayList<>(); |
|
39 | 37 |
for(WebElement fn : fnListElements) { |
40 | 38 |
footNotes.add(new BaseElement(fn)); |
41 | 39 |
} |
... | ... | |
44 | 42 |
|
45 | 43 |
|
46 | 44 |
public static List<LinkElement> linkElementsFromFootNoteKeyListElements(List<WebElement> fnkListElements) { |
47 |
List<LinkElement> footNoteKeys = new ArrayList<LinkElement>();
|
|
45 |
List<LinkElement> footNoteKeys = new ArrayList<>(); |
|
48 | 46 |
for(WebElement fnk : fnkListElements) { |
49 | 47 |
footNoteKeys.add(new LinkElement(fnk)); |
50 | 48 |
} |
... | ... | |
64 | 62 |
return null; |
65 | 63 |
} |
66 | 64 |
|
67 |
ArrayList<List<GalleryImage>> galleryImageRows = new ArrayList<List<GalleryImage>>();
|
|
65 |
ArrayList<List<GalleryImage>> galleryImageRows = new ArrayList<>(); |
|
68 | 66 |
|
69 | 67 |
List<WebElement> mediaRows = gallery.findElements(By.cssSelector("tr.media-row")); |
70 | 68 |
List<WebElement> captionRows = gallery.findElements(By.cssSelector("tr.caption-row")); |
... | ... | |
144 | 142 |
markup += ">"; |
145 | 143 |
return markup; |
146 | 144 |
} |
147 |
|
|
148 |
|
|
149 |
} |
|
145 |
} |
src/main/java/eu/etaxonomy/dataportal/TestConfiguration.java | ||
---|---|---|
14 | 14 |
import java.util.Properties; |
15 | 15 |
import java.util.UUID; |
16 | 16 |
|
17 |
import org.apache.log4j.Logger; |
|
17 |
import org.apache.logging.log4j.LogManager; |
|
18 |
import org.apache.logging.log4j.Logger; |
|
18 | 19 |
|
19 | 20 |
import eu.etaxonomy.dataportal.selenium.WebDriverFactory; |
20 | 21 |
|
... | ... | |
30 | 31 |
private static final String DATA_PORTAL_TEST_PROPERTIES_FILE = "DataPortalTest.xml"; |
31 | 32 |
private static final String DATAPORTAL_TEST_CONF = "dataportal.test.conf"; |
32 | 33 |
|
33 |
public final static Logger logger = Logger.getLogger(TestConfiguration.class);
|
|
34 |
private static final Logger logger = LogManager.getLogger();
|
|
34 | 35 |
|
35 | 36 |
final Properties properties = new Properties(); |
36 | 37 |
|
src/main/java/eu/etaxonomy/dataportal/elements/BaseElement.java | ||
---|---|---|
13 | 13 |
import java.util.List; |
14 | 14 |
|
15 | 15 |
import org.apache.commons.lang.StringUtils; |
16 |
import org.apache.log4j.Logger; |
|
16 |
import org.apache.logging.log4j.LogManager; |
|
17 |
import org.apache.logging.log4j.Logger; |
|
17 | 18 |
import org.openqa.selenium.By; |
18 | 19 |
import org.openqa.selenium.NoSuchElementException; |
19 | 20 |
import org.openqa.selenium.WebDriver; |
... | ... | |
27 | 28 |
/** |
28 | 29 |
* @author Andreas Kohlbecker |
29 | 30 |
* @since Jul 1, 2011 |
30 |
* |
|
31 | 31 |
*/ |
32 | 32 |
public class BaseElement { |
33 | 33 |
|
34 |
public static final Logger logger = Logger.getLogger(BaseElement.class);
|
|
34 |
private static final Logger logger = LogManager.getLogger();
|
|
35 | 35 |
|
36 | 36 |
/** |
37 | 37 |
* Default tolerance for testing sizes and positions |
src/main/java/eu/etaxonomy/dataportal/elements/DrupalBlock.java | ||
---|---|---|
8 | 8 |
*/ |
9 | 9 |
package eu.etaxonomy.dataportal.elements; |
10 | 10 |
|
11 |
import org.apache.log4j.Level; |
|
11 |
import org.apache.logging.log4j.Level; |
|
12 |
import org.apache.logging.log4j.LogManager; |
|
13 |
import org.apache.logging.log4j.Logger; |
|
12 | 14 |
import org.openqa.selenium.By; |
13 | 15 |
import org.openqa.selenium.NoSuchElementException; |
14 | 16 |
import org.openqa.selenium.WebElement; |
15 | 17 |
|
18 |
import eu.etaxonomy.cdm.common.LogUtils; |
|
19 |
|
|
16 | 20 |
|
17 | 21 |
/** |
18 | 22 |
* @author andreas |
... | ... | |
21 | 25 |
*/ |
22 | 26 |
public class DrupalBlock extends BaseElement { |
23 | 27 |
|
28 |
private static final Logger logger = LogManager.getLogger(); |
|
29 |
|
|
24 | 30 |
WebElement titleElement; |
25 | 31 |
|
26 | 32 |
|
... | ... | |
32 | 38 |
|
33 | 39 |
super(element); |
34 | 40 |
|
35 |
logger.setLevel(Level.TRACE);
|
|
41 |
LogUtils.setLevel(logger, Level.TRACE);
|
|
36 | 42 |
logger.trace("DrupalBlock() - constructor after super()"); |
37 | 43 |
|
38 | 44 |
try { |
src/main/java/eu/etaxonomy/dataportal/elements/FeatureBlock.java | ||
---|---|---|
14 | 14 |
import java.util.HashMap; |
15 | 15 |
import java.util.List; |
16 | 16 |
|
17 |
import org.apache.logging.log4j.LogManager; |
|
18 |
import org.apache.logging.log4j.Logger; |
|
17 | 19 |
import org.openqa.selenium.By; |
18 | 20 |
import org.openqa.selenium.JavascriptExecutor; |
19 | 21 |
import org.openqa.selenium.NoSuchElementException; |
... | ... | |
27 | 29 |
*/ |
28 | 30 |
public class FeatureBlock extends DrupalBlock { |
29 | 31 |
|
32 |
private static final Logger logger = LogManager.getLogger(); |
|
33 |
|
|
30 | 34 |
/** |
31 | 35 |
* JQuery Selector for footnotekeys |
32 | 36 |
*/ |
src/main/java/eu/etaxonomy/dataportal/elements/OpenLayersMap.java | ||
---|---|---|
12 | 12 |
import java.util.List; |
13 | 13 |
import java.util.stream.Collectors; |
14 | 14 |
|
15 |
import org.apache.log4j.Logger;
|
|
15 |
import org.apache.logging.log4j.LogManager;
|
|
16 | 16 |
import org.openqa.selenium.By; |
17 | 17 |
import org.openqa.selenium.NoSuchElementException; |
18 | 18 |
import org.openqa.selenium.WebElement; |
... | ... | |
43 | 43 |
.findElements(By.className("openlayers-container")); |
44 | 44 |
return maps.stream().map(m -> new OpenLayersMap(m)).collect(Collectors.toList()); |
45 | 45 |
} catch (NoSuchElementException e) { |
46 |
Logger.getLogger(OpenLayersMap.class).info("No maps found", e); |
|
46 |
LogManager.getLogger(OpenLayersMap.class).info("No maps found", e);
|
|
47 | 47 |
return new ArrayList<>(); |
48 | 48 |
} |
49 | 49 |
} |
50 | 50 |
|
51 |
/** |
|
52 |
* @return the webElement |
|
53 |
*/ |
|
54 | 51 |
public WebElement getWebElement() { |
55 | 52 |
return webElement; |
56 | 53 |
} |
57 | 54 |
|
58 |
/** |
|
59 |
* @return the mapId |
|
60 |
*/ |
|
61 | 55 |
public String getMapId() { |
62 | 56 |
return mapId; |
63 | 57 |
} |
64 | 58 |
|
65 |
/** |
|
66 |
* @return the mapName |
|
67 |
*/ |
|
68 | 59 |
public String getMapName() { |
69 | 60 |
return mapName; |
70 | 61 |
} |
71 |
|
|
72 |
} |
|
62 |
} |
src/main/java/eu/etaxonomy/dataportal/elements/RegistrationItem.java | ||
---|---|---|
11 | 11 |
import java.util.ArrayList; |
12 | 12 |
import java.util.List; |
13 | 13 |
|
14 |
import org.apache.logging.log4j.LogManager; |
|
15 |
import org.apache.logging.log4j.Logger; |
|
14 | 16 |
import org.openqa.selenium.By; |
15 | 17 |
import org.openqa.selenium.WebElement; |
16 | 18 |
|
... | ... | |
21 | 23 |
*/ |
22 | 24 |
abstract public class RegistrationItem extends BaseElement { |
23 | 25 |
|
26 |
private static final Logger logger = LogManager.getLogger(); |
|
27 |
|
|
24 | 28 |
enum Style { |
25 | 29 |
/** |
26 | 30 |
* style produced by modules/cdm_dataportal/includes/name.inc#compose_registration_dto_full() |
src/main/java/eu/etaxonomy/dataportal/elements/TypeDesignationElement.java | ||
---|---|---|
8 | 8 |
*/ |
9 | 9 |
package eu.etaxonomy.dataportal.elements; |
10 | 10 |
|
11 |
import org.apache.log4j.Logger; |
|
11 |
import org.apache.logging.log4j.LogManager; |
|
12 |
import org.apache.logging.log4j.Logger; |
|
12 | 13 |
import org.openqa.selenium.By; |
13 | 14 |
import org.openqa.selenium.NoSuchElementException; |
14 | 15 |
import org.openqa.selenium.WebElement; |
... | ... | |
18 | 19 |
/** |
19 | 20 |
* @author andreas |
20 | 21 |
* @since Jul 30, 2012 |
21 |
* |
|
22 | 22 |
*/ |
23 | 23 |
public class TypeDesignationElement extends BaseElement { |
24 | 24 |
|
25 |
private static final Logger logger = Logger.getLogger(TypeDesignationElement.class);
|
|
25 |
private static final Logger logger = LogManager.getLogger();
|
|
26 | 26 |
|
27 | 27 |
private final WebElement status; |
28 | 28 |
|
src/main/java/eu/etaxonomy/dataportal/junit/CdmDataPortalTestBase.java | ||
---|---|---|
13 | 13 |
import java.util.List; |
14 | 14 |
import java.util.Map; |
15 | 15 |
|
16 |
import org.apache.log4j.Logger; |
|
16 |
import org.apache.logging.log4j.LogManager; |
|
17 |
import org.apache.logging.log4j.Logger; |
|
17 | 18 |
import org.junit.After; |
18 | 19 |
import org.junit.AfterClass; |
19 | 20 |
import org.junit.Assert; |
... | ... | |
33 | 34 |
@RunWith(DataPortalContextSuite.class) |
34 | 35 |
public abstract class CdmDataPortalTestBase extends Assert{ |
35 | 36 |
|
36 |
public static final Logger logger = Logger.getLogger(CdmDataPortalTestBase.class);
|
|
37 |
private static final Logger logger = LogManager.getLogger();
|
|
37 | 38 |
|
38 | 39 |
protected static WebDriver driver; |
39 | 40 |
|
src/main/java/eu/etaxonomy/dataportal/pages/NamePage.java | ||
---|---|---|
14 | 14 |
import java.util.List; |
15 | 15 |
import java.util.UUID; |
16 | 16 |
|
17 |
import org.apache.log4j.Logger; |
|
17 |
import org.apache.logging.log4j.LogManager; |
|
18 |
import org.apache.logging.log4j.Logger; |
|
18 | 19 |
import org.openqa.selenium.By; |
19 | 20 |
import org.openqa.selenium.WebDriver; |
20 | 21 |
import org.openqa.selenium.WebElement; |
... | ... | |
31 | 32 |
*/ |
32 | 33 |
public class NamePage extends PortalPage { |
33 | 34 |
|
34 |
|
|
35 |
public static final Logger logger = Logger.getLogger(NamePage.class); |
|
35 |
private static final Logger logger = LogManager.getLogger(); |
|
36 | 36 |
|
37 | 37 |
protected static String drupalPagePathBase = "cdm_dataportal/name"; |
38 | 38 |
|
src/main/java/eu/etaxonomy/dataportal/pages/PolytomousKeyPage.java | ||
---|---|---|
5 | 5 |
import java.util.List; |
6 | 6 |
import java.util.UUID; |
7 | 7 |
|
8 |
import org.apache.log4j.Logger; |
|
8 |
import org.apache.logging.log4j.LogManager; |
|
9 |
import org.apache.logging.log4j.Logger; |
|
9 | 10 |
import org.junit.Assert; |
10 | 11 |
import org.openqa.selenium.By; |
11 | 12 |
import org.openqa.selenium.WebDriver; |
... | ... | |
21 | 22 |
|
22 | 23 |
public class PolytomousKeyPage extends PortalPage { |
23 | 24 |
|
24 |
public static final Logger logger = Logger.getLogger(PolytomousKeyPage.class);
|
|
25 |
private static final Logger logger = LogManager.getLogger();
|
|
25 | 26 |
|
26 | 27 |
private static String drupalPagePathBase = "cdm_dataportal/polytomousKey"; |
27 | 28 |
|
28 |
/* (non-Javadoc) |
|
29 |
* @see eu.etaxonomy.dataportal.pages.PortalPage#getDrupalPageBase() |
|
30 |
*/ |
|
31 | 29 |
@Override |
32 | 30 |
protected String getDrupalPageBase() { |
33 | 31 |
return drupalPagePathBase; |
... | ... | |
153 | 151 |
return nextPage; |
154 | 152 |
} |
155 | 153 |
|
156 |
|
|
157 | 154 |
private String composeFullEdgeText(KeyLineData data) { |
158 | 155 |
return data.edgeText + "\n" + data.getLinkTextWithSuffix(); |
159 | 156 |
} |
160 |
|
|
161 |
|
|
162 |
|
|
163 |
|
|
164 |
|
|
165 |
} |
|
157 |
} |
src/main/java/eu/etaxonomy/dataportal/pages/PortalPage.java | ||
---|---|---|
20 | 20 |
import java.util.stream.Collectors; |
21 | 21 |
|
22 | 22 |
import org.apache.commons.io.FileUtils; |
23 |
import org.apache.log4j.Logger; |
|
23 |
import org.apache.logging.log4j.LogManager; |
|
24 |
import org.apache.logging.log4j.Logger; |
|
24 | 25 |
import org.openqa.selenium.By; |
25 | 26 |
import org.openqa.selenium.NoSuchElementException; |
26 | 27 |
import org.openqa.selenium.OutputType; |
... | ... | |
53 | 54 |
|
54 | 55 |
public static final int WAIT_SECONDS = 25; |
55 | 56 |
|
56 |
public static final Logger logger = Logger.getLogger(PortalPage.class);
|
|
57 |
private static final Logger logger = LogManager.getLogger();
|
|
57 | 58 |
|
58 | 59 |
protected final static String DRUPAL_PAGE_QUERY = "q="; |
59 | 60 |
|
src/main/java/eu/etaxonomy/dataportal/pages/RegistrationPage.java | ||
---|---|---|
12 | 12 |
import java.net.MalformedURLException; |
13 | 13 |
import java.util.Collections; |
14 | 14 |
|
15 |
import org.apache.log4j.Logger; |
|
16 | 15 |
import org.openqa.selenium.WebDriver; |
17 | 16 |
import org.openqa.selenium.WebElement; |
18 | 17 |
import org.openqa.selenium.support.CacheLookup; |
... | ... | |
24 | 23 |
/** |
25 | 24 |
* @author a.kohlbecker |
26 | 25 |
* @since Feb 4, 2019 |
27 |
* |
|
28 | 26 |
*/ |
29 | 27 |
public class RegistrationPage extends PortalPage { |
30 | 28 |
|
31 |
|
|
32 |
public static final Logger logger = Logger.getLogger(TaxonProfilePage.class); |
|
33 |
|
|
34 | 29 |
protected static String drupalPagePathBase = "cdm_dataportal/registration"; |
35 | 30 |
|
36 |
|
|
37 | 31 |
@FindBy(id = "registration") |
38 | 32 |
@CacheLookup |
39 | 33 |
private WebElement registrationElement; |
... | ... | |
49 | 43 |
super(driver, context); |
50 | 44 |
} |
51 | 45 |
|
52 |
|
|
53 | 46 |
public RegistrationPage(WebDriver driver, DataPortalContext context, String httpID) throws MalformedURLException, UnsupportedEncodingException { |
54 | 47 |
super(driver, context, null, Collections.singletonMap("identifier", httpID)); |
55 | 48 |
} |
56 | 49 |
|
57 |
/** |
|
58 |
* {@inheritDoc} |
|
59 |
*/ |
|
60 | 50 |
@Override |
61 | 51 |
protected String getDrupalPageBase() { |
62 | 52 |
return drupalPagePathBase; |
63 | 53 |
} |
64 | 54 |
|
65 |
/** |
|
66 |
* @return the registrationItem |
|
67 |
*/ |
|
68 | 55 |
public RegistrationItemFull getRegistrationItem() { |
69 | 56 |
|
70 | 57 |
if(registrationItem == null){ |
... | ... | |
72 | 59 |
} |
73 | 60 |
return registrationItem; |
74 | 61 |
} |
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
81 |
|
|
82 |
} |
|
62 |
} |
src/main/java/eu/etaxonomy/dataportal/pages/TaxonPage.java | ||
---|---|---|
1 |
|
|
2 | 1 |
/** |
3 | 2 |
* Copyright (C) 2009 EDIT |
4 | 3 |
* European Distributed Institute of Taxonomy |
... | ... | |
15 | 14 |
import java.util.UUID; |
16 | 15 |
|
17 | 16 |
import org.apache.commons.lang3.StringUtils; |
18 |
import org.apache.log4j.Logger; |
|
19 | 17 |
import org.openqa.selenium.By; |
20 | 18 |
import org.openqa.selenium.WebDriver; |
21 | 19 |
import org.openqa.selenium.WebElement; |
... | ... | |
28 | 26 |
* |
29 | 27 |
* @author andreas |
30 | 28 |
* @since Jul 1, 2011 |
31 |
* |
|
32 | 29 |
*/ |
33 | 30 |
public class TaxonPage extends PortalPage { |
34 | 31 |
|
35 |
public static final Logger logger = Logger.getLogger(TaxonProfilePage.class); |
|
36 |
|
|
37 | 32 |
protected static String drupalPagePathBase = "cdm_dataportal/taxon"; |
38 | 33 |
|
39 |
|
|
40 | 34 |
@Override |
41 | 35 |
protected String getDrupalPageBase() { |
42 | 36 |
return drupalPagePathBase; |
... | ... | |
88 | 82 |
} |
89 | 83 |
return statusEls; |
90 | 84 |
} |
91 |
|
|
92 |
|
|
93 |
} |
|
85 |
} |
src/main/java/eu/etaxonomy/dataportal/pages/TaxonProfilePage.java | ||
---|---|---|
17 | 17 |
import java.util.List; |
18 | 18 |
import java.util.UUID; |
19 | 19 |
|
20 |
import org.apache.log4j.Level; |
|
21 |
import org.apache.log4j.Logger; |
|
20 |
import org.apache.logging.log4j.Level; |
|
21 |
import org.apache.logging.log4j.LogManager; |
|
22 |
import org.apache.logging.log4j.Logger; |
|
22 | 23 |
import org.junit.Assert; |
23 | 24 |
import org.openqa.selenium.By; |
24 | 25 |
import org.openqa.selenium.NoSuchElementException; |
... | ... | |
27 | 28 |
import org.openqa.selenium.support.CacheLookup; |
28 | 29 |
import org.openqa.selenium.support.FindBy; |
29 | 30 |
|
31 |
import eu.etaxonomy.cdm.common.LogUtils; |
|
30 | 32 |
import eu.etaxonomy.dataportal.DataPortalContext; |
31 | 33 |
import eu.etaxonomy.dataportal.elements.FeatureBlock; |
32 | 34 |
import eu.etaxonomy.dataportal.elements.ImgElement; |
... | ... | |
41 | 43 |
*/ |
42 | 44 |
public class TaxonProfilePage extends TaxonPage { |
43 | 45 |
|
44 |
public static final Logger logger = Logger.getLogger(TaxonProfilePage.class);
|
|
46 |
private static final Logger logger = LogManager.getLogger();
|
|
45 | 47 |
|
46 | 48 |
protected static String drupalPagePathBase = "cdm_dataportal/taxon"; |
47 | 49 |
|
... | ... | |
145 | 147 |
*/ |
146 | 148 |
public FeatureBlock getFeatureBlockAt(int position, String featureName, String enclosingTag, String elementTag){ |
147 | 149 |
|
148 |
logger.setLevel(Level.TRACE);
|
|
150 |
LogUtils.setLevel(logger, Level.TRACE);
|
|
149 | 151 |
logger.trace("getFeatureBlockAt()"); |
150 | 152 |
List<WebElement> featureBlocks = getDataPortalContent().getElement().findElements(By.className("block-cdm-dataportal-feature")); |
151 | 153 |
Assert.assertTrue("Too few feature block elements", featureBlocks.size() >= position); |
src/main/java/eu/etaxonomy/dataportal/pages/TaxonSearchResultPage.java | ||
---|---|---|
13 | 13 |
import java.util.UUID; |
14 | 14 |
import java.util.concurrent.TimeUnit; |
15 | 15 |
|
16 |
import org.apache.log4j.Logger; |
|
16 |
import org.apache.logging.log4j.LogManager; |
|
17 |
import org.apache.logging.log4j.Logger; |
|
17 | 18 |
import org.openqa.selenium.By; |
18 | 19 |
import org.openqa.selenium.WebDriver; |
19 | 20 |
import org.openqa.selenium.WebElement; |
... | ... | |
28 | 29 |
/** |
29 | 30 |
* @author andreas |
30 | 31 |
* @since Aug 12, 2011 |
31 |
* |
|
32 | 32 |
*/ |
33 | 33 |
public class TaxonSearchResultPage extends GenericPortalPage { |
34 | 34 |
|
35 |
public static final Logger logger = Logger.getLogger(TaxonSearchResultPage.class);
|
|
35 |
private static final Logger logger = LogManager.getLogger();
|
|
36 | 36 |
|
37 | 37 |
private static String drupalPagePathBase = "cdm_dataportal/search/taxon"; |
38 | 38 |
|
... | ... | |
50 | 50 |
@CacheLookup |
51 | 51 |
private WebElement pager; |
52 | 52 |
|
53 |
|
|
54 |
/* (non-Javadoc) |
|
55 |
* @see eu.etaxonomy.dataportal.pages.PortalPage#getDrupalPageBase() |
|
56 |
*/ |
|
57 | 53 |
@Override |
58 | 54 |
protected String getDrupalPageBase() { |
59 | 55 |
return drupalPagePathBase; |
60 | 56 |
} |
61 | 57 |
|
62 |
/** |
|
63 |
* @param driver |
|
64 |
* @param context |
|
65 |
*/ |
|
66 | 58 |
public TaxonSearchResultPage(WebDriver driver, DataPortalContext context) throws Exception { |
67 | 59 |
super(driver, context); |
68 | 60 |
} |
69 | 61 |
|
70 |
|
|
71 | 62 |
/** |
72 | 63 |
* Find and return the result n-th item of the result list. |
73 | 64 |
* The item can be specified by the index paramter. |
74 | 65 |
* @param index 1-based index to identify the resultset item. |
75 | 66 |
* This index will be used in a xpath query. |
76 |
|
|
77 | 67 |
*/ |
78 | 68 |
public TaxonListElement getResultItem(int index) { |
79 | 69 |
|
... | ... | |
95 | 85 |
return taxonListElements; |
96 | 86 |
} |
97 | 87 |
|
98 |
/** |
|
99 |
* @throws Exception |
|
100 |
* |
|
101 |
*/ |
|
102 |
@SuppressWarnings("unchecked") |
|
103 | 88 |
public <T extends PortalPage> T clickTaxonName(TaxonListElement taxonListElement, Class<T> pageClass, UUID taxonUuid) throws Exception { |
104 | 89 |
|
105 | 90 |
LinkElement taxonlink = new LinkElement(taxonListElement.getElement().findElement(By.tagName("a"))); |
... | ... | |
109 | 94 |
pageClass, 2l, TimeUnit.MINUTES); |
110 | 95 |
|
111 | 96 |
} |
112 |
|
|
113 |
|
|
114 |
|
|
115 |
} |
|
97 |
} |
src/main/java/eu/etaxonomy/dataportal/pages/TaxonSynonymyPage.java | ||
---|---|---|
14 | 14 |
import java.util.List; |
15 | 15 |
import java.util.UUID; |
16 | 16 |
|
17 |
import org.apache.log4j.Logger; |
|
18 | 17 |
import org.openqa.selenium.By; |
19 | 18 |
import org.openqa.selenium.WebDriver; |
20 | 19 |
import org.openqa.selenium.WebElement; |
... | ... | |
32 | 31 |
* |
33 | 32 |
* @author andreas |
34 | 33 |
* @since Jul 1, 2011 |
35 |
* |
|
36 | 34 |
*/ |
37 | 35 |
public class TaxonSynonymyPage extends TaxonPage { |
38 | 36 |
|
39 |
public static final Logger logger = Logger.getLogger(TaxonSynonymyPage.class); |
|
40 |
|
|
41 | 37 |
protected static String drupalPagePathBase = "cdm_dataportal/taxon"; |
42 | 38 |
|
43 |
|
|
44 | 39 |
@FindBy(id = "synonymy") |
45 | 40 |
@CacheLookup |
46 | 41 |
private WebElement synonymy; |
47 | 42 |
|
48 |
|
|
49 | 43 |
public TaxonSynonymyPage(WebDriver driver, DataPortalContext context, UUID taxonUuid) throws MalformedURLException { |
50 | 44 |
|
51 | 45 |
super(driver, context, taxonUuid, "synonymy"); |
src/main/java/eu/etaxonomy/dataportal/selenium/WebDriverFactory.java | ||
---|---|---|
5 | 5 |
|
6 | 6 |
import java.io.IOException; |
7 | 7 |
|
8 |
import org.apache.log4j.Logger; |
|
8 |
import org.apache.logging.log4j.LogManager; |
|
9 |
import org.apache.logging.log4j.Logger; |
|
9 | 10 |
import org.openqa.selenium.WebDriver; |
10 | 11 |
import org.openqa.selenium.chrome.ChromeDriver; |
11 | 12 |
import org.openqa.selenium.chrome.ChromeOptions; |
... | ... | |
19 | 20 |
|
20 | 21 |
/** |
21 | 22 |
* @author andreas |
22 |
* |
|
23 | 23 |
*/ |
24 | 24 |
public class WebDriverFactory { |
25 | 25 |
|
26 |
|
|
27 |
public static final Logger logger = Logger.getLogger(WebDriverFactory.class); |
|
26 |
private static final Logger logger = LogManager.getLogger(); |
|
28 | 27 |
|
29 | 28 |
public static final String SYSTEM_PROPERTY_NAME_BROWSER = "browser"; |
30 | 29 |
|
... | ... | |
73 | 72 |
|
74 | 73 |
String chromeBinary = System.getProperty("webdriver.chrome.bin"); |
75 | 74 |
if(chromeBinary != null) { |
76 |
CdmDataPortalTestBase.logger.info(("webdriver.chrome.bin = " + chromeBinary));
|
|
75 |
logger.info(("webdriver.chrome.bin = " + chromeBinary)); |
|
77 | 76 |
options.setBinary(chromeBinary); |
78 | 77 |
|
79 | 78 |
} |
... | ... | |
94 | 93 |
|
95 | 94 |
WebDriver driver; |
96 | 95 |
|
97 |
CdmDataPortalTestBase.logger.info(("webdriver.firefox.bin = " + System.getProperty("webdriver.firefox.bin")));
|
|
98 |
CdmDataPortalTestBase.logger.info(("webdriver.firefox.library.path = " + System.getProperty("webdriver.firefox.library.path")));
|
|
96 |
logger.info(("webdriver.firefox.bin = " + System.getProperty("webdriver.firefox.bin"))); |
|
97 |
logger.info(("webdriver.firefox.library.path = " + System.getProperty("webdriver.firefox.library.path"))); |
|
99 | 98 |
|
100 | 99 |
FirefoxProfile firefoxProfile = new FirefoxProfile(); |
101 | 100 |
|
... | ... | |
113 | 112 |
// firefoxProfile.addExtension(CdmDataPortalTestBase.class, "/org/mozilla/addons/firepath-" + FIREXPATH_VERSION + "-fx.xpi"); |
114 | 113 |
|
115 | 114 |
} catch (IOException e) { |
116 |
CdmDataPortalTestBase.logger.error(e);
|
|
115 |
logger.error(e); |
|
117 | 116 |
System.exit(-1); |
118 | 117 |
} |
119 | 118 |
} |
... | ... | |
131 | 130 |
|
132 | 131 |
initFirefoxDriver(); |
133 | 132 |
try { |
134 |
Thread.currentThread().sleep(1000); |
|
133 |
Thread.currentThread(); |
|
134 |
Thread.sleep(1000); |
|
135 | 135 |
} catch (InterruptedException e) { |
136 | 136 |
System.err.println("InterruptedException"); |
137 | 137 |
} |
138 |
|
|
139 | 138 |
} |
140 |
|
|
141 |
|
|
142 |
|
|
143 |
|
|
144 |
} |
|
139 |
} |
src/main/java/eu/etaxonomy/drush/DrushExecuter.java | ||
---|---|---|
23 | 23 |
|
24 | 24 |
import org.apache.commons.io.IOUtils; |
25 | 25 |
import org.apache.commons.lang3.SystemUtils; |
26 |
import org.apache.log4j.Level; |
|
27 |
import org.apache.log4j.Logger; |
|
26 |
import org.apache.logging.log4j.Level; |
|
27 |
import org.apache.logging.log4j.LogManager; |
|
28 |
import org.apache.logging.log4j.Logger; |
|
28 | 29 |
|
29 | 30 |
import com.fasterxml.jackson.core.JsonProcessingException; |
30 | 31 |
import com.fasterxml.jackson.core.type.TypeReference; |
31 | 32 |
import com.fasterxml.jackson.databind.ObjectMapper; |
32 | 33 |
|
34 |
import eu.etaxonomy.cdm.common.LogUtils; |
|
35 |
|
|
33 | 36 |
/** |
34 | 37 |
* Java executor for drush (https://www.drush.org/). |
35 | 38 |
* |
... | ... | |
45 | 48 |
*/ |
46 | 49 |
public class DrushExecuter { |
47 | 50 |
|
48 |
public static final Logger logger = Logger.getLogger(DrushExecuter.class);
|
|
51 |
private static final Logger logger = LogManager.getLogger();
|
|
49 | 52 |
|
50 | 53 |
private URI siteURI = null; |
51 | 54 |
|
... | ... | |
355 | 358 |
* if the drush command execution fails with an error code |
356 | 359 |
*/ |
357 | 360 |
public static void main(String[] args) throws URISyntaxException, DrushExecutionFailure { |
358 |
DrushExecuter.logger.setLevel(Level.DEBUG);
|
|
361 |
LogUtils.setLevel(logger, Level.DEBUG);
|
|
359 | 362 |
try { |
360 | 363 |
DrushExecuter dex = new DrushExecuter(); |
361 | 364 |
List<Object> results; |
src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/Lactuca_triquetra_TaxonProfileTest.java | ||
---|---|---|
12 | 12 |
import java.util.List; |
13 | 13 |
import java.util.UUID; |
14 | 14 |
|
15 |
import org.apache.log4j.Logger; |
|
15 |
import org.apache.logging.log4j.LogManager; |
|
16 |
import org.apache.logging.log4j.Logger; |
|
16 | 17 |
import org.junit.Before; |
17 | 18 |
import org.junit.Test; |
18 | 19 |
import org.openqa.selenium.By; |
... | ... | |
30 | 31 |
|
31 | 32 |
/** |
32 | 33 |
* @author a.kohlbecker |
33 |
* |
|
34 | 34 |
*/ |
35 |
|
|
36 | 35 |
@DataPortalContexts( { DataPortalSite.cichorieae }) |
37 | 36 |
public class Lactuca_triquetra_TaxonProfileTest extends CdmDataPortalTestBase{ |
38 | 37 |
|
39 |
public static final Logger logger = Logger.getLogger(Lactuca_triquetra_TaxonProfileTest.class);
|
|
38 |
private static final Logger logger = LogManager.getLogger();
|
|
40 | 39 |
|
41 | 40 |
static UUID taxonUuid = UUID.fromString("ecb7a76e-694a-4706-b1ab-a2eb334173ff"); |
42 | 41 |
|
src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/Allium_guttatum_subsp_guttatum_TaxonProfileTest.java | ||
---|---|---|
8 | 8 |
*/ |
9 | 9 |
package eu.etaxonomy.dataportal.selenium.tests.cyprus; |
10 | 10 |
|
11 |
import static org.junit.Assert.assertEquals; |
|
12 |
import static org.junit.Assert.assertNotNull; |
|
13 |
import static org.junit.Assert.assertNull; |
|
14 |
import static org.junit.Assert.assertTrue; |
|
15 |
|
|
16 | 11 |
import java.net.MalformedURLException; |
17 | 12 |
import java.util.List; |
18 | 13 |
import java.util.UUID; |
19 | 14 |
|
15 |
import org.apache.logging.log4j.LogManager; |
|
16 |
import org.apache.logging.log4j.Logger; |
|
20 | 17 |
import org.junit.After; |
21 | 18 |
import org.junit.Before; |
22 | 19 |
import org.junit.Test; |
... | ... | |
34 | 31 |
|
35 | 32 |
/** |
36 | 33 |
* @author a.kohlbecker |
37 |
* |
|
38 | 34 |
*/ |
39 |
|
|
40 | 35 |
@DataPortalContexts( { DataPortalSite.cyprus }) |
41 | 36 |
public class Allium_guttatum_subsp_guttatum_TaxonProfileTest extends CdmDataPortalTestBase{ |
42 | 37 |
|
38 |
private static final Logger logger = LogManager.getLogger(); |
|
39 |
|
|
43 | 40 |
static UUID taxonUuid = UUID.fromString("6d04598b-3852-4038-91c9-13c7581b21a6"); |
44 | 41 |
|
45 | 42 |
TaxonProfilePage p = null; |
src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/Bassia_indica_TaxonProfileTest.java | ||
---|---|---|
12 | 12 |
import java.util.List; |
13 | 13 |
import java.util.UUID; |
14 | 14 |
|
15 |
import org.apache.logging.log4j.LogManager; |
|
16 |
import org.apache.logging.log4j.Logger; |
|
15 | 17 |
import org.junit.After; |
16 | 18 |
import org.junit.Before; |
17 | 19 |
import org.junit.Test; |
... | ... | |
25 | 27 |
|
26 | 28 |
/** |
27 | 29 |
* @author a.kohlbecker |
28 |
* |
|
29 | 30 |
*/ |
30 |
|
|
31 | 31 |
@DataPortalContexts( { DataPortalSite.cyprus }) |
32 | 32 |
public class Bassia_indica_TaxonProfileTest extends CdmDataPortalTestBase{ |
33 | 33 |
|
34 |
private static final Logger logger = LogManager.getLogger(); |
|
35 |
|
|
34 | 36 |
static UUID taxonUuid = UUID.fromString("5250a30a-9e6f-4f2f-9663-93127a1a3829"); |
35 | 37 |
|
36 | 38 |
TaxonProfilePage p = null; |
src/test/java/eu/etaxonomy/dataportal/selenium/tests/cyprus/Cyprus_OriginalSourceTest.java | ||
---|---|---|
12 | 12 |
import java.util.List; |
13 | 13 |
import java.util.UUID; |
14 | 14 |
|
15 |
import org.apache.logging.log4j.LogManager; |
|
16 |
import org.apache.logging.log4j.Logger; |
|
15 | 17 |
import org.junit.After; |
16 | 18 |
import org.junit.Before; |
17 | 19 |
import org.junit.Test; |
... | ... | |
26 | 28 |
import eu.etaxonomy.dataportal.pages.TaxonProfilePage; |
27 | 29 |
|
28 | 30 |
/** |
29 |
* |
|
30 | 31 |
* @author a.kohlbecker |
31 |
* |
|
32 | 32 |
*/ |
33 |
|
|
34 | 33 |
@DataPortalContexts( { DataPortalSite.cyprus }) |
35 | 34 |
public class Cyprus_OriginalSourceTest extends CdmDataPortalTestBase{ |
36 | 35 |
|
36 |
private static final Logger logger = LogManager.getLogger(); |
|
37 |
|
|
37 | 38 |
// Taxon Cistus creticus subsp. creticus |
38 | 39 |
static UUID taxonUuid = UUID.fromString("2e58b1ab-03a9-4693-bcec-3b8e7f04b572"); |
39 | 40 |
|
... | ... | |
43 | 44 |
public void setUp() throws MalformedURLException { |
44 | 45 |
|
45 | 46 |
p = new TaxonProfilePage(driver, getContext(), taxonUuid); |
46 |
|
|
47 | 47 |
} |
48 | 48 |
|
49 | 49 |
@After |
... | ... | |
51 | 51 |
logger.debug("@After"); |
52 | 52 |
} |
53 | 53 |
|
54 |
|
|
55 | 54 |
@Test |
56 | 55 |
public void testPage() { |
57 | 56 |
|
src/test/java/eu/etaxonomy/dataportal/selenium/tests/flMalesiana/FloraMalesiana_DescriptionTest.java | ||
---|---|---|
11 | 11 |
import java.util.List; |
12 | 12 |
import java.util.UUID; |
13 | 13 |
|
14 |
import org.apache.logging.log4j.LogManager; |
|
15 |
import org.apache.logging.log4j.Logger; |
|
14 | 16 |
import org.junit.After; |
15 | 17 |
import org.junit.Before; |
16 | 18 |
import org.junit.Test; |
... | ... | |
24 | 26 |
import eu.etaxonomy.dataportal.pages.TaxonProfilePage; |
25 | 27 |
|
26 | 28 |
/** |
27 |
* |
|
28 | 29 |
* @author a.kohlbecker |
29 |
* |
|
30 | 30 |
*/ |
31 |
|
|
32 | 31 |
@DataPortalContexts( { DataPortalSite.floramalesiana}) |
33 | 32 |
public class FloraMalesiana_DescriptionTest extends CdmDataPortalTestBase{ |
34 | 33 |
|
34 |
private static final Logger logger = LogManager.getLogger(); |
|
35 |
|
|
35 | 36 |
private static final UUID tristiropsis_acutangula_uuid = UUID.fromString("87e76e43-e4b7-44a1-a195-2c36a63b34bb"); |
36 | 37 |
|
37 | 38 |
@Before |
... | ... | |
45 | 46 |
logger.debug("@After"); |
46 | 47 |
} |
47 | 48 |
|
48 |
|
|
49 | 49 |
@Test |
50 | 50 |
public void tristiropsis_acutangula() throws Exception { |
51 | 51 |
|
... | ... | |
69 | 69 |
assertEquals("Petals cuneate at base, broad-elliptic to broad-ovate, 2.5-3.5 b) 2.2-2.5 mm, creamy-white, margin below the insertion of the scale long-ciliate, furthermore sparsely ciliate, apex crenulate, inside glabrous;", featureBlockElements.get(4).getText()); |
70 | 70 |
assertEquals("Stamens:", featureBlockElements.get(5).getText()); |
71 | 71 |
assertEquals("Fruits ellipsoid to subglobular, widest about or above the middle, narrowed to short-stipitate at base, 3-4-angular to 3-4-ribbed in cross section, 20-30 by 14-25 mm, yellowish green to dark-yellow when ripe, patently short-hairy inside, often sterile but well developed.",featureBlockElements.get(6).getText()); |
72 |
|
|
73 | 72 |
} |
74 |
|
|
75 |
} |
|
73 |
} |
src/test/java/eu/etaxonomy/dataportal/selenium/tests/flMalesiana/FloraMalesiana_OriginalSourceTest.java | ||
---|---|---|
8 | 8 |
*/ |
9 | 9 |
package eu.etaxonomy.dataportal.selenium.tests.flMalesiana; |
10 | 10 |
|
11 |
import static org.junit.Assert.assertEquals; |
|
12 |
|
|
13 | 11 |
import java.util.List; |
14 | 12 |
import java.util.UUID; |
15 | 13 |
|
14 |
import org.apache.logging.log4j.LogManager; |
|
15 |
import org.apache.logging.log4j.Logger; |
|
16 | 16 |
import org.junit.After; |
17 | 17 |
import org.junit.Before; |
18 | 18 |
import org.junit.Ignore; |
... | ... | |
28 | 28 |
import eu.etaxonomy.dataportal.pages.TaxonSearchResultPage; |
29 | 29 |
|
30 | 30 |
/** |
31 |
* |
|
32 | 31 |
* @author a.kohlbecker |
33 |
* |
|
34 | 32 |
*/ |
35 |
|
|
36 | 33 |
@DataPortalContexts( { DataPortalSite.floramalesiana}) |
37 | 34 |
public class FloraMalesiana_OriginalSourceTest extends CdmDataPortalTestBase{ |
38 | 35 |
|
36 |
private static final Logger logger = LogManager.getLogger(); |
|
37 |
|
|
39 | 38 |
private static final UUID UUID_ILLICIUM = UUID.fromString("502e28ca-23d0-44a8-9c13-85fb3d076bff"); |
40 | 39 |
|
41 | 40 |
private GenericPortalPage homePage; |
... | ... | |
52 | 51 |
logger.debug("@After"); |
53 | 52 |
} |
54 | 53 |
|
55 |
|
|
56 | 54 |
@Test |
57 | 55 |
@Ignore // see #3788 (sort order of search results broken in free-text taxon search) |
58 | 56 |
public void Illicium() throws Exception { |
... | ... | |
79 | 77 |
assertEquals("Synonymy", primaryTabs.get(1).getText()); |
80 | 78 |
assertEquals("Images", primaryTabs.get(2).getText()); |
81 | 79 |
assertEquals("Keys", primaryTabs.get(3).getText()); |
82 |
|
|
83 | 80 |
} |
84 |
|
|
85 |
} |
|
81 |
} |
src/test/java/eu/etaxonomy/dataportal/selenium/tests/reference/NamePageRedirectTest.java | ||
---|---|---|
11 | 11 |
import java.net.MalformedURLException; |
12 | 12 |
import java.util.UUID; |
13 | 13 |
|
14 |
import org.apache.logging.log4j.LogManager; |
|
15 |
import org.apache.logging.log4j.Logger; |
|
14 | 16 |
import org.junit.Before; |
15 | 17 |
import org.junit.Test; |
16 | 18 |
|
... | ... | |
27 | 29 |
* #3616 |
28 | 30 |
* |
29 | 31 |
* @author a.kohlbecker |
30 |
* |
|
31 | 32 |
*/ |
32 |
|
|
33 | 33 |
@DataPortalContexts( { DataPortalSite.reference }) |
34 | 34 |
public class NamePageRedirectTest extends CdmDataPortalTestBase{ |
35 | 35 |
|
36 |
private static final Logger logger = LogManager.getLogger(); |
|
37 |
|
|
36 | 38 |
static final UUID taxon_achilllea_santolina_uuid = UUID.fromString("c246856f-c03e-4cb7-ac92-d9b2864084cd"); |
37 | 39 |
static final UUID name_achilllea_santolina_uuid = UUID.fromString("2ff1fb18-7055-420f-8c10-5105b66974de"); |
38 | 40 |
|
src/test/java/eu/etaxonomy/dataportal/selenium/tests/reference/SpecimenTableViewTest.java | ||
---|---|---|
14 | 14 |
import java.util.UUID; |
15 | 15 |
|
16 | 16 |
import org.apache.commons.lang3.StringUtils; |
17 |
import org.apache.log4j.Level; |
|
18 |
import org.apache.log4j.Logger; |
|
17 |
import org.apache.logging.log4j.Level; |
|
18 |
import org.apache.logging.log4j.LogManager; |
|
19 |
import org.apache.logging.log4j.Logger; |
|
19 | 20 |
import org.junit.Before; |
20 | 21 |
import org.junit.Test; |
21 | 22 |
import org.openqa.selenium.By; |
22 | 23 |
import org.openqa.selenium.WebElement; |
23 | 24 |
|
25 |
import eu.etaxonomy.cdm.common.LogUtils; |
|
24 | 26 |
import eu.etaxonomy.dataportal.DataPortalSite; |
25 | 27 |
import eu.etaxonomy.dataportal.DrupalVars; |
26 | 28 |
import eu.etaxonomy.dataportal.elements.BaseElement; |
... | ... | |
28 | 30 |
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase; |
29 | 31 |
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts; |
30 | 32 |
import eu.etaxonomy.dataportal.pages.TaxonPage; |
31 |
import eu.etaxonomy.drush.DrushExecuter; |
|
32 | 33 |
import eu.etaxonomy.drush.DrushExecutionFailure; |
33 | 34 |
|
34 | 35 |
/** |
... | ... | |
43 | 44 |
|
44 | 45 |
private static final String STEP_DONE_ICON = "cdm_dataportal/images/step_done.gif"; |
45 | 46 |
|
46 |
public static final Logger logger = Logger.getLogger(DrushExecuter.class);
|
|
47 |
private static final Logger logger = LogManager.getLogger();
|
|
47 | 48 |
|
48 | 49 |
private static final UUID glenodinium_apiculatum_t = UUID.fromString("d245083e-3bda-435f-9bb3-bdc2249ff23c"); |
49 | 50 |
|
... | ... | |
51 | 52 |
|
52 | 53 |
@Before |
53 | 54 |
public void switchToView() throws IOException, InterruptedException, DrushExecutionFailure { |
54 |
Logger.getLogger(DrushExecuter.class).setLevel(Level.DEBUG);
|
|
55 |
LogUtils.setLevel(logger, Level.DEBUG);
|
|
55 | 56 |
setDrupalVar(DrupalVars.CDM_DATAPORTAL_TAXONPAGE_TABS, "1"); |
56 | 57 |
setDrupalVar(DrupalVars.CDM_SPECIMEN_LIST_VIEW_MODE, "derivate_table"); |
57 | 58 |
p = new TaxonPage(driver, getContext(), glenodinium_apiculatum_t, "specimens"); |
src/test/java/eu/etaxonomy/dataportal/selenium/tests/reference/SpecimensTopDownViewTest.java | ||
---|---|---|
13 | 13 |
import java.util.List; |
14 | 14 |
import java.util.UUID; |
15 | 15 |
|
16 |
import org.apache.log4j.Level; |
|
17 |
import org.apache.log4j.Logger;
|
|
16 |
import org.apache.logging.log4j.Level;
|
|
17 |
import org.apache.logging.log4j.LogManager;
|
|
18 | 18 |
import org.junit.Before; |
19 | 19 |
import org.junit.Test; |
20 | 20 |
import org.openqa.selenium.By; |
21 | 21 |
import org.openqa.selenium.WebElement; |
22 | 22 |
|
23 |
import eu.etaxonomy.cdm.common.LogUtils; |
|
23 | 24 |
import eu.etaxonomy.dataportal.DataPortalSite; |
24 | 25 |
import eu.etaxonomy.dataportal.DrupalVars; |
25 | 26 |
import eu.etaxonomy.dataportal.elements.BaseElement; |
... | ... | |
28 | 29 |
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase; |
29 | 30 |
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts; |
30 | 31 |
import eu.etaxonomy.dataportal.pages.TaxonPage; |
31 |
import eu.etaxonomy.drush.DrushExecuter; |
|
32 | 32 |
import eu.etaxonomy.drush.DrushExecutionFailure; |
33 | 33 |
|
34 | 34 |
/** |
... | ... | |
42 | 42 |
|
43 | 43 |
@Before |
44 | 44 |
public void switchToView() throws IOException, InterruptedException, DrushExecutionFailure { |
45 |
Logger.getLogger(DrushExecuter.class).setLevel(Level.DEBUG);
|
|
45 |
LogUtils.setLevel(LogManager.getLogger(), Level.DEBUG);
|
|
46 | 46 |
setDrupalVar(DrupalVars.CDM_DATAPORTAL_TAXONPAGE_TABS, "1"); |
47 | 47 |
setDrupalVar(DrupalVars.CDM_SPECIMEN_LIST_VIEW_MODE, "derivate_path"); |
48 | 48 |
} |
src/test/java/eu/etaxonomy/dataportal/selenium/tests/reference/SpecimensTreeViewTest.java | ||
---|---|---|
12 | 12 |
import java.net.MalformedURLException; |
13 | 13 |
import java.util.UUID; |
14 | 14 |
|
15 |
import org.apache.log4j.Level; |
|
16 |
import org.apache.log4j.Logger; |
|
15 |
import org.apache.logging.log4j.Level; |
|
17 | 16 |
import org.junit.Before; |
18 | 17 |
import org.junit.Test; |
19 | 18 |
import org.openqa.selenium.By; |
20 | 19 |
import org.openqa.selenium.WebElement; |
21 | 20 |
|
21 |
import eu.etaxonomy.cdm.common.LogUtils; |
|
22 | 22 |
import eu.etaxonomy.dataportal.DataPortalSite; |
23 | 23 |
import eu.etaxonomy.dataportal.DrupalVars; |
24 | 24 |
import eu.etaxonomy.dataportal.elements.BaseElement; |
... | ... | |
29 | 29 |
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase; |
30 | 30 |
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts; |
31 | 31 |
import eu.etaxonomy.dataportal.pages.TaxonPage; |
32 |
import eu.etaxonomy.drush.DrushExecuter; |
|
33 | 32 |
import eu.etaxonomy.drush.DrushExecutionFailure; |
34 | 33 |
|
35 | 34 |
/** |
... | ... | |
39 | 38 |
@DataPortalContexts( { DataPortalSite.reference }) |
40 | 39 |
public class SpecimensTreeViewTest extends CdmDataPortalTestBase { |
41 | 40 |
|
42 |
public static final Logger logger = Logger.getLogger(DrushExecuter.class); |
|
43 |
|
|
44 | 41 |
private static final UUID glenodinium_apiculatum_t = UUID.fromString("d245083e-3bda-435f-9bb3-bdc2249ff23c"); |
45 | 42 |
|
46 | 43 |
private TaxonPage p; |
... | ... | |
49 | 46 |
|
50 | 47 |
@Before |
51 | 48 |
public void switchToView() throws IOException, InterruptedException, DrushExecutionFailure { |
52 |
Logger.getLogger(DrushExecuter.class).setLevel(Level.DEBUG);
|
|
49 |
LogUtils.setLevel(getClass(), Level.DEBUG);
|
|
53 | 50 |
setDrupalVar(DrupalVars.CDM_DATAPORTAL_TAXONPAGE_TABS, "1"); |
54 | 51 |
setDrupalVar(DrupalVars.CDM_SPECIMEN_LIST_VIEW_MODE, "derivate_tree"); |
55 | 52 |
setDrupalVarJson(DrupalVars.CDM_SPECIMEN_DERIVATE_TREE_OPTIONS, "{\"field_unit_short_label\":1}"); |
Also available in: Unified diff
ref #10072 adapt dataportal to log4j2