* Tidy up bootstap so it uses autoloaders and works with the known plugin paths
* eslint ignore woocommerce bin
* Use WC from bin in wp-env
* Git ignore woocommerce in bin
* Remove reliance on core framework across phpunit tests
* Simplify bootstrap - since test framework is no longer required, there is no need to pull in woo from github
* Remove unused configs
* Update CI
* Implement PHPunit Polyfill
* Abstract the test case
* Update lock
* remove chown
* experiment: try sudo
* move phpversion to first run
* Remove 7.0 tests :(
* test plugin override for 5.5 test
* Use dev version
* Fix formatting
Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
* update README files with version requirements
* update phpcs config
* update default environment for tests locally
* update workflows to only test against versions matching new policy
* update plugin header for new version policy
* restore older WP version support in E2E tests and PHPCS
I realized that we might still want to test against L2 WP versions in our E2E tests until those tests can be moved to WC core. While the feature plugin is L0, we still need to support L2 for existing features that are already surfaced in the WooCommerce plugin package.
Also with PHPCS if there are fixes to older things in the codebase, we will need to preserve the usage of L2 friendly (back-compat) code.
* add detection of Woo Core version to bootstrap
* update version used in phpunit tests
* add links to version policy update post
* restore 5.5.1 for Woo Core version
Getting errors with 5.5.2 - not sure what's going on but might be the tag isn't available as expected for 5.5.2 maybe?
* switch to hardcoded version header reference
PHPUNIT was tripping on this for some reason.
* remove older WP version e2e test workflows
* fix phpunit tests for new woo test suite
Woo Core now uses a container and has some mocks that are used in some legacy test helpers.
* remove explicit set WOO_VERSION for phpunit tests.
This should default to latest for the GH workflow runs.
* Update release PR template.
Add some explicit instructions around updating required WP and WC versions at time of release.
* use latest WOO_VERSION in .env
* some improvements to reduce the things needing updated
* remove extraneous code
* Add some more checklist items to release PR templates
* remove unnecessary conditional
* remove is-dismissible css classes
* Improve clarity of error messaging
* Update README.md
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* remove checklist items about versions for patch releases
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
* use consistent product name `WooCommerce Blocks:
- readme.md title
+ update product vision paragraph
- update references in readme.txt preamble
- update in tests bootstrap message
* add WCCOM/docs links front & centre in readme for convenience
* 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
* 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>
* 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>
- 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)
* 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
* 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