Skip to content

Commit 95347cd

Browse files
Merge pull request #631 from Codeinwp/development
[Feat] Support for authentication for JSON import [Feat] New chart type: Bubble [Feat] Combine one-time import and schedule import into a single control for an online .csv file import [Feat] Add support for annotations and other roles [Feat] For every chart show the last updated date and any error that exists [Feat] Tested up to WP 5.3 [Fix] When new data is imported using csv/url, the manual editor still show old data [Fix] Having SCRIPT_DEBUG on causes issues in real time update of charts [Fix] Table chart: Error appears when trying to import from JSON [Fix] PHP Fatal error: Uncaught Error: Cannot unset string offsets [Fix] Long responsive table can overflow on smaller screens
2 parents 921e5be + db9cc83 commit 95347cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+5629
-1295
lines changed

.distignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@ composer.lock
2020
package-lock.json
2121
key.enc
2222
vendor/phpoffice/phpexcel/Examples
23-
vendor/phpoffice/phpexcel/unitTests
23+
vendor/phpoffice/phpexcel/unitTests
24+
cypress
25+
docker-compose.travis.yml
26+
cypress.env.json.template
27+
cypress.json

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ vendor
77
composer.lock
88
bin/
99
package-lock.json
10+
cypress/integration/examples
11+
cypress/integration/localhost*
12+
cypress/plugins
13+
cypress.env.json

.travis.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
language: php
22
sudo: false
33
dist: trusty
4+
services:
5+
- docker
46
matrix:
57
fast_finish: true
68
include:
9+
- php: 7.3
710
- php: 7.2
811
- php: 7.1
912
- php: 7.0
@@ -14,6 +17,14 @@ matrix:
1417
before_script: chmod +x bin/wraith.sh
1518
env: TEST_SUITE=Wraith_Visual_Regression_Testing WRAITH_FAIL=5
1619
script: "./bin/wraith.sh"
20+
- name: Cypress
21+
if: type IN (pull_request)
22+
language: node_js
23+
node_js:
24+
- 10.8
25+
script:
26+
- docker-compose -f docker-compose.travis.yml up -d
27+
- chmod +x ./bin/run-e2e-tests.sh ./bin/wp-init.sh && ./bin/wp-init.sh && ./bin/run-e2e-tests.sh
1728
allow_failures:
1829
- env: TEST_SUITE=Wraith_Visual_Regression_Testing WRAITH_FAIL=5
1930
branches:
@@ -72,4 +83,4 @@ after_deploy:
7283
- ". ./bin/deploy.sh"
7384
after_failure:
7485
- cat "logs/phpcs.log"
75-
- cat "logs/jslogs.log"
86+
- cat "logs/jslogs.log"

Gruntfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = function (grunt) {
77
var loader = require( 'load-project-config' ),
88
config = require( 'grunt-plugin-fleet' );
99
config = config();
10+
config.files.js.push( '!cypress/**/*.js' );
1011
// jshint ignore: start
1112
config.taskMap['faq_builder'] = 'grunt-helpscout-faq';
1213
// jshint ignore: end

bin/kill-and-create-all.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# to be executed from the plugin main directory (visualizer-pro)
2+
docker kill $(docker ps -q)
3+
docker system prune -a
4+
5+
windows=`echo $OSTYPE | grep -i -e "win" -e "msys" -e "cygw" | wc -l`
6+
if [[ $windows -gt 0 ]]; then
7+
docker-machine start default
8+
fi
9+
10+
docker-compose -f docker-compose.travis.yml up -d
11+
./bin/wp-init.sh
12+
./bin/run-e2e-tests.sh

bin/mysql/init-db.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
grant all privileges on *.* to 'wordpress'@'%' identified by 'wordpress';

bin/run-e2e-tests.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
if [[ "$TRAVIS" == "true" ]]; then
4+
npm install --only=dev --prefix ./cypress/
5+
composer install --no-dev
6+
fi
7+
8+
wp_host='localhost'
9+
windows=`echo $OSTYPE | grep -i -e "win" -e "msys" -e "cygw" | wc -l`
10+
args='-it';
11+
if [[ $windows -gt 0 ]]; then
12+
wp_host=`docker-machine ip`
13+
args=''
14+
fi
15+
16+
# exit on error
17+
set -e
18+
19+
export CYPRESS_HOST=$wp_host
20+
21+
# test free - lifecycle
22+
export CYPRESS_SPEC_TO_RUN="free-lifecycle.js"
23+
npm run cypress:run
24+
25+
# test free - sources
26+
export CYPRESS_SPEC_TO_RUN="free-sources.js"
27+
npm run cypress:run

bin/wp-init.sh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/usr/bin/env bash
2+
3+
# if on windows, find out the IP using `docker-machine ip` and provide the IP as the host.
4+
wp_host='localhost'
5+
windows=`echo $OSTYPE | grep -i -e "win" -e "msys" -e "cygw" | wc -l`
6+
args='-it';
7+
if [[ $windows -gt 0 ]]; then
8+
wp_host=`docker-machine ip`
9+
args=''
10+
fi
11+
12+
# sleep for sometime till WP initializes successfully
13+
sleep_time=15
14+
if [[ $windows -gt 0 ]]; then
15+
sleep_time=30
16+
fi
17+
echo "Sleeping for $sleep_time..."
18+
sleep $sleep_time
19+
20+
# install WP
21+
docker exec $args visualizer_wordpress wp --quiet core install --url="http://$wp_host:8888/" --admin_user="wordpress" --admin_password="wordpress" --admin_email="[email protected]" --title="test" --skip-email
22+
23+
# install required external plugins
24+
docker exec $args visualizer_wordpress chown -R www-data:www-data /var/www/html/
25+
docker exec $args visualizer_wordpress wp plugin install classic-editor --activate
26+
27+
# so that debug.log is created
28+
docker exec $args visualizer_wordpress chmod 0777 -R /var/www/html/wp-content
29+
30+
# install visualizer free
31+
docker exec $args visualizer_wordpress git clone https://github.com/Codeinwp/visualizer /var/www/html/wp-content/plugins/visualizer
32+
33+
# activate
34+
docker exec $args visualizer_wordpress wp --quiet plugin activate visualizer
35+
36+
# set this constant so that the license is not checked
37+
docker exec $args visualizer_wordpress wp --quiet config set TI_UNIT_TESTING true --raw
38+
39+
# set this constant so that the specific hooks are loaded
40+
docker exec $args visualizer_wordpress wp --quiet config set TI_CYPRESS_TESTING true --raw
41+
42+
# debugging
43+
docker exec $args visualizer_wordpress wp --quiet config set WP_DEBUG true --raw
44+
docker exec $args visualizer_wordpress wp --quiet config set WP_DEBUG_LOG true --raw
45+
docker exec $args visualizer_wordpress wp --quiet config set WP_DEBUG_DISPLAY false --raw
46+

classes/Visualizer/Gutenberg/.eslintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
],
1717
"rules": {
1818
"indent": [
19-
"error",
19+
"warn",
2020
"tab"
2121
],
2222
"linebreak-style": [
23-
"error",
23+
"warn",
2424
"unix"
2525
],
2626
"quotes": [

0 commit comments

Comments
 (0)