Revision 0f9976d6
Added by Andreas Kohlbecker almost 5 years ago
src/test/java/eu/etaxonomy/dataportal/selenium/tests/reference/NamePageRedirectTest.java | ||
---|---|---|
12 | 12 |
import java.util.UUID; |
13 | 13 |
|
14 | 14 |
import org.junit.Before; |
15 |
import org.junit.Ignore; |
|
15 | 16 |
import org.junit.Test; |
16 | 17 |
|
18 |
import com.thoughtworks.selenium.webdriven.commands.WaitForPageToLoad; |
|
19 |
|
|
17 | 20 |
import eu.etaxonomy.dataportal.DataPortalSite; |
18 | 21 |
import eu.etaxonomy.dataportal.junit.CdmDataPortalTestBase; |
19 | 22 |
import eu.etaxonomy.dataportal.junit.DataPortalContextSuite.DataPortalContexts; |
... | ... | |
44 | 47 |
* related to https://dev.e-taxonomy.eu/redmine/issues/8304 |
45 | 48 |
*/ |
46 | 49 |
@Test |
50 |
@Ignore |
|
47 | 51 |
public void testNoRedirect() throws MalformedURLException { |
48 | 52 |
|
49 | 53 |
GenericPortalPage p = new GenericPortalPage(driver, getContext(), "name/" + name_achilllea_santolina_uuid.toString() + "/null/null"); |
... | ... | |
70 | 74 |
@Test |
71 | 75 |
public void testRedirectToTaxon() throws MalformedURLException { |
72 | 76 |
|
77 |
|
|
78 |
WaitForPageToLoad wait = new WaitForPageToLoad(); |
|
79 |
String timeout = "5"; |
|
73 | 80 |
GenericPortalPage p = new GenericPortalPage(driver, getContext(), "name/" + name_achilllea_santolina_uuid.toString() + "/null/null/redirect_to_taxon"); |
81 |
wait.apply(driver, new String[] {timeout}); |
|
82 |
wait.apply(driver, new String[] {timeout}); |
|
83 |
logger.debug(p.getDrupalPagePath()); |
|
74 | 84 |
assertTrue( |
75 | 85 |
"The target page should be a taxon page, the name page must have been redirected to the according taxon page.", |
76 | 86 |
p.getDrupalPagePath().startsWith("cdm_dataportal/taxon/" + taxon_achilllea_santolina_uuid.toString())); |
77 | 87 |
|
78 | 88 |
p = new GenericPortalPage(driver, getContext(), "name/" + name_achilllea_santolina_uuid.toString() + "///redirect_to_taxon"); |
89 |
wait.apply(driver, new String[] {timeout}); |
|
79 | 90 |
assertTrue( |
80 | 91 |
"The target page should be a taxon page, the name page must have been redirected to the according taxon page.", |
81 | 92 |
p.getDrupalPagePath().startsWith("cdm_dataportal/taxon/" + taxon_achilllea_santolina_uuid.toString())); |
Also available in: Unified diff
waiting for page to load