Commit de87b2b5 authored by Christian Spitzlay's avatar Christian Spitzlay Committed by Hristo Chonov
Browse files

Issue #2894469 by cspitzlay: Tests derived from...

Issue #2894469 by cspitzlay: Tests derived from ContentEntityAutosaveFormTestBase fail with webdriver
parent 248f0144
Loading
Loading
Loading
Loading
+6
Changes for tests/src/FunctionalJavascript/ContentEntity/ContentEntityAutosaveFormTestBase.php: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -203,6 +203,12 @@ abstract class ContentEntityAutosaveFormTestBase extends AutosaveFormTestBase {
    // been disabled already. In both cases we assert that we expect zero or
    // one autosave submission, but not more than one.
    $this->assertFalse($this->waitForAutosaveSubmits(2));

    $driver = $this->getSession()->getDriver();
    if ($driver instanceof \Behat\Mink\Driver\Selenium2Driver) {
      // Accept the alert that autosave has been disabled.
      $driver->getWebDriverSession()->accept_alert();
    }
    $this->assertAutosaveIsRunning(FALSE);
    $this->assertEquals(0, $this->getCountAutosaveEntries($entity->id()));