Skip to content
Snippets Groups Projects
Commit f222262b authored by Chris Hallberg's avatar Chris Hallberg Committed by Robert Lange
Browse files

Adjust CartTest to account for already opened windows.

parent 8e468d20
No related merge requests found
...@@ -687,14 +687,16 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase ...@@ -687,14 +687,16 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
$select->selectOption('Google'); $select->selectOption('Google');
// Do the export: // Do the export:
$windowCount = count($this->getMinkSession()->getWindowNames());
$submit = $this->findCss($page, '.modal-body input[name=submit]'); $submit = $this->findCss($page, '.modal-body input[name=submit]');
$submit->click(); $submit->click();
$this->snooze(); $this->snooze();
$windows = $this->getMinkSession()->getWindowNames(); $windows = $this->getMinkSession()->getWindowNames();
$this->assertEquals(2, count($windows)); $this->assertEquals($windowCount + 1, count($windows));
$this->getMinkSession()->switchToWindow($windows[1]); $this->getMinkSession()->switchToWindow($windows[$windowCount]);
$this->assertEquals( $this->assertEquals(
'https://www.google.com/', $this->getMinkSession()->getCurrentUrl() 'https://www.google.com/',
$this->getMinkSession()->getCurrentUrl()
); );
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment