Failed Conditions
Pull Request — experimental/sf (#3236)
by Kentaro
49:41 queued 37:58
created

CustomerEditPage   A

Complexity

Total Complexity 19

Size/Duplication

Total Lines 122
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 122
rs 10
c 0
b 0
f 0
wmc 19
lcom 1
cbo 1
1
<?php
2
3
4
namespace Page\Admin;
5
6
7
class CustomerEditPage extends AbstractAdminPageStyleGuide
8
{
9
10
    public static $登録完了メッセージ = '#page_admin_customer_edit > div > div.c-contentsArea > div.alert.alert-success.alert-dismissible.fade.show.m-3 > span';
11
12
    /**
13
     * CustomerRegisterPage constructor.
14
     */
15
    public function __construct(\AcceptanceTester $I)
16
    {
17
        parent::__construct($I);
18
    }
19
20
    public static function go($I)
21
    {
22
        $page = new self($I);
23
        return $page->goPage('/customer/new', '会員登録・編集会員管理');
24
    }
25
26
    public static function at($I)
27
    {
28
        $page = new self($I);
29
        return $page->atPage('会員登録・編集会員管理');
30
    }
31
32
    public function 入力_姓($value)
33
    {
34
        $this->tester->fillField(['id' => 'admin_customer_name_name01'], $value);
35
        return $this;
36
    }
37
38
    public function 入力_名($value)
39
    {
40
        $this->tester->fillField(['id' => 'admin_customer_name_name02'], $value);
41
        return $this;
42
    }
43
44
    public function 入力_セイ($value)
45
    {
46
        $this->tester->fillField(['id' => 'admin_customer_kana_kana01'], $value);
47
        return $this;
48
    }
49
50
    public function 入力_メイ($value)
51
    {
52
        $this->tester->fillField(['id' => 'admin_customer_kana_kana02'], $value);
53
        return $this;
54
    }
55
56
    public function 入力_郵便番号1($value)
57
    {
58
        $this->tester->fillField(['id' => 'admin_customer_zip_zip01'], $value);
59
        return $this;
60
    }
61
62
    public function 入力_郵便番号2($value)
63
    {
64
        $this->tester->fillField(['id' => 'admin_customer_zip_zip02'], $value);
65
        return $this;
66
    }
67
68
    public function 入力_都道府県($value)
69
    {
70
        $this->tester->selectOption(['id' => 'admin_customer_address_pref'], $value);
71
        return $this;
72
    }
73
74
    public function 入力_市区町村名($value)
75
    {
76
        $this->tester->fillField(['id' => 'admin_customer_address_addr01'], $value);
77
        return $this;
78
    }
79
80
    public function 入力_番地_ビル名($value)
81
    {
82
        $this->tester->fillField(['id' => 'admin_customer_address_addr02'], $value);
83
        return $this;
84
    }
85
86
    public function 入力_Eメール($value)
87
    {
88
        $this->tester->fillField(['id' => 'admin_customer_email'], $value);
89
        return $this;
90
    }
91
92
    public function 入力_電話番号1($value)
93
    {
94
        $this->tester->fillField(['id' => 'admin_customer_tel_tel01'], $value);
95
        return $this;
96
    }
97
98
    public function 入力_電話番号2($value)
99
    {
100
        $this->tester->fillField(['id' => 'admin_customer_tel_tel02'], $value);
101
        return $this;
102
    }
103
104
    public function 入力_電話番号3($value)
105
    {
106
        $this->tester->fillField(['id' => 'admin_customer_tel_tel03'], $value);
107
        return $this;
108
    }
109
110
    public function 入力_パスワード($value)
111
    {
112
        $this->tester->fillField(['id' => 'admin_customer_password_first'], $value);
113
        return $this;
114
    }
115
116
    public function 入力_パスワード確認($value)
117
    {
118
        $this->tester->fillField(['id' => 'admin_customer_password_second'], $value);
119
        return $this;
120
    }
121
122
    public function 登録()
123
    {
124
        $this->tester->click('#customer_form > div.c-conversionArea > div > div > div:nth-child(2) > div > div:nth-child(2) > button');
125
        return $this;
126
    }
127
128
}