Update::updatePrices()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
/**
3
 * Finance module for HiPanel
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-finance
6
 * @package   hipanel-module-finance
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\finance\tests\_support\Page\price;
12
13
class Update extends View
14
{
15
    public function updatePrices(): void
16
    {
17
        $I = $this->tester;
18
19
        $this->loadPage();
20
        for ($i = 1; $i < 10; ++$i) {
21
            $I->click("(//tbody/tr/td/input[@type='checkbox'])[{$i}]");
22
        }
23
        $I->click('Update');
24
        $I->waitForText('Update');
25
        $this->fillRandomPrices('templateprice');
26
        $I->click('Save');
27
        $I->closeNotification('Prices were successfully updated');
28
        $this->seeRandomPrices();
29
    }
30
}
31