Completed
Push — master ( 7f1e15...6e170c )
by Raúl
14s queued 12s
created

testConfigurePagantisInOscommerce()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Test\Configure;
4
5
use Facebook\WebDriver\WebDriverBy;
6
use Facebook\WebDriver\WebDriverExpectedCondition;
7
8
/**
9
 * Class ConfigureTest
10
 * @package Test\Configure
11
 *
12
 * @group oscommerce-configure-ppp
13
14
 */
15
class ConfigurePPPTest extends AbstractConfigure
16
{
17
    /**
18
     * testConfigurePagantisInOscommerce15
19
     */
20
    public function testConfigurePagantisInOscommerce()
21
    {
22
        $this->loginToBackOffice();
23
        $this->goToPagantis();
24
        $this->configurePPP();
25
        $this->quit();
26
    }
27
28
    /**
29
     * Configure paylater module
30
     */
31
    public function configurePPP()
32
    {
33
        // click on Pagantis
34
        $button = WebDriverBy::xpath("//td[contains(text(), 'Paga+Tarde')]");
35
        $condition = WebDriverExpectedCondition::visibilityOfElementLocated($button);
36
        $this->waitUntil($condition);
37
        $this->findByXpath("//td[contains(text(), 'Paga+Tarde')]")->click();
38
39
        // click on manage PPP
40
        $this->findByLinkText($this->configuration['pppText'])->click();
41
42
        // click on Matrox G200 MMS
43
        $this->findByName('checkboxProducts[17]')->click();
44
        // click on Save
45
        $button = WebDriverBy::id('tdb2');
46
        $condition = WebDriverExpectedCondition::visibilityOfElementLocated($button);
47
        $this->waitUntil($condition);
48
        $this->findById('tdb2')->click();
49
    }
50
}
51