Failed Conditions
Push — experimental/sf ( 93516f...49de0c )
by chihiro
402:37 queued 395:24
created

OrderManagePage::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Page\Admin;
4
5
6
class OrderManagePage extends AbstractAdminPageStyleGuide
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
7
{
8
    public static $検索条件_受注ステータス = ['id' => 'admin_search_order_status'];
0 ignored issues
show
Coding Style introduced by
Member variable "検索条件_受注ステータス" is not in valid camel caps format
Loading history...
9
    public static $検索結果_メッセージ = '#search_form #search_total_count';
0 ignored issues
show
Coding Style introduced by
Member variable "検索結果_メッセージ" is not in valid camel caps format
Loading history...
10
    public static $検索結果_エラーメッセージ = '//*[@id="page_admin_order"]/div[1]/div[3]/div[3]/div/div/div[1]/div/div[1]';
0 ignored issues
show
Coding Style introduced by
Member variable "検索結果_エラーメッセージ" is not in valid camel caps format
Loading history...
11
    public static $詳細検索ボタン = '//*[@id="search_form"]/div[1]/div/div/div[3]/a/i/span';
0 ignored issues
show
Coding Style introduced by
Member variable "詳細検索ボタン" is not in valid camel caps format
Loading history...
12
    public static $タイトル要素 = '.c-container .c-contentsArea .c-pageTitle .c-pageTitle__titles';
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
     * OrderListPage constructor.
16
     */
17
    public function __construct(\AcceptanceTester $I)
18
    {
19
        parent::__construct($I);
20
    }
21
22
    public static function go(\AcceptanceTester $I)
23
    {
24
        $page = new self($I);
25
        return $page->goPage('/order', '受注一覧受注管理');
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
26
    }
27
28
    public static function at(\AcceptanceTester $I)
29
    {
30
        $page = new self($I);
31
        return $page->atPage('受注一覧受注管理');
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
32
    }
33
34
    public function 検索($value = '')
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::検索" is not in camel caps format
Loading history...
35
    {
36
        $this->tester->fillField(['id' => 'admin_search_order_multi'], $value);
37
        $this->tester->click('#search_form #search_submit');
38
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
39
    }
40
41 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 "OrderManagePage::詳細検索設定" is not in camel caps format
Loading history...
42
    {
43
        $this->tester->click(self::$詳細検索ボタン);
44
        $this->tester->waitForElementVisible(['id' => 'searchDetail']);
45
        $this->tester->wait(0.5);
46
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
47
    }
48
49
    public function 入力_ご注文者お名前($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::入力_ご注文者お名前" is not in camel caps format
Loading history...
50
    {
51
        $this->tester->fillField(['id' => 'admin_search_order_name'], $value);
52
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
53
    }
54
55
    public function 入力_ご注文者お名前フリガナ($value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::入力_ご注文者お名前フリガナ" is not in camel caps format
Loading history...
56
    {
57
        $this->tester->fillField(['id' => 'admin_search_order_kana'], $value);
58
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
59
    }
60
61 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 "OrderManagePage::詳細検索_電話番号" is not in camel caps format
Loading history...
62
    {
63
        $this->tester->click(self::$詳細検索ボタン);
64
        $this->tester->wait(1);
65
        $this->tester->fillField(['id' => 'admin_search_order_phone_number'], $value);
66
        $this->tester->click('#search_form #search_submit');
67
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
68
    }
69
70 View Code Duplication
    public function 受注CSVダウンロード実行()
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 "OrderManagePage::受注CSVダウンロード実行" is not in camel caps format
Loading history...
71
    {
72
        $this->tester->click(['id' => 'csvDownloadDropDown']);
73
        $this->tester->waitForElementVisible(['id' => 'orderCsvDownload']);
74
        $this->tester->click(['id' => 'orderCsvDownload']);
75
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
76
    }
77
78 View Code Duplication
    public function 受注CSV出力項目設定()
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 "OrderManagePage::受注CSV出力項目設定" is not in camel caps format
Loading history...
79
    {
80
        $this->tester->click(['id' => 'csvSettingDropDown']);
81
        $this->tester->waitForElementVisible(['id' => 'orderCsvSetting']);
82
        $this->tester->click(['id' => 'orderCsvSetting']);
83
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
84
    }
85
86 View Code Duplication
    public function 配送CSVダウンロード実行()
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 "OrderManagePage::配送CSVダウンロード実行" is not in camel caps format
Loading history...
87
    {
88
        $this->tester->click(['id' => 'csvDownloadDropDown']);
89
        $this->tester->waitForElementVisible(['id' => 'shippingCsvDownload']);
90
        $this->tester->click(['id' => 'shippingCsvDownload']);
91
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
92
    }
93
94 View Code Duplication
    public function 配送CSV出力項目設定()
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 "OrderManagePage::配送CSV出力項目設定" is not in camel caps format
Loading history...
95
    {
96
        $this->tester->click(['id' => 'csvSettingDropDown']);
97
        $this->tester->waitForElementVisible(['id' => 'shippingCsvSetting']);
98
        $this->tester->click(['id' => 'shippingCsvSetting']);
99
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
100
    }
101
102
    public function すべてチェック()
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::すべてチェック" is not in camel caps format
Loading history...
103
    {
104
        $this->tester->click('#form_bulk #toggle_check_all');
105
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
106
    }
107
108
    public function 要素をクリック($element)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::要素をクリック" is not in camel caps format
Loading history...
109
    {
110
        $this->tester->click($element);
111
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
112
    }
113
114
    public function PDFフォームを入力($elId, $value)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::PDFフォームを入力" is not in camel caps format
Loading history...
115
    {
116
        $this->tester->fillField($elId, $value);
117
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
118
    }
119
120
    public function 一覧_編集($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::一覧_編集" is not in camel caps format
Loading history...
121
    {
122
        $this->tester->click("#search_result > tbody > tr:nth-child(${rowNum}) a.action-edit");
123
    }
124
125
    public function 一覧_削除()
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::一覧_削除" is not in camel caps format
Loading history...
126
    {
127
        $this->tester->click("#form_bulk > div.row.justify-content-between.mb-2 .btn-bulk-wrapper button.btn.btn-ec-delete");
128
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
129
    }
130
131
    public function Accept_削除()
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::Accept_削除" is not in camel caps format
Loading history...
132
    {
133
        $this->tester->waitForElementVisible(['id' => 'btn_bulk_delete']);
134
        $this->tester->click("#btn_bulk_delete");
135
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
136
    }
137
138
    public function Cancel_削除()
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::Cancel_削除" is not in camel caps format
Loading history...
139
    {
140
        $this->tester->click("#bulkDeleteModal > div > div > div.modal-footer > button.btn.btn-ec-sub");
141
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
142
    }
143
144 View Code Duplication
    public function 一覧_メール通知($rowNum)
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 "OrderManagePage::一覧_メール通知" is not in camel caps format
Loading history...
145
    {
146
        $this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3.text-center > div > div:nth-child(1) > a"]);
147
        $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']);
148
        $this->tester->wait(2);
149
        $this->tester->scrollTo(['id' => 'bulkChange']);
150
        $this->tester->click(['id' => 'bulkChange']);
151
        $this->tester->wait(5);
152
        $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']);
153
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
154
    }
155
156
    public function 一覧_選択($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::一覧_選択" is not in camel caps format
Loading history...
157
    {
158
        $this->tester->checkOption(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td > input[type=checkbox]"]);
159
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
160
    }
161
162
    public function 一覧_全選択()
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::一覧_全選択" is not in camel caps format
Loading history...
163
    {
164
        $this->tester->checkOption('#toggle_check_all');
165
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
166
    }
167
168
169 View Code Duplication
    public function 個別メール送信($rowNum)
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 "OrderManagePage::個別メール送信" is not in camel caps format
Loading history...
170
    {
171
        $this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3.text-center > div > div:nth-child(1) > a"]);
172
        $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']);
173
        $this->tester->wait(2);
174
        $this->tester->scrollTo(['id' => 'bulkChange']);
175
        $this->tester->click(['id' => 'bulkChange']);
176
        $this->tester->wait(5);
177
        $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']);
178
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
179
    }
180
181 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 "OrderManagePage::一括メール送信" is not in camel caps format
Loading history...
182
    {
183
        $this->tester->click(['id' => 'bulkSendMail']);
184
        $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']);
185
        $this->tester->wait(1);
186
        $this->tester->click(['id' => 'bulkChange']);
187
        $this->tester->wait(5);
188
        $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']);
189
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
190
    }
191
192
    public function 一覧_注文番号($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::一覧_注文番号" is not in camel caps format
Loading history...
193
    {
194
        return $this->tester->grabTextFrom("#search_result > tbody > tr:nth-child($rowNum) a.action-edit");
195
    }
196
197
    public function 受注ステータス検索($value = '')
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::受注ステータス検索" is not in camel caps format
Loading history...
198
    {
199
        $this->tester->checkOption(['id' => 'admin_search_order_status_' . $value]);
0 ignored issues
show
Coding Style introduced by
Concat operator must not be surrounded by spaces
Loading history...
200
        $this->tester->click('#search_form #search_submit');
201
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
202
    }
203
204
    public function 受注ステータス変更($option = [])
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::受注ステータス変更" is not in camel caps format
Loading history...
205
    {
206
        $this->tester->selectOption('#option_bulk_status', $option);
207
        $this->tester->click('#form_bulk #btn_bulk_status');
208
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
209
    }
210
211 View Code Duplication
    public function 出荷済にする($rowNum)
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 "OrderManagePage::出荷済にする" is not in camel caps format
Loading history...
212
    {
213
        $this->tester->click("#search_result > tbody > tr:nth-child($rowNum) a[data-type='status']");
214
        $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']);
215
        $this->tester->wait(2);
216
        $this->tester->click(['id' => 'notificationMail']);
217
        $this->tester->scrollTo(['id' => 'bulkChange']);
218
        $this->tester->click(['id' => 'bulkChange']);
219
        $this->tester->wait(5);
220
        $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']);
221
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
222
    }
223
224
    public function 取得_出荷伝票番号($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::取得_出荷伝票番号" is not in camel caps format
Loading history...
225
    {
226
        return $this->tester->grabValueFrom("#search_result > tbody > tr:nth-child(${rowNum}) > td:nth-child(8) > div > input");
227
    }
228
229
    public function 取得_出荷日($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::取得_出荷日" is not in camel caps format
Loading history...
230
    {
231
        return $this->tester->grabTextFrom("#search_result > tbody > tr:nth-child(${rowNum}) > td:nth-child(7)");
232
    }
233
234
    public function 取得_ステータス($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::取得_ステータス" is not in camel caps format
Loading history...
235
    {
236
        return $this->tester->grabTextFrom("#search_result > tbody > tr:nth-child(${rowNum}) > td:nth-child(4) > span");
237
    }
238
}
239