Commit Graph

10 Commits

Author SHA1 Message Date
Albert Juhé Lluveras b29f5d4e86 Fix WP_CONTENT_DIR path in PHP unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/2935) 2020-07-30 10:41:13 +02:00
Mike Jolley a640a230ca Assets/Block settings: Only lookup page if ID > 0 (https://github.com/woocommerce/woocommerce-blocks/pull/2369)
* Only lookup page if ID > 0

* Check for valid post

* Maybe fix test path
2020-05-01 11:02:20 +01:00
Mike Jolley a58420a60e Table creation validation for install routine (https://github.com/woocommerce/woocommerce-blocks/pull/2287)
* Bump package version for testing

* New install routine and db version

* Revert "Bump package version for testing"

This reverts commit c3fee55a34e75429b731cd7a2cc07e841010df6d.

* Update bootstrap to ensure blocks is installed properly before tests are ran

* Restore errors after install

* Use enabled method instead of comparing db version

* Moved installer code to admin_init

* Tweak test bootstrap
2020-04-28 16:36:37 +01:00
Mike Jolley 60d05aed19 Product search block e2e test (https://github.com/woocommerce/woocommerce-blocks/pull/1712)
* add docker files

* get tests to work

* remove irrelevant files

* add woocommerce as a dep

* remove eslintignore for tests

* undo travis chages till another PR

* remove local utils and call them directly from woocommerce

* remove travis db

* Block snapshot

* Test than the block can be inserted and interacted with

* Add snapshop

* Update snapshot

* rebase on master

* add a build script for just doing npm build on e2e tests

* just run build for e2e test job

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2020-02-11 12:23:23 -05:00
Darren Ethier a7cd7d6b22 Fix wp-cli container permissions issues for e2e docker test environment (https://github.com/woocommerce/woocommerce-blocks/pull/1716)
* add docker files

* get tests to work

* remove irrelevant files

* change userAgent to chrome

* add woocommerce as a dep

* add jest to eslint

* remove eslintignore for tests

* undo travis chages till another PR

* remove local utils and call them directly from woocommerce

* update deps

* add setup files to run tests

* export default wp link

* wait for select before selecting

* remove travis db

* ignore e2e tests in unit testing

* add tests

* add docker commands

* always run composer

* Make it possible to import directly from '@woocommerce/e2e-tests/utils'

* remove installing woocommerce via composer.

* add more docker npm scripts

* add custom docker config for wp-cli

* add changes to docker-composer.yml

Includes reading environment variables from `.env`

* revert customizations to .travis.yml

* move main docker file for the wordpress container to bin

* fix travis config

* rename wp install for travis builds back to original name

* use a version of docker-compose that travis supports

* add minor change to try and force travis test run

* fix incorrect command

* copy composer lock from master

* only run phpcs on /src directory

* give time for host to spin up for e2e tests

* increase sleep for waiting on container

* make sure plugin is built before running tests

* sigh fix improper command usage

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
2020-02-11 11:13:20 -05:00
Darren Ethier e5bf616dca Add bundlesize package and tweak travis config (https://github.com/woocommerce/woocommerce-blocks/pull/822)
- adds bundlesize package and travis config to run it on pulls (reports size as a check on pulls)
- reconfigure travis configuration so that jobs are split by task for easier review/reporting
- Fix failing phpunit tests exposed as a result of the travis reconfiguration
- Fix legit fail exposed by failing phpunit test in products REST endpoint (permissions related)
- Don't abort plugin initialization when detecting no build asset file but still throw notice (necessary to ensure php tests run in travis because we don't build js/css assets unnecessarily for those tests)
2019-08-09 14:08:31 -04:00
Mike Jolley 3678beab97 Move main controllers from assets/php to src (https://github.com/woocommerce/woocommerce-blocks/pull/655)
* Create Package class and use in main plugin file

* Move and refactor library class - split asset methods into new Assets class.

* Add jetpack autoloader dependency

* fix tests

* Update from master

* Update testing framework

* Update package name

* Classname changes from master

* Indent
2019-07-01 13:52:44 +01:00
Kelly Dwan daa106ebbe Remove Gutenberg requirement from phpunit tests (https://github.com/woocommerce/woocommerce-blocks/pull/414)
* Remove Gutenberg requirement from phpunit tests

* Remove gutenberg from the install script
2019-02-08 14:23:31 -05:00
Kelly Dwan c6d071cebf Fix PHP CodeSniffer issues (https://github.com/woocommerce/woocommerce-blocks/pull/215) 2018-12-11 11:14:02 -06:00
Kelly Dwan 6a50ebde8b Adds continuous integration testing with travis (https://github.com/woocommerce/woocommerce-blocks/pull/156)
* Add travis to run JS & CSS linting, JS tests, and PHPUnit tests

* Move API initiation out of the gutenberg/files check

So that php tests run without having to build the JS files

* Add very basic product endpoint tests

* Fix stylelint issues in CSS

* Remove e2e setup, replace with dependency setup

* Add missing install step

* Remove cache for now

* Add specific `har-validator` dependency because v 5.1.2 has disappeared

* Only run npm install for the JS test job

* Check for installed plugins

* Update install location

* Fix typo in plugin name

* Check the BRANCH variable, rather than TRAVIS_PULL_REQUEST_BRANCH, which is only set on PR runs

* Remove debug command

* A change to trigger CI

* Set the expected node & npm versions

* Remove copy-pasted command, does not apply
2018-11-27 12:12:48 -05:00