Skip to content

Commit

Permalink
refactored show-tooltip function to be more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
cirquit authored and janschaefer committed Jan 20, 2017
1 parent 0ffbb45 commit 3f1c5a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -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 );
}
Expand Down
Expand Up @@ -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();
Expand Down

0 comments on commit 3f1c5a6

Please sign in to comment.