Passed
Pull Request — master (#37)
by
unknown
04:18
created

pagantisMgBasicTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 34
rs 10
c 0
b 0
f 0
wmc 2
1
<?php
2
3
namespace Pagantis\Pagantis\Test\Basic;
4
5
use Pagantis\Pagantis\Test\Common\AbstractMg21Selenium;
6
use Facebook\WebDriver\WebDriverExpectedCondition;
7
8
/**
9
 * Class pagantisMgBasicTest
10
 * @package Pagantis\Test\Basic
11
 *
12
 * @group magento-basic
13
 */
14
class pagantisMgBasicTest extends AbstractMg21Selenium
15
{
16
    /**
17
     * String
18
     */
19
    const TITLE = 'Home';
20
21
    /**
22
     * String
23
     */
24
    const BACKOFFICE_TITLE = 'Admin';
25
26
    /**
27
     * testMagentoOpen
28
    */
29
    public function testpagantisMg21BasicTest()
30
    {
31
        $this->webDriver->get($this->configuration['magentoUrl']);
32
        $condition = WebDriverExpectedCondition::titleContains(self::TITLE);
33
        $first = $this->webDriver->getPageSource();
34
        $this->webDriver->getPageSource();
35
        $this->webDriver->wait()->until($condition);
36
        $this->assertTrue((bool) $condition, $this->configuration['magentoUrl']);
37
        $this->quit();
38
    }
39
40
    /**
41
     * testBackofficeOpen
42
     */
43
    public function testBackofficeOpen()
44
    {
45
        $this->webDriver->get($this->configuration['magentoUrl'].self::BACKOFFICE_FOLDER);
46
        $condition = WebDriverExpectedCondition::titleContains(self::BACKOFFICE_TITLE);
47
        $this->webDriver->wait()->until($condition);
48
        $this->assertTrue((bool) $condition);
49
        $this->quit();
50
    }
51
}
52