Failed Conditions
Pull Request — experimental/sf (#3236)
by Kentaro
121:51 queued 107:46
created

DeliveryEditPage   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 44
rs 10
c 0
b 0
f 0
wmc 8
lcom 0
cbo 1
1
<?php
2
3
4
namespace Page\Admin;
5
6
7
class DeliveryEditPage extends AbstractAdminPageStyleGuide
8
{
9
    public function __construct(\AcceptanceTester $I)
10
    {
11
        parent::__construct($I);
12
    }
13
14
    public static function at($I)
15
    {
16
        $page = new self($I);
17
        return $page->atPage('配送方法登録・編集基本情報設定');
18
    }
19
20
    public function 入力_配送業者名($value) {
21
        $this->tester->fillField(['id' => 'delivery_name'], $value);
22
        return $this;
23
    }
24
25
    public function 入力_名称($value) {
26
        $this->tester->fillField(['id' => 'delivery_service_name'], $value);
27
        return $this;
28
    }
29
30
    public function 入力_支払方法選択($array) {
31
        foreach ($array as $id)
32
        {
33
            $this->tester->checkOption(['id' => "delivery_payments_${id}"]);
34
        }
35
        return $this;
36
    }
37
38
    public function 入力_全国一律送料($value) {
39
        $this->tester->fillField(['id' => 'delivery_free_all'], $value);
40
        $this->tester->click('#set_fee_all');
41
        return $this;
42
    }
43
44
    public function 登録()
45
    {
46
        $this->tester->click(['xpath' => '//button/span[text()="登録"]']);
47
        return $this;
48
    }
49
50
}