Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/github/codeql-acti…
Browse files Browse the repository at this point in the history
…on-3.26.13
  • Loading branch information
vchaitanya authored Oct 22, 2024
2 parents 2b83d3c + 514d8b1 commit ba87a7a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class ServedIndexTest extends AbstractIndexTest {
* Checks that the interaction diagram for all flows is show as expected
*/
@Test
@DisabledIf(value = "java.awt.GraphicsEnvironment#isHeadless",
disabledReason = "mysterious failure in CI")
void interactions() {
iseq.hasInteractionSummary( "2 interactions between 3 actors" )
.expandInteractions()
Expand All @@ -47,6 +49,8 @@ void interactions() {
* expected
*/
@Test
@DisabledIf(value = "java.awt.GraphicsEnvironment#isHeadless",
disabledReason = "mysterious failure in CI")
void filteredInteractions() {
iseq.clickTag( "PASS" )
.hasInteractionSummary( "1 interactions between 2 actors" )
Expand Down Expand Up @@ -104,6 +108,8 @@ void mermaidMarkup() {
* Checks that the interaction diagram highlights the hovered flow as expected
*/
@Test
@DisabledIf(value = "java.awt.GraphicsEnvironment#isHeadless",
disabledReason = "mysterious failure in CI")
void hoveredInteractions() {
iseq
.expandInteractions()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
import org.junit.jupiter.api.extension.BeforeAllCallback;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.firefox.FirefoxBinary;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.slf4j.LoggerFactory;

import io.github.bonigarcia.wdm.WebDriverManager;

Expand All @@ -31,6 +34,8 @@ public class Browser implements
AfterAllCallback,
ExtensionContext.Store.CloseableResource {

private static final org.slf4j.Logger LOG = LoggerFactory.getLogger( Browser.class );

/**
* The system property name that controls browser visibility
*/
Expand Down Expand Up @@ -86,6 +91,9 @@ public static WebDriver get() {
}

driver = type.get();

Capabilities caps = ((RemoteWebDriver) driver).getCapabilities();
LOG.info( "Built {} {}", caps.getBrowserName(), caps.getBrowserVersion() );
}
return driver;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,11 @@ public IndexSequence dragToInclude( String tag ) {
*/
public IndexSequence hasInteractionSummary( String expected ) {
trace( "hasInteractionSummary", expected );
assertEquals( expected, driver
.findElements( By.id( "interaction_summary" ) ).stream()
.map( WebElement::getText )
.collect( joining( "\n" ) ),

assertEquals( expected,
driver.findElements( By.id( "interaction_summary" ) ).stream()
.map( WebElement::getText )
.collect( joining( "\n" ) ),
"Interaction summary" );
return self();
}
Expand Down

0 comments on commit ba87a7a

Please sign in to comment.