Failed Conditions
Push — experimental/sf ( 49de0c...430492 )
by chihiro
27s
created

OrderEditPage::入力_姓()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Page\Admin;
5
6
7
class OrderEditPage extends AbstractAdminPageStyleGuide
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
8
{
9
10
    public static $姓_エラーメッセージ = '#ordererInfo > div > div > div:nth-child(1) > div:nth-child(2) > div > div > div:nth-child(1) > span';
0 ignored issues
show
Coding Style introduced by
Member variable "姓_エラーメッセージ" is not in valid camel caps format
Loading history...
11
12
    public static $登録完了メッセージ = 'div.c-container > div.c-contentsArea > div.alert.alert-success.alert-dismissible.fade.show.m-3 > span';
0 ignored issues
show
Coding Style introduced by
Member variable "登録完了メッセージ" is not in valid camel caps format
Loading history...
13
14
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$I" missing
Loading history...
15
     * OrderRegisterPage constructor.
16
     */
17
    public function __construct(\AcceptanceTester $I)
18
    {
19
        parent::__construct($I);
20
    }
21
22
    public static function go($I)
23
    {
24
        $page = new self($I);
25
        $page->goPage('/order/new', '受注登録受注管理');
26
        return $page;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
27
    }
28
29
    public static function at($I)
30
    {
31
        $page = new self($I);
32
        $page->atPage('受注登録受注管理');
33
        return $page;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
34
    }
35
36
    public function 入力_受注ステータス($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_受注ステータス" is not in camel caps format
Loading history...
37
    {
38
        $this->tester->selectOption(['id' => 'order_OrderStatus'], $value);
39
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
40
    }
41
42
    public function 入力_姓($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_姓" is not in camel caps format
Loading history...
43
    {
44
        $this->tester->fillField(['id' => 'order_name_name01'], $value);
45
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
46
    }
47
48
    public function 入力_名($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_名" is not in camel caps format
Loading history...
49
    {
50
        $this->tester->fillField(['id' => 'order_name_name02'], $value);
51
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
52
    }
53
54
    public function 入力_セイ($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_セイ" is not in camel caps format
Loading history...
55
    {
56
        $this->tester->fillField(['id' => 'order_kana_kana01'], $value);
57
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
58
    }
59
60
    public function 入力_メイ($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_メイ" is not in camel caps format
Loading history...
61
    {
62
        $this->tester->fillField(['id' => 'order_kana_kana02'], $value);
63
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
64
    }
65
66
    public function 入力_郵便番号($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_郵便番号" is not in camel caps format
Loading history...
67
    {
68
        $this->tester->fillField(['id' => 'order_postal_code'], $value);
69
70
        return $this;
71
    }
72
73
    public function 入力_都道府県($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_都道府県" is not in camel caps format
Loading history...
74
    {
75
        $this->tester->selectOption(['id' => 'order_address_pref'], $value);
76
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
77
    }
78
79
    public function 入力_市区町村名($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_市区町村名" is not in camel caps format
Loading history...
80
    {
81
        $this->tester->fillField(['id' => 'order_address_addr01'], $value);
82
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
83
    }
84
85
    public function 入力_番地_ビル名($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_番地_ビル名" is not in camel caps format
Loading history...
86
    {
87
        $this->tester->fillField(['id' => 'order_address_addr02'], $value);
88
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
89
    }
90
91
    public function 入力_電話番号($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_電話番号" is not in camel caps format
Loading history...
92
    {
93
        $this->tester->fillField(['id' => 'order_phone_number'], $value);
94
95
        return $this;
96
    }
97
98
    public function 入力_Eメール($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_Eメール" is not in camel caps format
Loading history...
99
    {
100
        $this->tester->fillField(['id' => 'order_email'], $value);
101
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
102
    }
103
104
    public function 入力_支払方法($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_支払方法" is not in camel caps format
Loading history...
105
    {
106
        $this->tester->selectOption(['id' => 'order_Payment'], $value);
107
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
108
    }
109
110
    public function 入力_配送業者($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::入力_配送業者" is not in camel caps format
Loading history...
111
    {
112
        $this->tester->selectOption(['id' => 'order_Shipping_Delivery'], $value);
113
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
114
    }
115
116
    public function 注文者情報をコピー()
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::注文者情報をコピー" is not in camel caps format
Loading history...
117
    {
118
        $this->tester->click('#shippingInfo > div > div.row.mb-3 > div:nth-child(1) > button.btn.btn-ec-regular.copy-customer');
119
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
120
    }
121
122
    public function 注文者パネルを開く()
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::注文者パネルを開く" is not in camel caps format
Loading history...
123
    {
124
        $this->tester->click('#form1 > div.c-contentsArea__cols > div > div.c-primaryCol > div:nth-child(2) > div.card-header > div > div.col-1.text-right > a');
125
        $this->tester->wait(1);
126
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
127
    }
128
129 View Code Duplication
    public function 商品検索($value = '')
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
Method name "OrderEditPage::商品検索" is not in camel caps format
Loading history...
130
    {
131
        $this->tester->scrollTo(['css' => '#orderItem > div > div.row.justify-content-between.mb-2 > div.col-6 > a.btn.btn-ec-regular.mr-2.add'], 0, -50);
132
        $this->tester->click(['css' => '#orderItem > div > div.row.justify-content-between.mb-2 > div.col-6 > a.btn.btn-ec-regular.mr-2.add']);
133
        $this->tester->waitForElement(['id' => 'addProduct']);
134
        $this->tester->wait(1);
135
        $this->tester->fillField(['id' => 'admin_search_product_id'], $value);
136
        $this->tester->click('#searchProductModalButton');
137
        $this->tester->waitForElementVisible('#searchProductModalList table');
138
        $this->tester->wait(1);
139
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
140
    }
141
142
    public function 商品検索結果_選択($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::商品検索結果_選択" is not in camel caps format
Loading history...
143
    {
144
        $rowNum = $rowNum * 2;
145
        $this->tester->click("#searchProductModalList > table > tbody > tr:nth-child(${rowNum}) > td.text-right > button");
146
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
147
    }
148
149
    public function 受注情報登録()
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::受注情報登録" is not in camel caps format
Loading history...
150
    {
151
        $this->tester->click('#form1 > div.c-conversionArea > div > div > div:nth-child(2) > div > div > button');
152
        $this->tester->wait(5);
153
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
154
    }
155
156
    public function 明細の項目名を取得($row)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::明細の項目名を取得" is not in camel caps format
Loading history...
157
    {
158
        return $this->tester->grabTextFrom("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.w-25.pl-3");
159
    }
160
161 View Code Duplication
    public function 明細を削除($row)
0 ignored issues
show
Coding Style introduced by
Method name "OrderEditPage::明細を削除" is not in camel caps format
Loading history...
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
162
    {
163
        $this->tester->scrollTo(['css' => '#order-product']);
164
        $this->tester->click("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.text-right.pr-3 > div > div > a");
165
        $this->tester->waitForElementVisible("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.text-right.pr-3 > div > div > div.modal");
166
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
167
    }
168
169
    public function acceptDeleteModal($row)
170
    {
171
        $this->tester->click("#table-form-field > tbody > tr:nth-child({$row}) > td.align-middle.text-right.pr-3 div.modal a.delete");
172
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
173
    }
174
175 View Code Duplication
    public function お届け先の追加()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
Method name "OrderEditPage::お届け先の追加" is not in camel caps format
Loading history...
176
    {
177
        $this->tester->scrollTo(['css' => '#form1'], 0, 200);
178
        $this->tester->wait(5);
179
        $this->tester->click('#shipping-add');
180
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
181
    }
182
}
183