Failed Conditions
Push — experimental/sf ( 069d05...1f2df0 )
by chihiro
157:56 queued 150:35
created

OrderManagePage::個別メール送信()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 11
loc 11
rs 9.9
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
13
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$I" missing
Loading history...
14
     * OrderListPage constructor.
15
     */
16
    public function __construct(\AcceptanceTester $I)
17
    {
18
        parent::__construct($I);
19
    }
20
21
    public static function go(\AcceptanceTester $I)
22
    {
23
        $page = new self($I);
24
        return $page->goPage('/order', '受注一覧受注管理');
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
25
    }
26
27
    public static function at(\AcceptanceTester $I)
28
    {
29
        $page = new self($I);
30
        return $page->atPage('受注一覧受注管理');
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
31
    }
32
33
    public function 検索($value = '')
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::検索" is not in camel caps format
Loading history...
34
    {
35
        $this->tester->fillField(['id' => 'admin_search_order_multi'], $value);
36
        $this->tester->click('#search_form #search_submit');
37
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
38
    }
39
40 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...
41
    {
42
        $this->tester->click(self::$詳細検索ボタン);
43
        $this->tester->waitForElementVisible(['id' => 'searchDetail']);
44
        $this->tester->wait(0.5);
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 "OrderManagePage::入力_ご注文者お名前" is not in camel caps format
Loading history...
49
    {
50
        $this->tester->fillField(['id' => 'admin_search_order_name'], $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 "OrderManagePage::入力_ご注文者お名前フリガナ" is not in camel caps format
Loading history...
55
    {
56
        $this->tester->fillField(['id' => 'admin_search_order_kana'], $value);
57
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
58
    }
59
60 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...
61
    {
62
        $this->tester->click(self::$詳細検索ボタン);
63
        $this->tester->wait(1);
64
        $this->tester->fillField(['id' => 'admin_search_order_phone_number'], $value);
65
        $this->tester->click('#search_form #search_submit');
66
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
67
    }
68
69 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...
70
    {
71
        $this->tester->click(['id' => 'csvDownloadDropDown']);
72
        $this->tester->waitForElementVisible(['id' => 'orderCsvDownload']);
73
        $this->tester->click(['id' => 'orderCsvDownload']);
74
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
75
    }
76
77 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...
78
    {
79
        $this->tester->click(['id' => 'csvSettingDropDown']);
80
        $this->tester->waitForElementVisible(['id' => 'orderCsvSetting']);
81
        $this->tester->click(['id' => 'orderCsvSetting']);
82
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
83
    }
84
85 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...
86
    {
87
        $this->tester->click(['id' => 'csvDownloadDropDown']);
88
        $this->tester->waitForElementVisible(['id' => 'shippingCsvDownload']);
89
        $this->tester->click(['id' => 'shippingCsvDownload']);
90
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
91
    }
92
93 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...
94
    {
95
        $this->tester->click(['id' => 'csvSettingDropDown']);
96
        $this->tester->waitForElementVisible(['id' => 'shippingCsvSetting']);
97
        $this->tester->click(['id' => 'shippingCsvSetting']);
98
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
99
    }
100
101
    public function 一覧_編集($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::一覧_編集" is not in camel caps format
Loading history...
102
    {
103
        $this->tester->click("#search_result > tbody > tr:nth-child(${rowNum}) a.action-edit");
104
    }
105
106
    public function 一覧_削除()
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::一覧_削除" is not in camel caps format
Loading history...
107
    {
108
        $this->tester->click("#form_bulk > div.row.justify-content-between.mb-2 .btn-bulk-wrapper button.btn.btn-ec-delete");
109
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
110
    }
111
112
    public function Accept_削除()
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::Accept_削除" is not in camel caps format
Loading history...
113
    {
114
        $this->tester->waitForElementVisible(['id' => 'btn_bulk_delete']);
115
        $this->tester->click("#btn_bulk_delete");
116
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
117
    }
118
119
    public function Cancel_削除()
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::Cancel_削除" is not in camel caps format
Loading history...
120
    {
121
        $this->tester->click("#bulkDeleteModal > div > div > div.modal-footer > button.btn.btn-ec-sub");
122
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
123
    }
124
125 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...
126
    {
127
        $this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3.text-center > div > div:nth-child(1) > a"]);
128
        $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']);
129
        $this->tester->wait(2);
130
        $this->tester->scrollTo(['id' => 'bulkChange']);
131
        $this->tester->click(['id' => 'bulkChange']);
132
        $this->tester->wait(5);
133
        $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']);
134
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
135
    }
136
137
    public function 一覧_選択($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::一覧_選択" is not in camel caps format
Loading history...
138
    {
139
        $this->tester->checkOption(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td > input[type=checkbox]"]);
140
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
141
    }
142
143
    public function 一覧_全選択()
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::一覧_全選択" is not in camel caps format
Loading history...
144
    {
145
        $this->tester->checkOption('#toggle_check_all');
146
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
147
    }
148
149
150 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...
151
    {
152
        $this->tester->click(['css' => "#search_result > tbody > tr:nth-child(${rowNum}) > td.align-middle.pr-3.text-center > div > div:nth-child(1) > a"]);
153
        $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']);
154
        $this->tester->wait(2);
155
        $this->tester->scrollTo(['id' => 'bulkChange']);
156
        $this->tester->click(['id' => 'bulkChange']);
157
        $this->tester->wait(5);
158
        $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']);
159
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
160
    }
161
162 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...
163
    {
164
        $this->tester->click(['id' => 'bulkSendMail']);
165
        $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']);
166
        $this->tester->wait(1);
167
        $this->tester->click(['id' => 'bulkChange']);
168
        $this->tester->wait(5);
169
        $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']);
170
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
171
    }
172
173
    public function 一覧_注文番号($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::一覧_注文番号" is not in camel caps format
Loading history...
174
    {
175
        return $this->tester->grabTextFrom("#search_result > tbody > tr:nth-child($rowNum) a.action-edit");
176
    }
177
178
    public function 受注ステータス検索($value = '')
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::受注ステータス検索" is not in camel caps format
Loading history...
179
    {
180
        $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...
181
        $this->tester->click('#search_form #search_submit');
182
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
183
    }
184
185
    public function 受注ステータス変更($option = [])
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::受注ステータス変更" is not in camel caps format
Loading history...
186
    {
187
        $this->tester->selectOption('#option_bulk_status', $option);
188
        $this->tester->click('#form_bulk #btn_bulk_status');
189
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
190
    }
191
192 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...
193
    {
194
        $this->tester->click("#search_result > tbody > tr:nth-child($rowNum) a[data-type='status']");
195
        $this->tester->waitForElementVisible(['id' => 'sentUpdateModal']);
196
        $this->tester->wait(2);
197
        $this->tester->click(['id' => 'notificationMail']);
198
        $this->tester->scrollTo(['id' => 'bulkChange']);
199
        $this->tester->click(['id' => 'bulkChange']);
200
        $this->tester->wait(5);
201
        $this->tester->waitForElementVisible(['id' => 'bulkChangeComplete']);
202
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
203
    }
204
205
    public function 取得_出荷伝票番号($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::取得_出荷伝票番号" is not in camel caps format
Loading history...
206
    {
207
        return $this->tester->grabValueFrom("#search_result > tbody > tr:nth-child(${rowNum}) > td:nth-child(8) > div > input");
208
    }
209
210
    public function 取得_出荷日($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "OrderManagePage::取得_出荷日" is not in camel caps format
Loading history...
211
    {
212
        return $this->tester->grabTextFrom("#search_result > tbody > tr:nth-child(${rowNum}) > td:nth-child(7)");
213
    }
214
}
215