ConfigurePPPTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 15
c 2
b 0
f 0
dl 0
loc 34
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testConfigurePagantisInOscommerce() 0 6 1
A configurePPP() 0 18 1
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(), 'Pagantis')]");
35
        $condition = WebDriverExpectedCondition::visibilityOfElementLocated($button);
36
        $this->waitUntil($condition);
37
        $this->findByXpath("//td[contains(text(), 'Pagantis')]")->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