Skip to content

Instantly share code, notes, and snippets.

@vaceletm
Created May 18, 2017 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vaceletm/1ebf4b51af6a5277348267f15be8a449 to your computer and use it in GitHub Desktop.
Save vaceletm/1ebf4b51af6a5277348267f15be8a449 to your computer and use it in GitHub Desktop.
<?php
declare(strict_types=1);
namespace Tuleap\Tests\Selenium\SVN;
use Facebook\WebDriver\WebDriverBy;
use Lmc\Steward\Test\AbstractTestCase;
use Lmc\Steward\Component\Legacy;
use Tuleap\Tests\Selenium\SeedCookiesTest;
/**
* @delayAfter Tuleap\Tests\Selenium\SeedCookiesTest
* @delayMinutes 0.2
*/
class SVNBrowsingTest extends AbstractTestCase
{
/** @var array */
private $cookies;
/**
* @before
*/
public function init()
{
$this->cookies = (new Legacy($this))
->loadWithName(SeedCookiesTest::COOKIES);
}
public function testShouldDisplayRepositoryContent()
{
$this->wd->get('https://reverse-proxy/');
$this->wd->manage()->addCookie($this->cookies[SeedCookiesTest::ALICE_COOKIE]);
$this->wd->get('https://reverse-proxy/plugins/svn/?group_id=102');
$this->assertContains('SVN', $this->wd->getTitle());
$this->wd->findElement(WebDriverBy::linkText('sample'))->click();
$this->waitForId('svn-repository');
$this->assertEquals('trunk', trim($this->findByLinkText($text)->getText()));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment