Version Description
[ Bug fix ] Fix PHP Undefined error
Download this release
Release Info
Developer | vektor-inc |
Plugin | VK Block Patterns |
Version | 1.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.2.2
- admin/admin-role.php +2 -2
- composer.json +13 -0
- composer.lock +67 -0
- inc/vk-block-patterns/package/class-vk-block-patterns.php +5 -5
- package.json +2 -1
- phpunit.xml +14 -0
- phpunit.xml.dist +16 -0
- readme.txt +4 -1
- tests/boilerplate-behat-wordpress/.gitignore +6 -0
- tests/boilerplate-behat-wordpress/LICENSE +21 -0
- tests/boilerplate-behat-wordpress/README.md +112 -0
- tests/boilerplate-behat-wordpress/_out/.gitkeep +0 -0
- tests/boilerplate-behat-wordpress/behat.yml.dist +24 -0
- tests/boilerplate-behat-wordpress/bin/run-tests.js +18 -0
- tests/boilerplate-behat-wordpress/composer.json +5 -0
- tests/boilerplate-behat-wordpress/features/bootstrap/FeatureContext.php +22 -0
- tests/boilerplate-behat-wordpress/features/sample.feature +38 -0
- tests/boilerplate-behat-wordpress/package-lock.json +667 -0
- tests/boilerplate-behat-wordpress/package.json +18 -0
- tests/bootstrap.php +81 -0
- tests/test-get-options.php +48 -0
- tests/test-sample.php +20 -0
- vk-block-patterns.php +9 -1
admin/admin-role.php
CHANGED
@@ -30,7 +30,7 @@ $role_array = array(
|
|
30 |
?>
|
31 |
<section>
|
32 |
<h3 id="role-setting"><?php echo __( 'Role Setting', 'vk-block-patterns' ); ?></h3>
|
33 |
-
<?php $vbp_options =
|
34 |
<select name="vk_block_patterns_options[role]">
|
35 |
<?php foreach ( $role_array as $role ) : ?>
|
36 |
<option value="<?php echo $role['value']; ?>" <?php selected( $vbp_options['role'], $role['value'] ); ?>>
|
@@ -39,4 +39,4 @@ $role_array = array(
|
|
39 |
<?php endforeach; ?>
|
40 |
</select>
|
41 |
<?php submit_button(); ?>
|
42 |
-
</section>
|
30 |
?>
|
31 |
<section>
|
32 |
<h3 id="role-setting"><?php echo __( 'Role Setting', 'vk-block-patterns' ); ?></h3>
|
33 |
+
<?php $vbp_options = vbp_get_options(); ?>
|
34 |
<select name="vk_block_patterns_options[role]">
|
35 |
<?php foreach ( $role_array as $role ) : ?>
|
36 |
<option value="<?php echo $role['value']; ?>" <?php selected( $vbp_options['role'], $role['value'] ); ?>>
|
39 |
<?php endforeach; ?>
|
40 |
</select>
|
41 |
<?php submit_button(); ?>
|
42 |
+
</section>
|
composer.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "vektor/vk-block-patterns",
|
3 |
+
"type": "project",
|
4 |
+
"authors": [
|
5 |
+
{
|
6 |
+
"name": "Vektor, inc.",
|
7 |
+
"email": "info@vektor-inc.co.jp"
|
8 |
+
}
|
9 |
+
],
|
10 |
+
"require-dev": {
|
11 |
+
"wp-phpunit/wp-phpunit": "^5.4"
|
12 |
+
}
|
13 |
+
}
|
composer.lock
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_readme": [
|
3 |
+
"This file locks the dependencies of your project to a known state",
|
4 |
+
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
+
"This file is @generated automatically"
|
6 |
+
],
|
7 |
+
"content-hash": "3e50085c02dc564cd8fb98a84beb7fad",
|
8 |
+
"packages": [],
|
9 |
+
"packages-dev": [
|
10 |
+
{
|
11 |
+
"name": "wp-phpunit/wp-phpunit",
|
12 |
+
"version": "5.7.2",
|
13 |
+
"source": {
|
14 |
+
"type": "git",
|
15 |
+
"url": "https://github.com/wp-phpunit/wp-phpunit.git",
|
16 |
+
"reference": "5ab77c1e1328e9bee65f60c246e33b13fc202375"
|
17 |
+
},
|
18 |
+
"dist": {
|
19 |
+
"type": "zip",
|
20 |
+
"url": "https://api.github.com/repos/wp-phpunit/wp-phpunit/zipball/5ab77c1e1328e9bee65f60c246e33b13fc202375",
|
21 |
+
"reference": "5ab77c1e1328e9bee65f60c246e33b13fc202375",
|
22 |
+
"shasum": ""
|
23 |
+
},
|
24 |
+
"type": "library",
|
25 |
+
"autoload": {
|
26 |
+
"files": [
|
27 |
+
"__loaded.php"
|
28 |
+
]
|
29 |
+
},
|
30 |
+
"notification-url": "https://packagist.org/downloads/",
|
31 |
+
"license": [
|
32 |
+
"GPL-2.0-or-later"
|
33 |
+
],
|
34 |
+
"authors": [
|
35 |
+
{
|
36 |
+
"name": "Evan Mattson",
|
37 |
+
"email": "me@aaemnnost.tv"
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"name": "WordPress Community",
|
41 |
+
"homepage": "https://wordpress.org/about/"
|
42 |
+
}
|
43 |
+
],
|
44 |
+
"description": "WordPress core PHPUnit library",
|
45 |
+
"homepage": "https://github.com/wp-phpunit",
|
46 |
+
"keywords": [
|
47 |
+
"phpunit",
|
48 |
+
"test",
|
49 |
+
"wordpress"
|
50 |
+
],
|
51 |
+
"support": {
|
52 |
+
"docs": "https://github.com/wp-phpunit/docs",
|
53 |
+
"issues": "https://github.com/wp-phpunit/issues",
|
54 |
+
"source": "https://github.com/wp-phpunit/wp-phpunit"
|
55 |
+
},
|
56 |
+
"time": "2021-03-10T17:57:07+00:00"
|
57 |
+
}
|
58 |
+
],
|
59 |
+
"aliases": [],
|
60 |
+
"minimum-stability": "stable",
|
61 |
+
"stability-flags": [],
|
62 |
+
"prefer-stable": false,
|
63 |
+
"prefer-lowest": false,
|
64 |
+
"platform": [],
|
65 |
+
"platform-dev": [],
|
66 |
+
"plugin-api-version": "2.0.0"
|
67 |
+
}
|
inc/vk-block-patterns/package/class-vk-block-patterns.php
CHANGED
@@ -69,7 +69,7 @@ if ( ! class_exists( 'VK_Block_Patterns' ) ) {
|
|
69 |
public static function admin_init() {
|
70 |
|
71 |
global $wp_roles;
|
72 |
-
$vbp_options =
|
73 |
|
74 |
if ( isset( $vbp_options['role'] ) && 'contributor' === $vbp_options['role'] ) {
|
75 |
$wp_roles->add_cap( 'administrator', 'create_vk_block_patterns' );
|
@@ -108,10 +108,10 @@ if ( ! class_exists( 'VK_Block_Patterns' ) ) {
|
|
108 |
// New sub query.
|
109 |
$the_query = new \WP_Query(
|
110 |
array(
|
111 |
-
'post_type'
|
112 |
-
'post_status'
|
113 |
-
'no_found_rows'
|
114 |
-
'posts_per_page'
|
115 |
)
|
116 |
);
|
117 |
|
69 |
public static function admin_init() {
|
70 |
|
71 |
global $wp_roles;
|
72 |
+
$vbp_options = vbp_get_options();
|
73 |
|
74 |
if ( isset( $vbp_options['role'] ) && 'contributor' === $vbp_options['role'] ) {
|
75 |
$wp_roles->add_cap( 'administrator', 'create_vk_block_patterns' );
|
108 |
// New sub query.
|
109 |
$the_query = new \WP_Query(
|
110 |
array(
|
111 |
+
'post_type' => 'vk-block-patterns',
|
112 |
+
'post_status' => 'publish',
|
113 |
+
'no_found_rows' => true,
|
114 |
+
'posts_per_page' => -1,
|
115 |
)
|
116 |
);
|
117 |
|
package.json
CHANGED
@@ -4,7 +4,8 @@
|
|
4 |
"description": "You can make and register your original custom block patterns.",
|
5 |
"main": "gulpfile.js",
|
6 |
"scripts": {
|
7 |
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
|
8 |
},
|
9 |
"repository": {
|
10 |
"type": "git",
|
4 |
"description": "You can make and register your original custom block patterns.",
|
5 |
"main": "gulpfile.js",
|
6 |
"scripts": {
|
7 |
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8 |
+
"phpunit": "wp-env run phpunit \"phpunit -c /var/www/html/wp-content/plugins/vk-block-patterns/phpunit.xml.dist --verbose\""
|
9 |
},
|
10 |
"repository": {
|
11 |
"type": "git",
|
phpunit.xml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<phpunit
|
2 |
+
bootstrap="tests/bootstrap.php"
|
3 |
+
backupGlobals="false"
|
4 |
+
colors="true"
|
5 |
+
convertErrorsToExceptions="true"
|
6 |
+
convertNoticesToExceptions="true"
|
7 |
+
convertWarningsToExceptions="true"
|
8 |
+
>
|
9 |
+
<testsuites>
|
10 |
+
<testsuite>
|
11 |
+
<directory prefix="test-" suffix=".php">./tests/</directory>
|
12 |
+
</testsuite>
|
13 |
+
</testsuites>
|
14 |
+
</phpunit>
|
phpunit.xml.dist
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<phpunit
|
3 |
+
bootstrap="tests/bootstrap.php"
|
4 |
+
backupGlobals="false"
|
5 |
+
colors="true"
|
6 |
+
convertErrorsToExceptions="true"
|
7 |
+
convertNoticesToExceptions="true"
|
8 |
+
convertWarningsToExceptions="true"
|
9 |
+
>
|
10 |
+
<testsuites>
|
11 |
+
<testsuite name="test">
|
12 |
+
<directory prefix="test-" suffix=".php">./tests/</directory>
|
13 |
+
<exclude>./tests/test-sample.php</exclude>
|
14 |
+
</testsuite>
|
15 |
+
</testsuites>
|
16 |
+
</phpunit>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: Guternberg, Block Pattern
|
5 |
Requires at least: 5.6
|
6 |
Tested up to: 5.6
|
7 |
-
Stable tag: 1.2.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -16,6 +16,9 @@ When you activate this plugin that create new custom post type for custom block
|
|
16 |
|
17 |
== Changelog ==
|
18 |
|
|
|
|
|
|
|
19 |
= 1.2.1 =
|
20 |
[ Bug fix ][ PR Column ] Fixed a bug that the border of the image is displayed twice
|
21 |
|
4 |
Tags: Guternberg, Block Pattern
|
5 |
Requires at least: 5.6
|
6 |
Tested up to: 5.6
|
7 |
+
Stable tag: 1.2.2
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
16 |
|
17 |
== Changelog ==
|
18 |
|
19 |
+
= 1.2.2 =
|
20 |
+
[ Bug fix ] Fix PHP Undefined error
|
21 |
+
|
22 |
= 1.2.1 =
|
23 |
[ Bug fix ][ PR Column ] Fixed a bug that the border of the image is displayed twice
|
24 |
|
tests/boilerplate-behat-wordpress/.gitignore
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
node_modules
|
2 |
+
vendor
|
3 |
+
.behat.yml
|
4 |
+
_out/*
|
5 |
+
!_out/.gitkeep
|
6 |
+
composer.lock
|
tests/boilerplate-behat-wordpress/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The MIT License (MIT)
|
2 |
+
|
3 |
+
Copyright (c) 2017 Takayuki Miyauchi
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in
|
13 |
+
all copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21 |
+
THE SOFTWARE.
|
tests/boilerplate-behat-wordpress/README.md
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# A boilerplate for Testing WordPress with Behat
|
2 |
+
|
3 |
+
## Requires
|
4 |
+
|
5 |
+
* PHP 5.6 or later
|
6 |
+
* Composer 1.2 or later
|
7 |
+
|
8 |
+
## How to try
|
9 |
+
|
10 |
+
If you have a [VCCW](http://vccw.cc/) based environment, it is easy to try.
|
11 |
+
|
12 |
+
But if you don't have it, please see [customizing](#customizing) section.
|
13 |
+
|
14 |
+
Then `git clone` this repository and install dependencies.
|
15 |
+
|
16 |
+
```
|
17 |
+
$ git clone git@github.com:vccw-team/boilerplate-behat-wordpress.git
|
18 |
+
$ cd boilerplate-behat-wordpress
|
19 |
+
$ composer install
|
20 |
+
$ npm install
|
21 |
+
```
|
22 |
+
|
23 |
+
Finally, run behat tests.
|
24 |
+
|
25 |
+
```
|
26 |
+
$ npm test
|
27 |
+
```
|
28 |
+
|
29 |
+
Then you can see the result like following.
|
30 |
+
|
31 |
+
```
|
32 |
+
$ npm test
|
33 |
+
|
34 |
+
> wordpress-behat@1.0.0 test /Users/miyauchi/Desktop/boilerplate-behat-wordpress
|
35 |
+
> /usr/bin/env node bin/run-tests.js
|
36 |
+
|
37 |
+
Feature: Example Features
|
38 |
+
|
39 |
+
Scenario: Login as the "administrator" role # features/sample.feature:3
|
40 |
+
When I login as the "administrator" role # VCCW\Behat\Mink\WordPressExtension\Context\WordPressContext::login_as_the_role()
|
41 |
+
And I am on "/wp-admin/" # Behat\MinkExtension\Context\MinkContext::visit()
|
42 |
+
Then I should see "Dashboard" # Behat\MinkExtension\Context\MinkContext::assertPageContainsText()
|
43 |
+
|
44 |
+
Scenario: Take a screenshot # features/sample.feature:9
|
45 |
+
Given the screen size is 1440x900 # VCCW\Behat\Mink\WordPressExtension\Context\WordPressContext::set_window_size()
|
46 |
+
And I login as the "administrator" role # VCCW\Behat\Mink\WordPressExtension\Context\WordPressContext::login_as_the_role()
|
47 |
+
When I am on "/" # Behat\MinkExtension\Context\MinkContext::visit()
|
48 |
+
Then take a screenshot and save it to "_out/1440x900.png" # VCCW\Behat\Mink\WordPressExtension\Context\WordPressContext::take_a_screenshot()
|
49 |
+
When I am on "/wp-admin/" # Behat\MinkExtension\Context\MinkContext::visit()
|
50 |
+
Then take a screenshot and save it to "_out/1440x900-wp-admin.png" # VCCW\Behat\Mink\WordPressExtension\Context\WordPressContext::take_a_screenshot()
|
51 |
+
Given the screen size is 320x400 # VCCW\Behat\Mink\WordPressExtension\Context\WordPressContext::set_window_size()
|
52 |
+
When I am on "/" # Behat\MinkExtension\Context\MinkContext::visit()
|
53 |
+
Then take a screenshot and save it to "_out/320x400.png" # VCCW\Behat\Mink\WordPressExtension\Context\WordPressContext::take_a_screenshot()
|
54 |
+
When I am on "/wp-admin/" # Behat\MinkExtension\Context\MinkContext::visit()
|
55 |
+
Then take a screenshot and save it to "_out/320x400-wp-admin.png" # VCCW\Behat\Mink\WordPressExtension\Context\WordPressContext::take_a_screenshot()
|
56 |
+
|
57 |
+
2 個のシナリオ (2 個成功)
|
58 |
+
14 個のステップ (14 個成功)
|
59 |
+
0m6.89s (10.84Mb)
|
60 |
+
```
|
61 |
+
|
62 |
+
And also, you can see the screenshot in the `_out` directory.
|
63 |
+
|
64 |
+
## Customizing
|
65 |
+
|
66 |
+
### Create a configuration
|
67 |
+
|
68 |
+
Please copy and edit the `behat.yml.dist` to `behat.yml` like following.
|
69 |
+
|
70 |
+
#### Update the user account information
|
71 |
+
|
72 |
+
Please update the user name and password for administrator.
|
73 |
+
|
74 |
+
https://github.com/vccw-team/boilerplate-behat-wordpress/blob/master/behat.yml.dist#L14-L15
|
75 |
+
|
76 |
+
If you want to add additional user please add like following.
|
77 |
+
|
78 |
+
```
|
79 |
+
extensions:
|
80 |
+
VCCW\Behat\Mink\WordPressExtension:
|
81 |
+
roles:
|
82 |
+
administrator:
|
83 |
+
username: admin
|
84 |
+
password: admin
|
85 |
+
me:
|
86 |
+
username: me
|
87 |
+
password: 1111
|
88 |
+
```
|
89 |
+
|
90 |
+
You can use `me` like following in the `*.feature`.
|
91 |
+
|
92 |
+
```
|
93 |
+
Given I login as the "me" role
|
94 |
+
```
|
95 |
+
|
96 |
+
#### Update the URL to run test
|
97 |
+
|
98 |
+
You can set the URL in the `base_url` section.
|
99 |
+
|
100 |
+
https://github.com/vccw-team/boilerplate-behat-wordpress/blob/master/behat.yml.dist#L17
|
101 |
+
|
102 |
+
### Add your own tests
|
103 |
+
|
104 |
+
`*.feature` files in the `features/` directory are files which are recipe for the tests, so you can add `*.feature` to this directory.
|
105 |
+
|
106 |
+
Additional examples are in the following.
|
107 |
+
|
108 |
+
https://github.com/vccw-team/wordpress-mink-extension/tree/master/features
|
109 |
+
|
110 |
+
## License
|
111 |
+
|
112 |
+
MIT
|
tests/boilerplate-behat-wordpress/_out/.gitkeep
ADDED
File without changes
|
tests/boilerplate-behat-wordpress/behat.yml.dist
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
default:
|
2 |
+
suites:
|
3 |
+
default:
|
4 |
+
paths:
|
5 |
+
- %paths.base%/features
|
6 |
+
contexts:
|
7 |
+
- FeatureContext
|
8 |
+
- VCCW\Behat\Mink\WordPressExtension\Context\WordPressContext
|
9 |
+
- Behat\MinkExtension\Context\MinkContext
|
10 |
+
extensions:
|
11 |
+
VCCW\Behat\Mink\WordPressExtension:
|
12 |
+
roles:
|
13 |
+
administrator:
|
14 |
+
username: e2e-test-user
|
15 |
+
password: f40QlA47CcqQo
|
16 |
+
Behat\MinkExtension:
|
17 |
+
base_url: https://dev.vws.vektor-inc.co.jp
|
18 |
+
default_session: default
|
19 |
+
sessions:
|
20 |
+
default:
|
21 |
+
selenium2:
|
22 |
+
wd_host: http://127.0.0.1:4444/wd/hub
|
23 |
+
goutte:
|
24 |
+
goutte: ~
|
tests/boilerplate-behat-wordpress/bin/run-tests.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const phantomjs = require( 'phantomjs-prebuilt' )
|
2 |
+
const spawn = require( 'child_process' ).spawn
|
3 |
+
|
4 |
+
const argv = process.argv
|
5 |
+
argv.shift()
|
6 |
+
argv.shift()
|
7 |
+
|
8 |
+
phantomjs.run(
|
9 |
+
'--webdriver=4444',
|
10 |
+
'--ignore-ssl-errors=yes',
|
11 |
+
'--cookies-file=/tmp/webdriver_cookie.txt'
|
12 |
+
).then( program => {
|
13 |
+
const behat = spawn( 'vendor/bin/behat', argv, { stdio: "inherit" } )
|
14 |
+
behat.on( 'exit', ( code ) => {
|
15 |
+
program.kill()
|
16 |
+
process.exit( code );
|
17 |
+
} )
|
18 |
+
} )
|
tests/boilerplate-behat-wordpress/composer.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"require": {
|
3 |
+
"vccw-team/wordpress-extension": "@stable"
|
4 |
+
}
|
5 |
+
}
|
tests/boilerplate-behat-wordpress/features/bootstrap/FeatureContext.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use Behat\Behat\Context\Context;
|
4 |
+
use Behat\Gherkin\Node\PyStringNode;
|
5 |
+
use Behat\Gherkin\Node\TableNode;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Defines application features from the specific context.
|
9 |
+
*/
|
10 |
+
class FeatureContext implements Context
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Initializes context.
|
14 |
+
*
|
15 |
+
* Every scenario gets its own context instance.
|
16 |
+
* You can also pass arbitrary arguments to the
|
17 |
+
* context constructor through behat.yml.
|
18 |
+
*/
|
19 |
+
public function __construct()
|
20 |
+
{
|
21 |
+
}
|
22 |
+
}
|
tests/boilerplate-behat-wordpress/features/sample.feature
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Feature: Example Features
|
2 |
+
|
3 |
+
Scenario: Check Varktech Pricing Deals PRO Update
|
4 |
+
Given the screen size is 1440x900
|
5 |
+
And I login as "e2e-test-user-admin" with password "*@LcAaIzy&EknmdgSiN0M6)7"
|
6 |
+
When I am on "/wp-admin/"
|
7 |
+
Then I should not see "pro plugin will **not discount** until updated"
|
8 |
+
|
9 |
+
Scenario: Upate api success in Develop.
|
10 |
+
Given I am on "https://dev.vws.vektor-inc.co.jp/updates/?action=get_metadata&slug=lightning-pro&installed_version=1.6.2&php=7.3.7&locale=ja&lightning-pro-license-key=e4487803e18ccbe3f33e95e405591fc3"
|
11 |
+
Then I should see "https:\/\/dev.vws.vektor-inc.co.jp\/wp-content\/themes\/lightning-pro-child-vws\/updates\/?action=download&slug=lightning-pro"
|
12 |
+
|
13 |
+
Scenario: Upate api fail when license key is wrong in Develop.
|
14 |
+
Given I am on "https://dev.vws.vektor-inc.co.jp/updates/?action=get_metadata&slug=lightning-pro&installed_version=1.6.2&php=7.3.7&locale=ja&lightning-pro-license-key=fe3e095f3dbe0592a52fc5f8321062fx"
|
15 |
+
Then I should not see "https:\/\/dev.vws.vektor-inc.co.jp\/wp-content\/themes\/lightning-pro-child-vws\/updates\/?action=download&slug=lightning-pro"
|
16 |
+
|
17 |
+
Scenario: Upate api success in Production.
|
18 |
+
Given I am on "https://vws.vektor-inc.co.jp/updates/?action=get_metadata&slug=lightning-pro&installed_version=1.6.2&php=7.3.7&locale=ja&lightning-pro-license-key=fe3e095f3dbe0592a52fc5f8321062fa"
|
19 |
+
Then I should see "https:\/\/vws.vektor-inc.co.jp\/wp-content\/themes\/lightning-pro-child-vws\/updates\/?action=download&slug=lightning-pro"
|
20 |
+
|
21 |
+
Scenario: Upate api fail when license key is wrong in Production.
|
22 |
+
Given I am on "https://vws.vektor-inc.co.jp/updates/?action=get_metadata&slug=lightning-pro&installed_version=1.6.2&php=7.3.7&locale=ja&lightning-pro-license-key=fe3e095f3dbe0592a52fc5f8321062fx"
|
23 |
+
Then I should not see "https:\/\/vws.vektor-inc.co.jp\/wp-content\/themes\/lightning-pro-child-vws\/updates\/?action=download&slug=lightning-pro"
|
24 |
+
|
25 |
+
Scenario: Forum post with permission
|
26 |
+
Given the screen size is 1440x900
|
27 |
+
And I login as "e2e-test-user-buy-pro" with password "f40QlA47CcqQo"
|
28 |
+
|
29 |
+
When I am on "/forums/forum/lightning"
|
30 |
+
Then I should see "「Lightning」にトピックを新規作成"
|
31 |
+
|
32 |
+
Scenario: Forum post without permission
|
33 |
+
Given the screen size is 1440x900
|
34 |
+
And I login as "e2e-test-user" with password "f40QlA47CcqQo"
|
35 |
+
|
36 |
+
When I am on "/forums/forum/lightning"
|
37 |
+
Then I should see "トピックを新規作成することはできません。"
|
38 |
+
Then take a screenshot and save it to "_out/1440x900.png"
|
tests/boilerplate-behat-wordpress/package-lock.json
ADDED
@@ -0,0 +1,667 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "wordpress-behat",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"lockfileVersion": 1,
|
5 |
+
"requires": true,
|
6 |
+
"dependencies": {
|
7 |
+
"ansi-regex": {
|
8 |
+
"version": "2.1.1",
|
9 |
+
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
10 |
+
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
|
11 |
+
},
|
12 |
+
"ansi-styles": {
|
13 |
+
"version": "2.2.1",
|
14 |
+
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
15 |
+
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
|
16 |
+
},
|
17 |
+
"asn1": {
|
18 |
+
"version": "0.2.3",
|
19 |
+
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
|
20 |
+
"integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y="
|
21 |
+
},
|
22 |
+
"assert-plus": {
|
23 |
+
"version": "0.2.0",
|
24 |
+
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
|
25 |
+
"integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ="
|
26 |
+
},
|
27 |
+
"asynckit": {
|
28 |
+
"version": "0.4.0",
|
29 |
+
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
30 |
+
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
31 |
+
},
|
32 |
+
"aws-sign2": {
|
33 |
+
"version": "0.6.0",
|
34 |
+
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
|
35 |
+
"integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8="
|
36 |
+
},
|
37 |
+
"aws4": {
|
38 |
+
"version": "1.6.0",
|
39 |
+
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
|
40 |
+
"integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4="
|
41 |
+
},
|
42 |
+
"bcrypt-pbkdf": {
|
43 |
+
"version": "1.0.1",
|
44 |
+
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
|
45 |
+
"integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
|
46 |
+
"optional": true,
|
47 |
+
"requires": {
|
48 |
+
"tweetnacl": "^0.14.3"
|
49 |
+
}
|
50 |
+
},
|
51 |
+
"boom": {
|
52 |
+
"version": "2.10.1",
|
53 |
+
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
|
54 |
+
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
|
55 |
+
"requires": {
|
56 |
+
"hoek": "2.x.x"
|
57 |
+
}
|
58 |
+
},
|
59 |
+
"caseless": {
|
60 |
+
"version": "0.11.0",
|
61 |
+
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
|
62 |
+
"integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c="
|
63 |
+
},
|
64 |
+
"chalk": {
|
65 |
+
"version": "1.1.3",
|
66 |
+
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
67 |
+
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
68 |
+
"requires": {
|
69 |
+
"ansi-styles": "^2.2.1",
|
70 |
+
"escape-string-regexp": "^1.0.2",
|
71 |
+
"has-ansi": "^2.0.0",
|
72 |
+
"strip-ansi": "^3.0.0",
|
73 |
+
"supports-color": "^2.0.0"
|
74 |
+
}
|
75 |
+
},
|
76 |
+
"combined-stream": {
|
77 |
+
"version": "1.0.5",
|
78 |
+
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
|
79 |
+
"integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
|
80 |
+
"requires": {
|
81 |
+
"delayed-stream": "~1.0.0"
|
82 |
+
}
|
83 |
+
},
|
84 |
+
"commander": {
|
85 |
+
"version": "2.11.0",
|
86 |
+
"resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",
|
87 |
+
"integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ=="
|
88 |
+
},
|
89 |
+
"concat-stream": {
|
90 |
+
"version": "1.5.0",
|
91 |
+
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.0.tgz",
|
92 |
+
"integrity": "sha1-U/fUPFHF5D+ByP3QMyHGMb5o1hE=",
|
93 |
+
"requires": {
|
94 |
+
"inherits": "~2.0.1",
|
95 |
+
"readable-stream": "~2.0.0",
|
96 |
+
"typedarray": "~0.0.5"
|
97 |
+
}
|
98 |
+
},
|
99 |
+
"core-util-is": {
|
100 |
+
"version": "1.0.2",
|
101 |
+
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
102 |
+
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
103 |
+
},
|
104 |
+
"cryptiles": {
|
105 |
+
"version": "2.0.5",
|
106 |
+
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
|
107 |
+
"integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
|
108 |
+
"requires": {
|
109 |
+
"boom": "2.x.x"
|
110 |
+
}
|
111 |
+
},
|
112 |
+
"dashdash": {
|
113 |
+
"version": "1.14.1",
|
114 |
+
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
|
115 |
+
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
|
116 |
+
"requires": {
|
117 |
+
"assert-plus": "^1.0.0"
|
118 |
+
},
|
119 |
+
"dependencies": {
|
120 |
+
"assert-plus": {
|
121 |
+
"version": "1.0.0",
|
122 |
+
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
123 |
+
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
|
124 |
+
}
|
125 |
+
}
|
126 |
+
},
|
127 |
+
"debug": {
|
128 |
+
"version": "0.7.4",
|
129 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz",
|
130 |
+
"integrity": "sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk="
|
131 |
+
},
|
132 |
+
"delayed-stream": {
|
133 |
+
"version": "1.0.0",
|
134 |
+
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
135 |
+
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
|
136 |
+
},
|
137 |
+
"ecc-jsbn": {
|
138 |
+
"version": "0.1.1",
|
139 |
+
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
|
140 |
+
"integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
|
141 |
+
"optional": true,
|
142 |
+
"requires": {
|
143 |
+
"jsbn": "~0.1.0"
|
144 |
+
}
|
145 |
+
},
|
146 |
+
"es6-promise": {
|
147 |
+
"version": "4.0.5",
|
148 |
+
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.0.5.tgz",
|
149 |
+
"integrity": "sha1-eILzCt3lskDM+n99eMVIMwlRrkI="
|
150 |
+
},
|
151 |
+
"escape-string-regexp": {
|
152 |
+
"version": "1.0.5",
|
153 |
+
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
154 |
+
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
|
155 |
+
},
|
156 |
+
"extend": {
|
157 |
+
"version": "3.0.1",
|
158 |
+
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
|
159 |
+
"integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ="
|
160 |
+
},
|
161 |
+
"extract-zip": {
|
162 |
+
"version": "1.5.0",
|
163 |
+
"resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.5.0.tgz",
|
164 |
+
"integrity": "sha1-ksz22B73Cp+kwXRxFMzvbYaIpsQ=",
|
165 |
+
"requires": {
|
166 |
+
"concat-stream": "1.5.0",
|
167 |
+
"debug": "0.7.4",
|
168 |
+
"mkdirp": "0.5.0",
|
169 |
+
"yauzl": "2.4.1"
|
170 |
+
}
|
171 |
+
},
|
172 |
+
"extsprintf": {
|
173 |
+
"version": "1.3.0",
|
174 |
+
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
|
175 |
+
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
|
176 |
+
},
|
177 |
+
"fd-slicer": {
|
178 |
+
"version": "1.0.1",
|
179 |
+
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
|
180 |
+
"integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=",
|
181 |
+
"requires": {
|
182 |
+
"pend": "~1.2.0"
|
183 |
+
}
|
184 |
+
},
|
185 |
+
"forever-agent": {
|
186 |
+
"version": "0.6.1",
|
187 |
+
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
|
188 |
+
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
|
189 |
+
},
|
190 |
+
"form-data": {
|
191 |
+
"version": "2.1.4",
|
192 |
+
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
|
193 |
+
"integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
|
194 |
+
"requires": {
|
195 |
+
"asynckit": "^0.4.0",
|
196 |
+
"combined-stream": "^1.0.5",
|
197 |
+
"mime-types": "^2.1.12"
|
198 |
+
}
|
199 |
+
},
|
200 |
+
"fs-extra": {
|
201 |
+
"version": "1.0.0",
|
202 |
+
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz",
|
203 |
+
"integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=",
|
204 |
+
"requires": {
|
205 |
+
"graceful-fs": "^4.1.2",
|
206 |
+
"jsonfile": "^2.1.0",
|
207 |
+
"klaw": "^1.0.0"
|
208 |
+
}
|
209 |
+
},
|
210 |
+
"generate-function": {
|
211 |
+
"version": "2.0.0",
|
212 |
+
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
|
213 |
+
"integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ="
|
214 |
+
},
|
215 |
+
"generate-object-property": {
|
216 |
+
"version": "1.2.0",
|
217 |
+
"resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
|
218 |
+
"integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=",
|
219 |
+
"requires": {
|
220 |
+
"is-property": "^1.0.0"
|
221 |
+
}
|
222 |
+
},
|
223 |
+
"getpass": {
|
224 |
+
"version": "0.1.7",
|
225 |
+
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
|
226 |
+
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
|
227 |
+
"requires": {
|
228 |
+
"assert-plus": "^1.0.0"
|
229 |
+
},
|
230 |
+
"dependencies": {
|
231 |
+
"assert-plus": {
|
232 |
+
"version": "1.0.0",
|
233 |
+
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
234 |
+
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
|
235 |
+
}
|
236 |
+
}
|
237 |
+
},
|
238 |
+
"graceful-fs": {
|
239 |
+
"version": "4.1.11",
|
240 |
+
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
241 |
+
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
|
242 |
+
},
|
243 |
+
"har-validator": {
|
244 |
+
"version": "2.0.6",
|
245 |
+
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
|
246 |
+
"integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=",
|
247 |
+
"requires": {
|
248 |
+
"chalk": "^1.1.1",
|
249 |
+
"commander": "^2.9.0",
|
250 |
+
"is-my-json-valid": "^2.12.4",
|
251 |
+
"pinkie-promise": "^2.0.0"
|
252 |
+
}
|
253 |
+
},
|
254 |
+
"has-ansi": {
|
255 |
+
"version": "2.0.0",
|
256 |
+
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
257 |
+
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
258 |
+
"requires": {
|
259 |
+
"ansi-regex": "^2.0.0"
|
260 |
+
}
|
261 |
+
},
|
262 |
+
"hasha": {
|
263 |
+
"version": "2.2.0",
|
264 |
+
"resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz",
|
265 |
+
"integrity": "sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE=",
|
266 |
+
"requires": {
|
267 |
+
"is-stream": "^1.0.1",
|
268 |
+
"pinkie-promise": "^2.0.0"
|
269 |
+
}
|
270 |
+
},
|
271 |
+
"hawk": {
|
272 |
+
"version": "3.1.3",
|
273 |
+
"resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
|
274 |
+
"integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
|
275 |
+
"requires": {
|
276 |
+
"boom": "2.x.x",
|
277 |
+
"cryptiles": "2.x.x",
|
278 |
+
"hoek": "2.x.x",
|
279 |
+
"sntp": "1.x.x"
|
280 |
+
}
|
281 |
+
},
|
282 |
+
"hoek": {
|
283 |
+
"version": "2.16.3",
|
284 |
+
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
|
285 |
+
"integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0="
|
286 |
+
},
|
287 |
+
"http-signature": {
|
288 |
+
"version": "1.1.1",
|
289 |
+
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
|
290 |
+
"integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
|
291 |
+
"requires": {
|
292 |
+
"assert-plus": "^0.2.0",
|
293 |
+
"jsprim": "^1.2.2",
|
294 |
+
"sshpk": "^1.7.0"
|
295 |
+
}
|
296 |
+
},
|
297 |
+
"inherits": {
|
298 |
+
"version": "2.0.3",
|
299 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
300 |
+
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
301 |
+
},
|
302 |
+
"is-my-json-valid": {
|
303 |
+
"version": "2.16.0",
|
304 |
+
"resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz",
|
305 |
+
"integrity": "sha1-8Hndm/2uZe4gOKrorLyGqxCeNpM=",
|
306 |
+
"requires": {
|
307 |
+
"generate-function": "^2.0.0",
|
308 |
+
"generate-object-property": "^1.1.0",
|
309 |
+
"jsonpointer": "^4.0.0",
|
310 |
+
"xtend": "^4.0.0"
|
311 |
+
}
|
312 |
+
},
|
313 |
+
"is-property": {
|
314 |
+
"version": "1.0.2",
|
315 |
+
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
|
316 |
+
"integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ="
|
317 |
+
},
|
318 |
+
"is-stream": {
|
319 |
+
"version": "1.1.0",
|
320 |
+
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
321 |
+
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
|
322 |
+
},
|
323 |
+
"is-typedarray": {
|
324 |
+
"version": "1.0.0",
|
325 |
+
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
|
326 |
+
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
|
327 |
+
},
|
328 |
+
"isarray": {
|
329 |
+
"version": "1.0.0",
|
330 |
+
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
331 |
+
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
332 |
+
},
|
333 |
+
"isexe": {
|
334 |
+
"version": "2.0.0",
|
335 |
+
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
336 |
+
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
337 |
+
},
|
338 |
+
"isstream": {
|
339 |
+
"version": "0.1.2",
|
340 |
+
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
341 |
+
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
342 |
+
},
|
343 |
+
"jsbn": {
|
344 |
+
"version": "0.1.1",
|
345 |
+
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
|
346 |
+
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
|
347 |
+
"optional": true
|
348 |
+
},
|
349 |
+
"json-schema": {
|
350 |
+
"version": "0.2.3",
|
351 |
+
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
|
352 |
+
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
|
353 |
+
},
|
354 |
+
"json-stringify-safe": {
|
355 |
+
"version": "5.0.1",
|
356 |
+
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
|
357 |
+
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
|
358 |
+
},
|
359 |
+
"jsonfile": {
|
360 |
+
"version": "2.4.0",
|
361 |
+
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
|
362 |
+
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
|
363 |
+
"requires": {
|
364 |
+
"graceful-fs": "^4.1.6"
|
365 |
+
}
|
366 |
+
},
|
367 |
+
"jsonpointer": {
|
368 |
+
"version": "4.0.1",
|
369 |
+
"resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
|
370 |
+
"integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk="
|
371 |
+
},
|
372 |
+
"jsprim": {
|
373 |
+
"version": "1.4.1",
|
374 |
+
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
|
375 |
+
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
|
376 |
+
"requires": {
|
377 |
+
"assert-plus": "1.0.0",
|
378 |
+
"extsprintf": "1.3.0",
|
379 |
+
"json-schema": "0.2.3",
|
380 |
+
"verror": "1.10.0"
|
381 |
+
},
|
382 |
+
"dependencies": {
|
383 |
+
"assert-plus": {
|
384 |
+
"version": "1.0.0",
|
385 |
+
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
386 |
+
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
|
387 |
+
}
|
388 |
+
}
|
389 |
+
},
|
390 |
+
"kew": {
|
391 |
+
"version": "0.7.0",
|
392 |
+
"resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz",
|
393 |
+
"integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s="
|
394 |
+
},
|
395 |
+
"klaw": {
|
396 |
+
"version": "1.3.1",
|
397 |
+
"resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
|
398 |
+
"integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
|
399 |
+
"requires": {
|
400 |
+
"graceful-fs": "^4.1.9"
|
401 |
+
}
|
402 |
+
},
|
403 |
+
"mime-db": {
|
404 |
+
"version": "1.29.0",
|
405 |
+
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz",
|
406 |
+
"integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg="
|
407 |
+
},
|
408 |
+
"mime-types": {
|
409 |
+
"version": "2.1.16",
|
410 |
+
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz",
|
411 |
+
"integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=",
|
412 |
+
"requires": {
|
413 |
+
"mime-db": "~1.29.0"
|
414 |
+
}
|
415 |
+
},
|
416 |
+
"minimist": {
|
417 |
+
"version": "0.0.8",
|
418 |
+
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
419 |
+
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
420 |
+
},
|
421 |
+
"mkdirp": {
|
422 |
+
"version": "0.5.0",
|
423 |
+
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
|
424 |
+
"integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=",
|
425 |
+
"requires": {
|
426 |
+
"minimist": "0.0.8"
|
427 |
+
}
|
428 |
+
},
|
429 |
+
"oauth-sign": {
|
430 |
+
"version": "0.8.2",
|
431 |
+
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
|
432 |
+
"integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
|
433 |
+
},
|
434 |
+
"pend": {
|
435 |
+
"version": "1.2.0",
|
436 |
+
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
437 |
+
"integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
|
438 |
+
},
|
439 |
+
"phantomjs-prebuilt": {
|
440 |
+
"version": "2.1.14",
|
441 |
+
"resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.14.tgz",
|
442 |
+
"integrity": "sha1-1T0xH8+30dCN2yQBRVjxGIxRbaA=",
|
443 |
+
"requires": {
|
444 |
+
"es6-promise": "~4.0.3",
|
445 |
+
"extract-zip": "~1.5.0",
|
446 |
+
"fs-extra": "~1.0.0",
|
447 |
+
"hasha": "~2.2.0",
|
448 |
+
"kew": "~0.7.0",
|
449 |
+
"progress": "~1.1.8",
|
450 |
+
"request": "~2.79.0",
|
451 |
+
"request-progress": "~2.0.1",
|
452 |
+
"which": "~1.2.10"
|
453 |
+
}
|
454 |
+
},
|
455 |
+
"pinkie": {
|
456 |
+
"version": "2.0.4",
|
457 |
+
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
|
458 |
+
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
|
459 |
+
},
|
460 |
+
"pinkie-promise": {
|
461 |
+
"version": "2.0.1",
|
462 |
+
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
|
463 |
+
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
|
464 |
+
"requires": {
|
465 |
+
"pinkie": "^2.0.0"
|
466 |
+
}
|
467 |
+
},
|
468 |
+
"process-nextick-args": {
|
469 |
+
"version": "1.0.7",
|
470 |
+
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
|
471 |
+
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
|
472 |
+
},
|
473 |
+
"progress": {
|
474 |
+
"version": "1.1.8",
|
475 |
+
"resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
|
476 |
+
"integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74="
|
477 |
+
},
|
478 |
+
"punycode": {
|
479 |
+
"version": "1.4.1",
|
480 |
+
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
|
481 |
+
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
|
482 |
+
},
|
483 |
+
"qs": {
|
484 |
+
"version": "6.3.2",
|
485 |
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz",
|
486 |
+
"integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw="
|
487 |
+
},
|
488 |
+
"readable-stream": {
|
489 |
+
"version": "2.0.6",
|
490 |
+
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
|
491 |
+
"integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
|
492 |
+
"requires": {
|
493 |
+
"core-util-is": "~1.0.0",
|
494 |
+
"inherits": "~2.0.1",
|
495 |
+
"isarray": "~1.0.0",
|
496 |
+
"process-nextick-args": "~1.0.6",
|
497 |
+
"string_decoder": "~0.10.x",
|
498 |
+
"util-deprecate": "~1.0.1"
|
499 |
+
}
|
500 |
+
},
|
501 |
+
"request": {
|
502 |
+
"version": "2.79.0",
|
503 |
+
"resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz",
|
504 |
+
"integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=",
|
505 |
+
"requires": {
|
506 |
+
"aws-sign2": "~0.6.0",
|
507 |
+
"aws4": "^1.2.1",
|
508 |
+
"caseless": "~0.11.0",
|
509 |
+
"combined-stream": "~1.0.5",
|
510 |
+
"extend": "~3.0.0",
|
511 |
+
"forever-agent": "~0.6.1",
|
512 |
+
"form-data": "~2.1.1",
|
513 |
+
"har-validator": "~2.0.6",
|
514 |
+
"hawk": "~3.1.3",
|
515 |
+
"http-signature": "~1.1.0",
|
516 |
+
"is-typedarray": "~1.0.0",
|
517 |
+
"isstream": "~0.1.2",
|
518 |
+
"json-stringify-safe": "~5.0.1",
|
519 |
+
"mime-types": "~2.1.7",
|
520 |
+
"oauth-sign": "~0.8.1",
|
521 |
+
"qs": "~6.3.0",
|
522 |
+
"stringstream": "~0.0.4",
|
523 |
+
"tough-cookie": "~2.3.0",
|
524 |
+
"tunnel-agent": "~0.4.1",
|
525 |
+
"uuid": "^3.0.0"
|
526 |
+
}
|
527 |
+
},
|
528 |
+
"request-progress": {
|
529 |
+
"version": "2.0.1",
|
530 |
+
"resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz",
|
531 |
+
"integrity": "sha1-XTa7V5YcZzqlt4jbyBQf3yO0Tgg=",
|
532 |
+
"requires": {
|
533 |
+
"throttleit": "^1.0.0"
|
534 |
+
}
|
535 |
+
},
|
536 |
+
"sntp": {
|
537 |
+
"version": "1.0.9",
|
538 |
+
"resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
|
539 |
+
"integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
|
540 |
+
"requires": {
|
541 |
+
"hoek": "2.x.x"
|
542 |
+
}
|
543 |
+
},
|
544 |
+
"sshpk": {
|
545 |
+
"version": "1.13.1",
|
546 |
+
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz",
|
547 |
+
"integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=",
|
548 |
+
"requires": {
|
549 |
+
"asn1": "~0.2.3",
|
550 |
+
"assert-plus": "^1.0.0",
|
551 |
+
"bcrypt-pbkdf": "^1.0.0",
|
552 |
+
"dashdash": "^1.12.0",
|
553 |
+
"ecc-jsbn": "~0.1.1",
|
554 |
+
"getpass": "^0.1.1",
|
555 |
+
"jsbn": "~0.1.0",
|
556 |
+
"tweetnacl": "~0.14.0"
|
557 |
+
},
|
558 |
+
"dependencies": {
|
559 |
+
"assert-plus": {
|
560 |
+
"version": "1.0.0",
|
561 |
+
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
562 |
+
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
|
563 |
+
}
|
564 |
+
}
|
565 |
+
},
|
566 |
+
"string_decoder": {
|
567 |
+
"version": "0.10.31",
|
568 |
+
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
569 |
+
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
|
570 |
+
},
|
571 |
+
"stringstream": {
|
572 |
+
"version": "0.0.5",
|
573 |
+
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
|
574 |
+
"integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg="
|
575 |
+
},
|
576 |
+
"strip-ansi": {
|
577 |
+
"version": "3.0.1",
|
578 |
+
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
579 |
+
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
580 |
+
"requires": {
|
581 |
+
"ansi-regex": "^2.0.0"
|
582 |
+
}
|
583 |
+
},
|
584 |
+
"supports-color": {
|
585 |
+
"version": "2.0.0",
|
586 |
+
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
587 |
+
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
|
588 |
+
},
|
589 |
+
"throttleit": {
|
590 |
+
"version": "1.0.0",
|
591 |
+
"resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz",
|
592 |
+
"integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw="
|
593 |
+
},
|
594 |
+
"tough-cookie": {
|
595 |
+
"version": "2.3.2",
|
596 |
+
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",
|
597 |
+
"integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=",
|
598 |
+
"requires": {
|
599 |
+
"punycode": "^1.4.1"
|
600 |
+
}
|
601 |
+
},
|
602 |
+
"tunnel-agent": {
|
603 |
+
"version": "0.4.3",
|
604 |
+
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
|
605 |
+
"integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us="
|
606 |
+
},
|
607 |
+
"tweetnacl": {
|
608 |
+
"version": "0.14.5",
|
609 |
+
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
|
610 |
+
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
|
611 |
+
"optional": true
|
612 |
+
},
|
613 |
+
"typedarray": {
|
614 |
+
"version": "0.0.6",
|
615 |
+
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
616 |
+
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
617 |
+
},
|
618 |
+
"util-deprecate": {
|
619 |
+
"version": "1.0.2",
|
620 |
+
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
621 |
+
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
622 |
+
},
|
623 |
+
"uuid": {
|
624 |
+
"version": "3.1.0",
|
625 |
+
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
|
626 |
+
"integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g=="
|
627 |
+
},
|
628 |
+
"verror": {
|
629 |
+
"version": "1.10.0",
|
630 |
+
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
631 |
+
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
|
632 |
+
"requires": {
|
633 |
+
"assert-plus": "^1.0.0",
|
634 |
+
"core-util-is": "1.0.2",
|
635 |
+
"extsprintf": "^1.2.0"
|
636 |
+
},
|
637 |
+
"dependencies": {
|
638 |
+
"assert-plus": {
|
639 |
+
"version": "1.0.0",
|
640 |
+
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
641 |
+
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
|
642 |
+
}
|
643 |
+
}
|
644 |
+
},
|
645 |
+
"which": {
|
646 |
+
"version": "1.2.14",
|
647 |
+
"resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz",
|
648 |
+
"integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=",
|
649 |
+
"requires": {
|
650 |
+
"isexe": "^2.0.0"
|
651 |
+
}
|
652 |
+
},
|
653 |
+
"xtend": {
|
654 |
+
"version": "4.0.1",
|
655 |
+
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
656 |
+
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
|
657 |
+
},
|
658 |
+
"yauzl": {
|
659 |
+
"version": "2.4.1",
|
660 |
+
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
|
661 |
+
"integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=",
|
662 |
+
"requires": {
|
663 |
+
"fd-slicer": "~1.0.1"
|
664 |
+
}
|
665 |
+
}
|
666 |
+
}
|
667 |
+
}
|
tests/boilerplate-behat-wordpress/package.json
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "wordpress-behat",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"description": "",
|
5 |
+
"main": "index.js",
|
6 |
+
"bin": {
|
7 |
+
"wordpress-behat": "run-tests.js"
|
8 |
+
},
|
9 |
+
"dependencies": {
|
10 |
+
"phantomjs-prebuilt": "^2.1.14"
|
11 |
+
},
|
12 |
+
"devDependencies": {},
|
13 |
+
"scripts": {
|
14 |
+
"test": "/usr/bin/env node bin/run-tests.js"
|
15 |
+
},
|
16 |
+
"author": "",
|
17 |
+
"license": "MIT"
|
18 |
+
}
|
tests/bootstrap.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Require composer dependencies.
|
3 |
+
require_once dirname( dirname( __FILE__ ) ) . '/vendor/autoload.php';
|
4 |
+
|
5 |
+
// If we're running in WP's build directory, ensure that WP knows that, too.
|
6 |
+
if ( 'build' === getenv( 'LOCAL_DIR' ) ) {
|
7 |
+
define( 'WP_RUN_CORE_TESTS', true );
|
8 |
+
}
|
9 |
+
|
10 |
+
// Determine the tests directory (from a WP dev checkout).
|
11 |
+
// Try the WP_TESTS_DIR environment variable first.
|
12 |
+
$_tests_dir = getenv( 'WP_TESTS_DIR' );
|
13 |
+
|
14 |
+
// Next, try the WP_PHPUNIT composer package.
|
15 |
+
if ( ! $_tests_dir ) {
|
16 |
+
$_tests_dir = getenv( 'WP_PHPUNIT__DIR' );
|
17 |
+
}
|
18 |
+
|
19 |
+
// See if we're installed inside an existing WP dev instance.
|
20 |
+
if ( ! $_tests_dir ) {
|
21 |
+
$_try_tests_dir = dirname( __FILE__ ) . '/../../../../../tests/phpunit';
|
22 |
+
if ( file_exists( $_try_tests_dir . '/includes/functions.php' ) ) {
|
23 |
+
$_tests_dir = $_try_tests_dir;
|
24 |
+
}
|
25 |
+
}
|
26 |
+
// Fallback.
|
27 |
+
if ( ! $_tests_dir ) {
|
28 |
+
$_tests_dir = '/tmp/wordpress-tests-lib';
|
29 |
+
}
|
30 |
+
|
31 |
+
// Give access to tests_add_filter() function.
|
32 |
+
require_once $_tests_dir . '/includes/functions.php';
|
33 |
+
|
34 |
+
// Do not try to load JavaScript files from an external URL - this takes a
|
35 |
+
// while.
|
36 |
+
define( 'GUTENBERG_LOAD_VENDOR_SCRIPTS', false );
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Manually load the plugin being tested.
|
40 |
+
*/
|
41 |
+
function _manually_load_plugin() {
|
42 |
+
register_theme_directory( dirname( __FILE__ ) . '/../../' );
|
43 |
+
// switch_theme('lightning'); search_theme_directories();
|
44 |
+
// require dirname( dirname( dirname( __FILE__ ) ) ) . '/woocommerce/woocommerce.php';
|
45 |
+
// require dirname( dirname( dirname( __FILE__ ) ) ) . '/woocommerce-points-and-rewards/woocommerce-points-and-rewards.php';
|
46 |
+
require dirname( dirname( __FILE__ ) ) . '/vk-block-patterns.php';
|
47 |
+
}
|
48 |
+
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Adds a wp_die handler for use during tests.
|
52 |
+
*
|
53 |
+
* If bootstrap.php triggers wp_die, it will not cause the script to fail. This
|
54 |
+
* means that tests will look like they passed even though they should have
|
55 |
+
* failed. So we throw an exception if WordPress dies during test setup. This
|
56 |
+
* way the failure is observable.
|
57 |
+
*
|
58 |
+
* @param string|WP_Error $message The error message.
|
59 |
+
*
|
60 |
+
* @throws Exception When a `wp_die()` occurs.
|
61 |
+
*/
|
62 |
+
function fail_if_died( $message ) {
|
63 |
+
if ( is_wp_error( $message ) ) {
|
64 |
+
$message = $message->get_error_message();
|
65 |
+
}
|
66 |
+
|
67 |
+
throw new Exception( 'WordPress died: ' . $message );
|
68 |
+
}
|
69 |
+
tests_add_filter( 'wp_die_handler', 'fail_if_died' );
|
70 |
+
|
71 |
+
$GLOBALS['wp_tests_options'] = array(
|
72 |
+
'gutenberg-experiments' => array(
|
73 |
+
'gutenberg-widget-experiments' => '1',
|
74 |
+
),
|
75 |
+
);
|
76 |
+
|
77 |
+
// Start up the WP testing environment.
|
78 |
+
require $_tests_dir . '/includes/bootstrap.php';
|
79 |
+
|
80 |
+
// Use existing behavior for wp_die during actual test execution.
|
81 |
+
remove_filter( 'wp_die_handler', 'fail_if_died' );
|
tests/test-get-options.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class GetOptionsTest
|
4 |
+
*
|
5 |
+
* @package vk-block-patterns
|
6 |
+
*/
|
7 |
+
|
8 |
+
class GetOptionsTest extends WP_UnitTestCase {
|
9 |
+
|
10 |
+
public function test_vbp_get_options() {
|
11 |
+
$test_data = array(
|
12 |
+
array(
|
13 |
+
'option' => null,
|
14 |
+
'correct' => array(
|
15 |
+
'role' => 'author',
|
16 |
+
),
|
17 |
+
),
|
18 |
+
array(
|
19 |
+
'option' => array(
|
20 |
+
'role' => 'editor',
|
21 |
+
),
|
22 |
+
'correct' => array(
|
23 |
+
'role' => 'editor',
|
24 |
+
),
|
25 |
+
),
|
26 |
+
);
|
27 |
+
print PHP_EOL;
|
28 |
+
print '------------------------------------' . PHP_EOL;
|
29 |
+
print 'vbp_get_options()' . PHP_EOL;
|
30 |
+
print '------------------------------------' . PHP_EOL;
|
31 |
+
foreach ( $test_data as $test_value ) {
|
32 |
+
|
33 |
+
if ( empty( $test_value['option'] ) ){
|
34 |
+
delete_option( 'vk_block_patterns_options' );
|
35 |
+
} else {
|
36 |
+
update_option( 'vk_block_patterns_options', $test_value['option'] );
|
37 |
+
}
|
38 |
+
|
39 |
+
$return = vbp_get_options();
|
40 |
+
$correct = $test_value['correct'];
|
41 |
+
|
42 |
+
print 'return :' . $return['role'] . PHP_EOL;
|
43 |
+
print 'correct :' . $correct['role'] . PHP_EOL;
|
44 |
+
$this->assertEquals( $correct['role'], $return['role'] );
|
45 |
+
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
tests/test-sample.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class SampleTest
|
4 |
+
*
|
5 |
+
* @package Lightning_Pro_Child_Vws
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Sample test case.
|
10 |
+
*/
|
11 |
+
class SampleTest extends WP_UnitTestCase {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* A single example test.
|
15 |
+
*/
|
16 |
+
public function test_sample() {
|
17 |
+
// Replace this with some actual testing code.
|
18 |
+
$this->assertTrue( true );
|
19 |
+
}
|
20 |
+
}
|
vk-block-patterns.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: VK Block Patterns
|
4 |
* Plugin URI: https://github.com/vektor-inc/vk-block-patterns
|
5 |
* Description: You can make and register your original custom block patterns.
|
6 |
-
* Version: 1.2.
|
7 |
* Author: Vektor,Inc.
|
8 |
* Author URI: https://vektor-inc.co.jp
|
9 |
* Text Domain: vk-block-patterns
|
@@ -57,3 +57,11 @@ function vbp_set_plugin_meta( $links ) {
|
|
57 |
}
|
58 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'vbp_set_plugin_meta', 10, 1 );
|
59 |
require dirname( __FILE__ ) . '/patterns-data/class-register-patterns-from-json.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
* Plugin Name: VK Block Patterns
|
4 |
* Plugin URI: https://github.com/vektor-inc/vk-block-patterns
|
5 |
* Description: You can make and register your original custom block patterns.
|
6 |
+
* Version: 1.2.2
|
7 |
* Author: Vektor,Inc.
|
8 |
* Author URI: https://vektor-inc.co.jp
|
9 |
* Text Domain: vk-block-patterns
|
57 |
}
|
58 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'vbp_set_plugin_meta', 10, 1 );
|
59 |
require dirname( __FILE__ ) . '/patterns-data/class-register-patterns-from-json.php';
|
60 |
+
|
61 |
+
function vbp_get_options() {
|
62 |
+
$default = array(
|
63 |
+
'role' => 'author',
|
64 |
+
);
|
65 |
+
$options = get_option( 'vk_block_patterns_options', $default );
|
66 |
+
return $options;
|
67 |
+
}
|