diff --git a/jgiven-tests/src/test/java/com/tngtech/jgiven/report/html5/Html5AppTest.java b/jgiven-tests/src/test/java/com/tngtech/jgiven/report/html5/Html5AppTest.java index 65ab81b7da..58b2d8d6b8 100644 --- a/jgiven-tests/src/test/java/com/tngtech/jgiven/report/html5/Html5AppTest.java +++ b/jgiven-tests/src/test/java/com/tngtech/jgiven/report/html5/Html5AppTest.java @@ -259,7 +259,7 @@ public void extended_description_can_substitue_arguments() throws IOException { .and().the_report_exist_as_JSON_file(); whenReport.when().the_HTML_Report_Generator_is_executed(); when().the_page_of_scenario_$_is_opened( 1 ) - .and().show_angular_foundation_tooltip_with_$_ms_delay_for_element_$_with_attribute_$_and_value_$(251, "span", "class", "has-tip" ); + .and().show_tooltip_of_extended_description(); then().an_element_with_a_$_class_exists( "has-tip" ) .and().attribute_$_has_value_$( "tooltip-html-unsafe", expectedDescription ); } diff --git a/jgiven-tests/src/test/java/com/tngtech/jgiven/report/html5/WhenHtml5App.java b/jgiven-tests/src/test/java/com/tngtech/jgiven/report/html5/WhenHtml5App.java index b079e0f236..88eae90f33 100644 --- a/jgiven-tests/src/test/java/com/tngtech/jgiven/report/html5/WhenHtml5App.java +++ b/jgiven-tests/src/test/java/com/tngtech/jgiven/report/html5/WhenHtml5App.java @@ -71,11 +71,11 @@ public void takeScreenshotAfterStage() { } - public SELF show_angular_foundation_tooltip_with_$_ms_delay_for_element_$_with_attribute_$_and_value_$( long ms, String element, String attribute, String value){ + public SELF show_tooltip_of_extended_description(){ Actions builder = new Actions(webDriver); - WebElement webElement = webDriver.findElements( By.xpath( "//" + element + "[@"+ attribute +"='" + value + "']" )).get( 0 ); + WebElement webElement = webDriver.findElement( By.xpath( "//span[@class='has-tip']" )); builder.moveToElement( webElement ).clickAndHold().build().perform(); - WebDriverWait wait = new WebDriverWait( webDriver, ms ); + WebDriverWait wait = new WebDriverWait( webDriver, 251); wait.until( ExpectedConditions.presenceOfElementLocated( By.xpath( "//span[@is-open]" ))); // https://github.com/pineconellc/angular-foundation/blob/master/src/tooltip/tooltip.js - Line 98: var template return self();