Failed Conditions
Pull Request — experimental/sf (#3264)
by Kiyotaka
93:10 queued 80:54
created

ShippingManagePage::詳細検索設定()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Page\Admin;
4
5
6
class ShippingManagePage extends AbstractAdminPageStyleGuide
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
7
{
8
    public static $検索条件_受注ステータス = ['id' => 'admin_search_shipping_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 > div.c-outsideBlock__contents.mb-3 > span';
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_shipping"]/div[1]/div[3]/div[3]/div/div[1]/div/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/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
     * ShippingListPage 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('/shipping', '出荷マスター出荷管理');
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 "ShippingManagePage::検索" is not in camel caps format
Loading history...
34
    {
35
        $this->tester->fillField(['id' => 'admin_search_shipping_multi'], $value);
36
        $this->tester->click('#search_form > div.c-outsideBlock__contents.mb-3 > button');
37
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
38
    }
39
40
    public function 詳細検索設定()
0 ignored issues
show
Coding Style introduced by
Method name "ShippingManagePage::詳細検索設定" 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 "ShippingManagePage::入力_ご注文者お名前" is not in camel caps format
Loading history...
49
    {
50
        $this->tester->fillField(['id' => 'admin_search_shipping_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 "ShippingManagePage::入力_ご注文者お名前フリガナ" is not in camel caps format
Loading history...
55
    {
56
        $this->tester->fillField(['id' => 'admin_search_shipping_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 "ShippingManagePage::詳細検索_電話番号" 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_shipping_phone_number'], $value);
65
        $this->tester->click('#search_form > div.c-outsideBlock__contents.mb-3 > button');
66
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
67
    }
68
69
    public function 出荷CSVダウンロード実行()
0 ignored issues
show
Coding Style introduced by
Method name "ShippingManagePage::出荷CSVダウンロード実行" is not in camel caps format
Loading history...
70
    {
71
        $this->tester->click(['xpath' => '//*[@id="form_bulk"]/div[1]/div[2]/div[2]/div/a[1]']);
72
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
73
    }
74
75
    public function 出荷CSV出力項目設定()
0 ignored issues
show
Coding Style introduced by
Method name "ShippingManagePage::出荷CSV出力項目設定" is not in camel caps format
Loading history...
76
    {
77
        $this->tester->click(['xpath' => '//*[@id="form_bulk"]/div[1]/div[2]/div[2]/div/a[2]']);
78
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
79
    }
80
81
    public function 一覧_編集($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingManagePage::一覧_編集" is not in camel caps format
Loading history...
82
    {
83
        $this->tester->click(['xpath' => "//*[@id='form_bulk']/div[2]/div/table/tbody/tr[${rowNum}]/td[2]/a"]);
84
    }
85
86 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 "ShippingManagePage::一覧_削除" is not in camel caps format
Loading history...
87
    {
88
        $this->tester->waitForElementVisible(['xpath' => '//*[@id="btn_bulk"]/button[3]']);
89
        $this->tester->click(['xpath' => '//*[@id="btn_bulk"]/button[3]']);
90
        $this->tester->waitForElementVisible(['xpath' => '//*[@id="btn_bulk_delete"]']);
91
        $this->tester->click(['xpath' => '//*[@id="btn_bulk_delete"]']);
92
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
93
    }
94
95
    public function 一覧_削除キャンセル()
0 ignored issues
show
Coding Style introduced by
Method name "ShippingManagePage::一覧_削除キャンセル" is not in camel caps format
Loading history...
96
    {
97
        $this->tester->waitForElementVisible(['xpath' => '//*[@id="btn_bulk"]/button[1]']);
98
        $this->tester->click(['xpath' => '//*[@id="btn_bulk"]/button[1]']);
99
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
100
    }
101
102 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 "ShippingManagePage::一括発送済み更新" is not in camel caps format
Loading history...
103
    {
104
        $this->tester->waitForElementVisible(['xpath' => '//*[@id="btn_bulk"]/button[2]']);
105
        $this->tester->click(['xpath' => '//*[@id="btn_bulk"]/button[2]']);
106
        $this->tester->wait(3);
107
        $this->tester->click(['id' => 'notificationMail']);
108
        $this->tester->click(['id' => 'bulkChange']);
109
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
110
    }
111
112 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 "ShippingManagePage::一括発送済みメール送信" is not in camel caps format
Loading history...
113
    {
114
        $this->tester->waitForElementVisible(['xpath' => '//*[@id="btn_bulk"]/button[1]']);
115
        $this->tester->click(['xpath' => '//*[@id="btn_bulk"]/button[1]']);
116
        $this->tester->wait(3);
117
        $this->tester->click(['id' => 'bulkChange']);
118
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
119
    }
120
121
    public function 一覧_全選択()
0 ignored issues
show
Coding Style introduced by
Method name "ShippingManagePage::一覧_全選択" is not in camel caps format
Loading history...
122
    {
123
        $this->tester->checkOption(['id' => 'check-all']);
124
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
125
    }
126
127
    /**
128
     * TODO: Should remove this function due to new design does not have other dropdown menu
129
     */
130
    private function その他メニュー()
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
Coding Style introduced by
Method name "ShippingManagePage::その他メニュー" is not in camel caps format
Loading history...
131
    {
132
        $this->tester->click('#dropmenu > a');
133
    }
134
135
    public function メール一括通知()
0 ignored issues
show
introduced by
Declare public methods first, then protected ones and finally private ones
Loading history...
Coding Style introduced by
Method name "ShippingManagePage::メール一括通知" is not in camel caps format
Loading history...
136
    {
137
        $this->tester->click('#form_bulk #btn_bulk_mail');
138
    }
139
140
    public function 一覧_チェックボックス($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingManagePage::一覧_チェックボックス" is not in camel caps format
Loading history...
141
    {
142
        $this->tester->click(['xpath' => "//*[@id='form_bulk']/div[2]/div/table/tbody/tr[${rowNum}]/td[1]/input"]);
143
    }
144
145
    public function 取得_出荷伝票番号($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingManagePage::取得_出荷伝票番号" is not in camel caps format
Loading history...
146
    {
147
        return $this->tester->grabTextFrom("#form_bulk table > tbody > tr:nth-child(${rowNum}) > td:nth-child(3)");
148
    }
149
150
    public function 取得_出荷日($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingManagePage::取得_出荷日" is not in camel caps format
Loading history...
151
    {
152
        return $this->tester->grabTextFrom("#form_bulk table > tbody > tr:nth-child(${rowNum}) > td:nth-child(7)");
153
    }
154
}
155