Failed Conditions
Pull Request — experimental/sf (#3241)
by k-yamamura
43:19 queued 23:09
created

ShippingEditPage::__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
4
namespace Page\Admin;
5
6
7
class ShippingEditPage extends AbstractAdminPageStyleGuide
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
8
{
9
10
    public static $姓_エラーメッセージ = '#shippingerInfo > div > div:nth-child(2) > div.col > span > ul > p';
0 ignored issues
show
Coding Style introduced by
Member variable "姓_エラーメッセージ" is not in valid camel caps format
Loading history...
11
12
    public static $登録完了メッセージ = '#page_admin_shipping_edit > div > 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
     * ShippingRegisterPage 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('/shipping/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 "ShippingEditPage::入力_出荷ステータス" is not in camel caps format
Loading history...
37
    {
38
        $this->tester->selectOption(['id' => 'shipping_ShippingStatus'], $value);
39
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
40
    }
41
42
    public function お届け先編集()
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::お届け先編集" is not in camel caps format
Loading history...
43
    {
44
        $this->tester->click(['id' => 'edit-shipping-addr']);
45
        $this->tester->waitForElementVisible(['id' => 'shipping_name_name01']);
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 "ShippingEditPage::入力_姓" is not in camel caps format
Loading history...
50
    {
51
        $this->tester->fillField(['id' => 'shipping_name_name01'], $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 "ShippingEditPage::入力_名" is not in camel caps format
Loading history...
56
    {
57
        $this->tester->fillField(['id' => 'shipping_name_name02'], $value);
58
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
59
    }
60
61
    public function 入力_セイ($value)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::入力_セイ" is not in camel caps format
Loading history...
62
    {
63
        $this->tester->fillField(['id' => 'shipping_kana_kana01'], $value);
64
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
65
    }
66
67
    public function 入力_メイ($value)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::入力_メイ" is not in camel caps format
Loading history...
68
    {
69
        $this->tester->fillField(['id' => 'shipping_kana_kana02'], $value);
70
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
71
    }
72
73
    public function 入力_郵便番号($value)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::入力_郵便番号" is not in camel caps format
Loading history...
74
    {
75
        $this->tester->fillField(['id' => 'shipping_postal_code'], $value);
76
77
        return $this;
78
    }
79
80
    public function 入力_都道府県($value)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::入力_都道府県" is not in camel caps format
Loading history...
81
    {
82
        $this->tester->selectOption(['id' => 'shipping_address_pref'], $value);
83
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
84
    }
85
86
    public function 入力_市区町村名($value)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::入力_市区町村名" is not in camel caps format
Loading history...
87
    {
88
        $this->tester->fillField(['id' => 'shipping_address_addr01'], $value);
89
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
90
    }
91
92
    public function 入力_番地_ビル名($value)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::入力_番地_ビル名" is not in camel caps format
Loading history...
93
    {
94
        $this->tester->fillField(['id' => 'shipping_address_addr02'], $value);
95
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
96
    }
97
98
    public function 入力_電話番号($value)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::入力_電話番号" is not in camel caps format
Loading history...
99
    {
100
        $this->tester->fillField(['id' => 'shipping_phone_number'], $value);
101
102
        return $this;
103
    }
104
105
    public function 入力_出荷伝票番号($value)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::入力_出荷伝票番号" is not in camel caps format
Loading history...
106
    {
107
        $this->tester->fillField(['id' => 'shipping_tracking_number'], $value);
108
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
109
    }
110
111
    public function 入力_配送業者($value)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::入力_配送業者" is not in camel caps format
Loading history...
112
    {
113
        $this->tester->selectOption(['id' => 'shipping_Delivery'], $value);
114
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
115
    }
116
117
    public function 入力_配達用メモ($value)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::入力_配達用メモ" is not in camel caps format
Loading history...
118
    {
119
        $this->tester->fillField(['id' => 'shipping_note'], $value);
120
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
121
    }
122
123
    public function 商品検索($value = '')
0 ignored issues
show
Unused Code introduced by
The parameter $value is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Coding Style introduced by
Method name "ShippingEditPage::商品検索" is not in camel caps format
Loading history...
124
    {
125
        $this->tester->click(['xpath' => '//*[@id="shipmentItem"]/div/div/div/button']);
126
        $this->tester->waitForElementVisible(['id' => 'addProduct']);
127
        $this->tester->click(['id' => 'searchItemsButton']);
128
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
129
    }
130
131
    public function 商品検索結果_選択($rowNum)
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::商品検索結果_選択" is not in camel caps format
Loading history...
132
    {
133
        $this->tester->click(['xpath' => "//*[@id='searchItemsResult']/table/tbody/tr[${rowNum}]/td[5]/i"]);
134
        $this->tester->click(['xpath' => '//*[@id="addProduct"]/div/div/div[1]/button']);
135
        $this->tester->wait(1);
136
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
137
    }
138
139
    public function 出荷情報登録()
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::出荷情報登録" is not in camel caps format
Loading history...
140
    {
141
        $this->tester->click(['id' => 'btn_save']);
142
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
143
    }
144
145
    public function 変更を確定()
0 ignored issues
show
Coding Style introduced by
Method name "ShippingEditPage::変更を確定" is not in camel caps format
Loading history...
146
    {
147
        $this->tester->waitForElementVisible(['xpath' => '//*[@id="shippedNotifyModal"]/div/div/div[3]/button[2]']);
148
        $this->tester->click(['xpath' => '//*[@id="shippedNotifyModal"]/div/div/div[3]/button[2]']);
149
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
150
    }
151
}
152