Passed
Push — master ( c01df0...b2280f )
by Cesar
10:38 queued 06:42
created

pagantisMgBasicTest::testpagantisMg21BasicTest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
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
        $this->webDriver->wait()->until($condition);
34
        $this->assertTrue((bool) $condition, $this->configuration['magentoUrl']);
35
        $this->quit();
36
    }
37
38
    /**
39
     * testBackofficeOpen
40
     */
41
    public function testBackofficeOpen()
42
    {
43
        $this->webDriver->get($this->configuration['magentoUrl'].self::BACKOFFICE_FOLDER);
44
        $condition = WebDriverExpectedCondition::titleContains(self::BACKOFFICE_TITLE);
45
        $this->webDriver->wait()->until($condition);
46
        $this->assertTrue((bool) $condition);
47
        $this->quit();
48
    }
49
}
50