Completed
Pull Request — experimental/sf (#3433)
by
unknown
838:20 queued 830:35
created

ProductEditPage::プレビュー()   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 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * 商品管理/商品登録
5
 */
6
namespace Page\Admin;
7
8
class ProductEditPage extends AbstractAdminPageStyleGuide
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
9
{
10
    public static $登録結果メッセージ = '#page_admin_product_product_edit > div.c-container > div.c-contentsArea > div.alert.alert-success.alert-dismissible.fade.show.m-3';
0 ignored issues
show
Coding Style introduced by
Member variable "登録結果メッセージ" is not in valid camel caps format
Loading history...
11
    public static $販売種別 = ['id' => 'admin_product_class_sale_type'];
0 ignored issues
show
Coding Style introduced by
Member variable "販売種別" is not in valid camel caps format
Loading history...
12
    public static $通常価格 = ['id' => 'admin_product_class_price01'];
0 ignored issues
show
Coding Style introduced by
Member variable "通常価格" is not in valid camel caps format
Loading history...
13
    public static $販売価格 = ['id' => 'admin_product_class_price02'];
0 ignored issues
show
Coding Style introduced by
Member variable "販売価格" is not in valid camel caps format
Loading history...
14
    public static $在庫数 = ['id' => 'admin_product_class_stock'];
0 ignored issues
show
Coding Style introduced by
Member variable "在庫数" is not in valid camel caps format
Loading history...
15
    public static $商品コード = ['id' => 'admin_product_class_code'];
0 ignored issues
show
Coding Style introduced by
Member variable "商品コード" is not in valid camel caps format
Loading history...
16
    public static $販売制限数 = ['id' => 'admin_product_class_sale_limit'];
0 ignored issues
show
Coding Style introduced by
Member variable "販売制限数" is not in valid camel caps format
Loading history...
17
    public static $お届可能日 = ['id' => 'admin_product_class_delivery_duration'];
0 ignored issues
show
Coding Style introduced by
Member variable "お届可能日" is not in valid camel caps format
Loading history...
18
19
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$I" missing
Loading history...
20
     * ProductRegisterPage constructor.
21
     */
22
    public function __construct(\AcceptanceTester $I)
23
    {
24
        parent::__construct($I);
25
    }
26
27
    public static function go($I)
28
    {
29
        $page = new ProductEditPage($I);
30
        return $page->goPage('/product/product/new', '商品管理商品登録');
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
31
    }
32
33
    public static function at($I)
34
    {
35
        $page = new ProductEditPage($I);
36
        $page->tester->see('商品管理商品登録', '#page_admin_product_product_edit > div.c-container > div.c-contentsArea > div > div');
37
        return $page;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
38
    }
39
40
    public function 入力_商品名($value)
0 ignored issues
show
Coding Style introduced by
Method name "ProductEditPage::入力_商品名" is not in camel caps format
Loading history...
41
    {
42
        $this->tester->fillField(['id' => 'admin_product_name'], $value);
43
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
44
    }
45
46
    public function 入力_販売価格($value)
0 ignored issues
show
Coding Style introduced by
Method name "ProductEditPage::入力_販売価格" is not in camel caps format
Loading history...
47
    {
48
        $this->tester->fillField(self::$販売価格, $value);
49
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
50
    }
51
52
    public function 入力_公開()
0 ignored issues
show
Coding Style introduced by
Method name "ProductEditPage::入力_公開" is not in camel caps format
Loading history...
53
    {
54
        $this->tester->selectOption('#admin_product_Status', '公開');
55
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
56
    }
57
58
    public function 入力_非公開()
0 ignored issues
show
Coding Style introduced by
Method name "ProductEditPage::入力_非公開" is not in camel caps format
Loading history...
59
    {
60
        $this->tester->selectOption('#admin_product_Status', '非公開');
61
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
62
    }
63
64
    public function クリックして開くタグリスト()
0 ignored issues
show
Coding Style introduced by
Method name "ProductEditPage::クリックして開くタグリスト" is not in camel caps format
Loading history...
65
    {
66
        $this->tester->click(['css' => 'div[href="#allTags"] > a']);
67
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
68
    }
69
70
    public function クリックして選択タグ($num)
0 ignored issues
show
Coding Style introduced by
Method name "ProductEditPage::クリックして選択タグ" is not in camel caps format
Loading history...
71
    {
72
        $this->tester->click(['css' => "#allTags > div:nth-child(${num}) button"]);
73
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
74
    }
75
76
    public function 入力_カテゴリ($category_id)
0 ignored issues
show
Coding Style introduced by
Method name "ProductEditPage::入力_カテゴリ" is not in camel caps format
Loading history...
77
    {
78
        $this->tester->checkOption(['id' => 'admin_product_category_'.$category_id]);
79
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
80
    }
81
82
    public function 規格管理()
0 ignored issues
show
Coding Style introduced by
Method name "ProductEditPage::規格管理" is not in camel caps format
Loading history...
83
    {
84
        $this->tester->scrollTo(['css' => '#standardConfig > div > div.d-block.text-center > a'],0, 200);
0 ignored issues
show
introduced by
Add a single space after each comma delimiter
Loading history...
85
        $this->tester->click(['css' => '#standardConfig > div > div.d-block.text-center > a']);
86
        $this->tester->waitForElement(['css' => '#standardConfig > div > div.d-block.text-center > a']);
87
        $this->tester->wait(1);
88
        $this->tester->click(['css' => '#confirmFormChangeModal > div > div > div.modal-footer > a.btn.btn-ec-conversion']);
89
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
90
    }
91
92
    public function 登録()
0 ignored issues
show
Coding Style introduced by
Method name "ProductEditPage::登録" is not in camel caps format
Loading history...
93
    {
94
        $this->tester->click('#form1 > div.c-conversionArea > div > div > div:nth-child(2) > div > div:nth-child(2) > button');
95
        return $this;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
96
    }
97
98
    public function プレビュー()
0 ignored issues
show
Coding Style introduced by
Method name "ProductEditPage::プレビュー" is not in camel caps format
Loading history...
99
    {
100
        $this->tester->click(['xpath' => "//*[@id='preview']/div/div/a[text()='プレビュー']"]);
101
    }
102
103
}
104