Revision 7d706e69
Added by Andreas Kohlbecker almost 13 years ago
modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/DataPortalContext.java | ||
---|---|---|
15 | 15 |
import org.apache.log4j.Logger; |
16 | 16 |
|
17 | 17 |
/** |
18 |
* TODO 1. allow overwriting the hard coded contexts configuration by {user.home}/.cdmLibrary/DataPortalTest.properties |
|
19 |
* TODO 2. let constructor read from a dataPortalTestContext.properties located in the jar (/dataportal-selenium-tests/src/main/resources/eu/etaxonomy/dataportal/DataPortalTest.properties) |
|
20 |
* TODO 3. DataPortalTest.properties should allow setting the defalut eu.etaxonomy.dataportal.selenium.CdmDataPortalTestBase.SYSTEM_PROPERTY_NAME_BROWSER |
|
21 |
* TODO 4. DataPortalTest.properties should allow setting webdriver.firefox.bin etc in order to circumven the need to set it by -Dwebdriver.firefox.bin |
|
22 | 18 |
* |
23 | 19 |
* @author a.kohlbecker |
24 | 20 |
* |
... | ... | |
33 | 29 |
URI baseUri; |
34 | 30 |
URI cdmServerUri; |
35 | 31 |
UUID classificationUUID; |
32 |
String siteName; //TODO could be read with drush: $ drush vget site_name |
|
36 | 33 |
String themeName; |
37 | 34 |
|
35 |
|
|
38 | 36 |
public final Logger logger = Logger.getLogger(DataPortalContext.class); |
39 | 37 |
|
40 | 38 |
private DataPortalContext() { |
41 | 39 |
this.baseUri = TestConfiguration.getProperty(composePropertyKey("baseUri"), URI.class); |
42 | 40 |
this.cdmServerUri = TestConfiguration.getProperty(composePropertyKey("cdmServerUri"), URI.class); |
43 | 41 |
this.classificationUUID = TestConfiguration.getProperty(composePropertyKey("classificationUUID"), UUID.class); |
42 |
this.siteName = TestConfiguration.getProperty(composePropertyKey("siteName")); |
|
44 | 43 |
} |
45 | 44 |
|
46 | 45 |
private String composePropertyKey(String fieldName) { |
... | ... | |
60 | 59 |
return classificationUUID; |
61 | 60 |
} |
62 | 61 |
|
62 |
public String getSiteName() { |
|
63 |
return siteName; |
|
64 |
} |
|
65 |
|
|
63 | 66 |
} |
Also available in: Unified diff
using PageFactory (Selenium 2 Page Objects pattern) done for PoltomouskeyPage