These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of EC-CUBE |
||
5 | * |
||
6 | * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. |
||
7 | * |
||
8 | * http://www.ec-cube.co.jp/ |
||
9 | * |
||
10 | * For the full copyright and license information, please view the LICENSE |
||
11 | * file that was distributed with this source code. |
||
12 | */ |
||
13 | |||
14 | namespace Page\Admin; |
||
15 | |||
16 | class OrderManagePage extends AbstractAdminPageStyleGuide |
||
17 | { |
||
18 | public static $検索条件_受注ステータス = ['id' => 'admin_search_order_status']; |
||
19 | public static $検索結果_メッセージ = '#search_form #search_total_count'; |
||
20 | public static $検索結果_エラーメッセージ = '//*[@id="page_admin_order"]/div[1]/div[3]/div[3]/div/div/div[1]/div/div[1]'; |
||
21 | public static $詳細検索ボタン = '//*[@id="search_form"]/div[1]/div/div/div[3]/a/i/span'; |
||
22 | public static $タイトル要素 = '.c-container .c-contentsArea .c-pageTitle .c-pageTitle__titles'; |
||
23 | |||
24 | /** |
||
25 | * OrderListPage constructor. |
||
26 | */ |
||
27 | public function __construct(\AcceptanceTester $I) |
||
28 | { |
||
29 | parent::__construct($I); |
||
30 | } |
||
31 | |||
32 | public static function go(\AcceptanceTester $I) |
||
33 | { |
||
34 | $page = new self($I); |
||
35 | |||
36 | return $page->goPage('/order', '受注一覧受注管理'); |
||
37 | } |
||
38 | |||
39 | public static function at(\AcceptanceTester $I) |
||
40 | { |
||
41 | $page = new self($I); |
||
42 | |||
43 | return $page->atPage('受注一覧受注管理'); |
||
44 | } |
||
45 | |||
46 | public function 検索($value = '') |
||
47 | { |
||
48 | $this->tester->fillField(['id' => 'admin_search_order_multi'], $value); |
||
49 | $this->tester->click('#search_form #search_submit'); |
||
50 | |||
51 | return $this; |
||
52 | } |
||
53 | |||
54 | public function 詳細検索設定() |
||
55 | { |
||
56 | $this->tester->click(self::$詳細検索ボタン); |
||
57 | $this->tester->waitForElementVisible(['id' => 'searchDetail']); |
||
58 | $this->tester->wait(0.5); |
||
59 | |||
60 | return $this; |
||
61 | } |
||
62 | |||
63 | public function 入力_ご注文者お名前($value) |
||
64 | { |
||
65 | $this->tester->fillField(['id' => 'admin_search_order_name'], $value); |
||
66 | |||
67 | return $this; |
||
68 | } |
||
69 | |||
70 | public function 入力_ご注文者お名前フリガナ($value) |
||
71 | { |
||
72 | $this->tester->fillField(['id' => 'admin_search_order_kana'], $value); |
||
73 | |||
74 | return $this; |
||
75 | } |
||
76 | |||
77 | View Code Duplication | public function 詳細検索_電話番号($value = '') |
|
0 ignored issues
–
show
|
|||
78 | { |
||
79 | $this->tester->click(self::$詳細検索ボタン); |
||
80 | $this->tester->wait(1); |
||
81 | $this->tester->fillField(['id' => 'admin_search_order_phone_number'], $value); |
||
82 | $this->tester->click('#search_form #search_submit'); |
||
83 | |||
84 | return $this; |
||
85 | } |
||
86 | |||
87 | View Code Duplication | public function 受注CSVダウンロード実行() |
|
0 ignored issues
–
show
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...
|
|||
88 | { |
||
89 | $this->tester->click(['id' => 'csvDownloadDropDown']); |
||
90 | $this->tester->waitForElementVisible(['id' => 'orderCsvDownload']); |
||
91 | $this->tester->click(['id' => 'orderCsvDownload']); |
||
92 | |||
93 | return $this; |
||
94 | } |
||
95 | |||
96 | View Code Duplication | public function 受注CSV出力項目設定() |
|
0 ignored issues
–
show
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...
|
|||
97 | { |
||
98 | $this->tester->click(['id' => 'csvSettingDropDown']); |
||
99 | $this->tester->waitForElementVisible(['id' => 'orderCsvSetting']); |
||
100 | $this->tester->click(['id' => 'orderCsvSetting']); |
||
101 | |||
102 | return $this; |
||
103 | } |
||
104 | |||
105 | View Code Duplication | public function 配送CSVダウンロード実行() |
|
0 ignored issues
–
show
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...
|
|||
106 | { |
||
107 | $this->tester->click(['id' => 'csvDownloadDropDown']); |
||
108 | $this->tester->waitForElementVisible(['id' => 'shippingCsvDownload']); |
||
109 | $this->tester->click(['id' => 'shippingCsvDownload']); |
||
110 | |||
111 | return $this; |
||
112 | } |
||
113 | |||
114 | View Code Duplication | public function 配送CSV出力項目設定() |
|
0 ignored issues
–
show
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...
|
|||
115 | { |
||
116 | $this->tester->click(['id' => 'csvSettingDropDown']); |
||
117 | $this->tester->waitForElementVisible(['id' => 'shippingCsvSetting']); |
||
118 | $this->tester->click(['id' => 'shippingCsvSetting']); |
||
119 | |||
120 | return $this; |
||
121 | } |
||
122 | |||
123 | public function すべてチェック() |
||
124 | { |
||
125 | $this->tester->click('#form_bulk #toggle_check_all'); |
||
126 | |||
127 | return $this; |
||
128 | } |
||
129 | |||
130 | public function 要素をクリック($element) |
||
131 | { |
||
132 | $this->tester->click($element); |
||
133 | |||
134 | return $this; |
||
135 | } |
||
136 | |||
137 | public function PDFフォームを入力($elId, $value) |
||
138 | { |
||
139 | $this->tester->fillField($elId, $value); |
||
140 | |||
141 | return $this; |
||
142 | } |
||
143 | |||
144 | public function 一覧_編集($rowNum) |
||
145 | { |
||
146 | $this->tester->click("#search_result > tbody > tr:nth-child(${rowNum}) a.action-edit"); |
||
147 | } |
||
148 | |||
149 | public function 一覧_削除() |
||
150 | { |
||
151 | $this->tester->click('#form_bulk > div.row.justify-content-between.mb-2 .btn-bulk-wrapper button.btn.btn-ec-delete'); |
||
152 | |||
153 | return $this; |
||
154 | } |
||
155 | |||
156 | public function Accept_削除() |
||
157 | { |
||
158 | $this->tester->waitForElementVisible(['id' => 'btn_bulk_delete']); |
||
159 | $this->tester->click('#btn_bulk_delete'); |
||
160 | |||
161 | return $this; |
||
162 | } |
||
163 | |||
164 | public function Cancel_削除() |
||
165 | { |
||
166 | $this->tester->waitForElementVisible('#bulkDeleteModal > div > div > div.modal-footer > button.btn.btn-ec-sub'); |
||
167 | $this->tester->click('#bulkDeleteModal > div > div > div.modal-footer > button.btn.btn-ec-sub'); |
||
168 | |||
169 | return $this; |
||
170 | } |
||
171 | |||
172 | View Code Duplication | public function 一覧_メール通知($rowNum) |
|
0 ignored issues
–
show
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...
|
|||
173 | { |
||
174 | $this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3 > div > div:nth-child(1) > a"]); |
||
175 | $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); |
||
176 | $this->tester->scrollTo(['id' => 'bulkChange']); |
||
177 | $this->tester->click(['id' => 'bulkChange']); |
||
178 | $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']); |
||
179 | |||
180 | return $this; |
||
181 | } |
||
182 | |||
183 | public function 一覧_選択($rowNum) |
||
184 | { |
||
185 | $this->tester->checkOption(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td > input[type=checkbox]"]); |
||
186 | |||
187 | return $this; |
||
188 | } |
||
189 | |||
190 | public function 一覧_全選択() |
||
191 | { |
||
192 | $this->tester->checkOption('#toggle_check_all'); |
||
193 | |||
194 | return $this; |
||
195 | } |
||
196 | |||
197 | View Code Duplication | public function 個別メール送信($rowNum) |
|
0 ignored issues
–
show
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...
|
|||
198 | { |
||
199 | $this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3.text-center > div > div:nth-child(1) > a"]); |
||
200 | $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); |
||
201 | $this->tester->scrollTo(['id' => 'bulkChange']); |
||
202 | $this->tester->click(['id' => 'bulkChange']); |
||
203 | $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']); |
||
204 | |||
205 | return $this; |
||
206 | } |
||
207 | |||
208 | View Code Duplication | public function 一括メール送信() |
|
0 ignored issues
–
show
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...
|
|||
209 | { |
||
210 | $this->tester->click(['id' => 'bulkSendMail']); |
||
211 | $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); |
||
212 | $this->tester->click(['id' => 'bulkChange']); |
||
213 | $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']); |
||
214 | |||
215 | return $this; |
||
216 | } |
||
217 | |||
218 | public function 一覧_注文番号($rowNum) |
||
219 | { |
||
220 | return $this->tester->grabTextFrom("#search_result > tbody > tr:nth-child($rowNum) a.action-edit"); |
||
221 | } |
||
222 | |||
223 | public function 受注ステータス検索($value = '') |
||
224 | { |
||
225 | $this->tester->checkOption(['id' => 'admin_search_order_status_'.$value]); |
||
226 | $this->tester->click('#search_form #search_submit'); |
||
227 | |||
228 | return $this; |
||
229 | } |
||
230 | |||
231 | public function 受注ステータス変更($option = []) |
||
232 | { |
||
233 | $this->tester->selectOption('#option_bulk_status', $option); |
||
234 | $this->tester->click('#form_bulk #btn_bulk_status'); |
||
235 | |||
236 | return $this; |
||
237 | } |
||
238 | |||
239 | View Code Duplication | public function 出荷済にする($rowNum) |
|
0 ignored issues
–
show
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...
|
|||
240 | { |
||
241 | $this->tester->click("#search_result > tbody > tr:nth-child($rowNum) a[data-type='status']"); |
||
242 | $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']); |
||
243 | $this->tester->click(['id' => 'notificationMail']); |
||
244 | $this->tester->scrollTo(['id' => 'bulkChange']); |
||
245 | $this->tester->click(['id' => 'bulkChange']); |
||
246 | $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']); |
||
247 | |||
248 | return $this; |
||
249 | } |
||
250 | |||
251 | public function 取得_出荷伝票番号($rowNum) |
||
252 | { |
||
253 | return $this->tester->grabValueFrom("#search_result > tbody > tr:nth-child(${rowNum}) > td:nth-child(8) > div > input"); |
||
254 | } |
||
255 | |||
256 | public function 取得_出荷日($rowNum) |
||
257 | { |
||
258 | return $this->tester->grabTextFrom("#search_result > tbody > tr:nth-child(${rowNum}) > td:nth-child(7)"); |
||
259 | } |
||
260 | |||
261 | public function 取得_ステータス($rowNum) |
||
262 | { |
||
263 | return $this->tester->grabTextFrom("#search_result > tbody > tr:nth-child(${rowNum}) > td:nth-child(4) > span"); |
||
264 | } |
||
265 | |||
266 | public function 件数変更($num) |
||
267 | { |
||
268 | $this->tester->selectOption('#form_bulk > div.row.justify-content-between.mb-2 > div.col-5.text-right > div:nth-child(1) > select', '/admin/order/page/1?page_count='.$num); |
||
269 | |||
270 | return $this; |
||
271 | } |
||
272 | } |
||
273 |
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.